From 4fbd68b2463fec138cfa87345a307f1c99ba454b Mon Sep 17 00:00:00 2001 From: khanhduytran0 Date: Sun, 13 Dec 2020 11:02:34 +0700 Subject: [PATCH] [EGLBridge] Attempt 2/? --- app/src/main/jni/egl_bridge.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/jni/egl_bridge.c b/app/src/main/jni/egl_bridge.c index eeea90755..533b8944c 100644 --- a/app/src/main/jni/egl_bridge.c +++ b/app/src/main/jni/egl_bridge.c @@ -76,8 +76,10 @@ JNIEXPORT jboolean JNICALL Java_org_lwjgl_glfw_GLFW_nativeEglMakeCurrent(JNIEnv* if (potatoBridge.eglContext != EGL_NO_CONTEXT) { eglMakeCurrent(potatoBridge.eglDisplay, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); +/* potatoBridge.eglContextOld = potatoBridge.eglContext; potatoBridge.eglContext = eglCreateContext(potatoBridge.eglDisplay, config, potatoBridge.eglContextOld, ctx_attribs); +*/ } else { if (potatoBridge.eglDisplay == NULL || potatoBridge.eglDisplay == EGL_NO_DISPLAY) { potatoBridge.eglDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY); @@ -88,7 +90,7 @@ JNIEXPORT jboolean JNICALL Java_org_lwjgl_glfw_GLFW_nativeEglMakeCurrent(JNIEnv* } printf("EGLBridge: Initializing\n"); - printf("EGLBridge: ANativeWindow pointer = %p\n", potatoBridge.androidWindow); + // printf("EGLBridge: ANativeWindow pointer = %p\n", potatoBridge.androidWindow); if (!eglInitialize(potatoBridge.eglDisplay, NULL, NULL)) { printf("EGLBridge: Error eglInitialize() failed\n");