mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-12 06:05:10 -04:00
fix 2
This commit is contained in:
parent
0b2c7b56d3
commit
2cf6d8c1d1
@ -18,7 +18,7 @@
|
||||
struct PotatoBridge {
|
||||
ANativeWindow* androidWindow;
|
||||
|
||||
void** eglContext;
|
||||
EGLContext eglContext;
|
||||
EGLDisplay eglDisplay;
|
||||
EGLSurface eglSurface;
|
||||
/*
|
||||
@ -96,7 +96,7 @@ JNIEXPORT jboolean JNICALL Java_org_lwjgl_glfw_GLFW_nativeEglMakeCurrent(JNIEnv*
|
||||
|
||||
eglBindAPI(EGL_OPENGL_ES_API);
|
||||
|
||||
potatoBridge.eglContext = &eglCreateContext(potatoBridge.eglDisplay, config, EGL_NO_CONTEXT, ctx_attribs);
|
||||
potatoBridge.eglContext = eglCreateContext(potatoBridge.eglDisplay, config, EGL_NO_CONTEXT, ctx_attribs);
|
||||
if (!potatoBridge.eglContext) {
|
||||
printf("Error: eglCreateContext failed\n");
|
||||
return JNI_FALSE;
|
||||
@ -105,7 +105,7 @@ JNIEXPORT jboolean JNICALL Java_org_lwjgl_glfw_GLFW_nativeEglMakeCurrent(JNIEnv*
|
||||
// test eglQueryContext()
|
||||
{
|
||||
EGLint val;
|
||||
eglQueryContext(potatoBridge.eglDisplay, *potatoBridge.eglContext, EGL_CONTEXT_CLIENT_VERSION, &val);
|
||||
eglQueryContext(potatoBridge.eglDisplay, potatoBridge.eglContext, EGL_CONTEXT_CLIENT_VERSION, &val);
|
||||
assert(val == 2);
|
||||
}
|
||||
|
||||
@ -136,7 +136,7 @@ JNIEXPORT jboolean JNICALL Java_org_lwjgl_glfw_GLFW_nativeEglMakeCurrent(JNIEnv*
|
||||
potatoBridge.eglSurface
|
||||
);
|
||||
|
||||
EGLBoolean success = eglMakeCurrent(potatoBridge.eglDisplay, potatoBridge.eglSurface, potatoBridge.eglSurface, *potatoBridge.eglContext);
|
||||
EGLBoolean success = eglMakeCurrent(potatoBridge.eglDisplay, potatoBridge.eglSurface, potatoBridge.eglSurface, potatoBridge.eglContext);
|
||||
if (success == EGL_FALSE) {
|
||||
printf("Error: eglMakeCurrent() failed: %p\n", eglGetError());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user