aboutsummaryrefslogtreecommitdiffstats
path: root/CNativeCode/OpenGL_X11.c
diff options
context:
space:
mode:
Diffstat (limited to 'CNativeCode/OpenGL_X11.c')
-rw-r--r--CNativeCode/OpenGL_X11.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/CNativeCode/OpenGL_X11.c b/CNativeCode/OpenGL_X11.c
index 6d0dec5..30276f7 100644
--- a/CNativeCode/OpenGL_X11.c
+++ b/CNativeCode/OpenGL_X11.c
@@ -514,7 +514,10 @@ Java_gl4java_GLContext_gljMakeCurrentNative( JNIEnv *env, jobject obj,
return JNI_FALSE;
}
- ctx = disp__glXGetCurrentContext();
+ /** JAU NVidia 2314 Bug workaround ..
+ ctx = disp__glXGetCurrentContext();
+ */
+
if(ctx==(GLXContext)((PointerHolder)glContext))
return JNI_TRUE;
@@ -638,7 +641,8 @@ Java_gl4java_GLContext_gljDestroyNative( JNIEnv *env, jobject obj,
else jownwind =(*env)->GetBooleanField(env, obj, fownwind);
}
- disp__glXWaitGL();
+ if(gc!=0)
+ disp__glXWaitGL();
if(ret==JNI_TRUE)
{
@@ -649,8 +653,7 @@ Java_gl4java_GLContext_gljDestroyNative( JNIEnv *env, jobject obj,
fprintf(stderr, "GL4Java: gljDestroy failed, GL context is 0\n");
fflush(stderr);
}
- }
- disp__glXMakeCurrent( disp, None, NULL );
+ } else disp__glXMakeCurrent( disp, None, NULL );
if(ret==JNI_TRUE)
{