summaryrefslogtreecommitdiffstats
path: root/src/jogl/native/macosx/MacOSXWindowSystemInterface.m
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/native/macosx/MacOSXWindowSystemInterface.m')
-rw-r--r--src/jogl/native/macosx/MacOSXWindowSystemInterface.m13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/jogl/native/macosx/MacOSXWindowSystemInterface.m b/src/jogl/native/macosx/MacOSXWindowSystemInterface.m
index 48807ee29..e8925f8e8 100644
--- a/src/jogl/native/macosx/MacOSXWindowSystemInterface.m
+++ b/src/jogl/native/macosx/MacOSXWindowSystemInterface.m
@@ -551,8 +551,7 @@ NSOpenGLContext* createContext(NSOpenGLContext* share,
NSOpenGLContext* ctx = [[NSOpenGLContext alloc] initWithFormat:fmt shareContext:share];
- if (ctx != nil) {
- if (view != nil) {
+ if ( nil != ctx && nil != view ) {
if(!opaque) {
GLint zeroOpacity = 0;
[ctx setValues:&zeroOpacity forParameter:NSOpenGLCPSurfaceOpacity];
@@ -563,7 +562,6 @@ NSOpenGLContext* createContext(NSOpenGLContext* share,
DBG_PRINT("createContext.3.X: setView\n");
[view unlockFocus];
}
- }
}
DBG_PRINT("createContext.X: ctx: %p\n", ctx);
@@ -571,6 +569,15 @@ NSOpenGLContext* createContext(NSOpenGLContext* share,
return ctx;
}
+void setContextView(NSOpenGLContext* ctx, NSView* view) {
+ NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
+ if ( nil != ctx && nil != view ) {
+ [ctx setView:view];
+ }
+ [pool release];
+ return ctx;
+}
+
Bool makeCurrentContext(NSOpenGLContext* ctx) {
#if 0
// we issue the CGL Lock from Java upfront!