diff --git a/Natives/egl_bridge.c b/Natives/egl_bridge.c index 62c41588..6fa00993 100644 --- a/Natives/egl_bridge.c +++ b/Natives/egl_bridge.c @@ -17,9 +17,9 @@ #include "log.h" typedef void gl4esInitialize_func(); -typedef void gl4esSwapBuffers_func(); +// typedef void gl4esSwapBuffers_func(); -gl4esSwapBuffers_func *gl4esSwapBuffers; +// gl4esSwapBuffers_func *gl4esSwapBuffers; // Called from JNI_OnLoad of liblwjgl_opengl void pojav_openGLOnLoad() { @@ -77,7 +77,7 @@ JNIEXPORT jboolean JNICALL Java_org_lwjgl_glfw_GLFW_nativeEglMakeCurrent(JNIEnv* gl4esInitialize_func *gl4esInitialize = (gl4esInitialize_func*) dlsym(GL4ES_HANDLE, "initialize_gl4es"); // debug("initialize_gl4es = %p", gl4esInitialize); - gl4esSwapBuffers = (gl4esSwapBuffers_func*) dlsym(GL4ES_HANDLE, "gl4es_SwapBuffers_currentContext"); + // gl4esSwapBuffers = (gl4esSwapBuffers_func*) dlsym(GL4ES_HANDLE, "gl4es_SwapBuffers_currentContext"); gl4esInitialize(); debug("GL4ES init success"); @@ -96,8 +96,8 @@ JNIEXPORT jboolean JNICALL Java_org_lwjgl_glfw_GLFW_nativeEglSwapBuffers(JNIEnv return JNI_FALSE; } - gl4esSwapBuffers(); - // flushBuffer(); + // gl4esSwapBuffers(); + flushBuffer(); return JNI_TRUE; } diff --git a/Natives/egl_bridge_ios.m b/Natives/egl_bridge_ios.m index fef13571..f42d4ff3 100644 --- a/Natives/egl_bridge_ios.m +++ b/Natives/egl_bridge_ios.m @@ -72,6 +72,8 @@ jboolean clearCurrentContext() { void flushBuffer() { // glBindRenderbuffer(GL_RENDERBUFFER, RenderBuffer); + + glFlush(); [[EAGLContext currentContext] presentRenderbuffer:GL_RENDERBUFFER];