From 2cf6d8c1d15d702e82c92da96d8ed6e0269a2b6d Mon Sep 17 00:00:00 2001 From: khanhduytran0 Date: Mon, 7 Sep 2020 17:59:33 +0700 Subject: [PATCH] fix 2 --- app/src/main/jni/egl_bridge.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/jni/egl_bridge.c b/app/src/main/jni/egl_bridge.c index 15eae0022..76d4b2268 100644 --- a/app/src/main/jni/egl_bridge.c +++ b/app/src/main/jni/egl_bridge.c @@ -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()); }