aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/native
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/native')
-rw-r--r--src/jogl/native/macosx/MacOSXWindowSystemInterface.m15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/jogl/native/macosx/MacOSXWindowSystemInterface.m b/src/jogl/native/macosx/MacOSXWindowSystemInterface.m
index af269a4b5..8c04f1774 100644
--- a/src/jogl/native/macosx/MacOSXWindowSystemInterface.m
+++ b/src/jogl/native/macosx/MacOSXWindowSystemInterface.m
@@ -567,10 +567,21 @@ NSOpenGLContext* createContext(NSOpenGLContext* share,
}
Bool makeCurrentContext(NSOpenGLContext* ctx) {
+#if 0
+ // we issue the CGL Lock from Java upfront!
+ NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
+ CGLError cglError = CGLLockContext([ctx CGLContextObj]);
+ if(0 == cglError) {
+ [ctx makeCurrentContext];
+ }
+ [pool release];
+ return 0 == cglError;
+#else
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
[ctx makeCurrentContext];
[pool release];
return true;
+#endif
}
Bool clearCurrentContext(NSOpenGLContext* ctx) {
@@ -580,6 +591,10 @@ Bool clearCurrentContext(NSOpenGLContext* ctx) {
[ctx makeCurrentContext];
}
[NSOpenGLContext clearCurrentContext];
+#if 0
+ // we issue the CGL Lock from Java upfront!
+ CGLUnlockContext([ctx CGLContextObj]);
+#endif
[pool release];
return true;
}