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-calayer.m1
-rw-r--r--src/jogl/native/macosx/MacOSXWindowSystemInterface.m13
2 files changed, 11 insertions, 3 deletions
diff --git a/src/jogl/native/macosx/MacOSXWindowSystemInterface-calayer.m b/src/jogl/native/macosx/MacOSXWindowSystemInterface-calayer.m
index 6ebf400e2..b37930587 100644
--- a/src/jogl/native/macosx/MacOSXWindowSystemInterface-calayer.m
+++ b/src/jogl/native/macosx/MacOSXWindowSystemInterface-calayer.m
@@ -448,6 +448,7 @@ static const GLfloat gl_verts[] = {
[self disableAnimation];
[self deallocPBuffer];
[[self openGLContext] release];
+ [parentPixelFmt release];
[self release];
DBG_PRINT("MyNSOpenGLLayer::releaseLayer.X: %p (refcnt %d)\n", self, (int)[self retainCount]);
pthread_mutex_unlock(&renderLock);
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!