diff options
Diffstat (limited to 'src/jogl/native/macosx')
-rw-r--r-- | src/jogl/native/macosx/MacOSXWindowSystemInterface-pbuffer.m | 6 | ||||
-rw-r--r-- | src/jogl/native/macosx/MacOSXWindowSystemInterface.m | 29 |
2 files changed, 16 insertions, 19 deletions
diff --git a/src/jogl/native/macosx/MacOSXWindowSystemInterface-pbuffer.m b/src/jogl/native/macosx/MacOSXWindowSystemInterface-pbuffer.m index fe896cc53..b713465f7 100644 --- a/src/jogl/native/macosx/MacOSXWindowSystemInterface-pbuffer.m +++ b/src/jogl/native/macosx/MacOSXWindowSystemInterface-pbuffer.m @@ -102,11 +102,6 @@ static CVReturn renderMyNSOpenGLLayer(CVDisplayLinkRef displayLink, pthread_mutex_init(&renderLock, &renderLockAttr); // recursive pthread_cond_init(&renderSignal, NULL); // no attribute - // no animations for add/remove/swap sublayers etc - [self removeAnimationForKey: kCAOnOrderIn]; - [self removeAnimationForKey: kCAOnOrderOut]; - [self removeAnimationForKey: kCATransition]; - pbuffer = p; [pbuffer retain]; @@ -161,7 +156,6 @@ static CVReturn renderMyNSOpenGLLayer(CVDisplayLinkRef displayLink, shallDraw = NO; CGRect lRect = [self frame]; - DBG_PRINT("MyNSOpenGLLayer::init %p, ctx %p, pfmt %p, pbuffer %p, opaque %d, pbuffer %dx%d -> tex %dx%d, frame: %lf/%lf %lfx%lf (refcnt %d)\n", self, _ctx, _fmt, pbuffer, opaque, [pbuffer pixelsWide], [pbuffer pixelsHigh], texWidth, texHeight, lRect.origin.x, lRect.origin.y, lRect.size.width, lRect.size.height, (int)[self retainCount]); diff --git a/src/jogl/native/macosx/MacOSXWindowSystemInterface.m b/src/jogl/native/macosx/MacOSXWindowSystemInterface.m index b5979d53e..979e57aee 100644 --- a/src/jogl/native/macosx/MacOSXWindowSystemInterface.m +++ b/src/jogl/native/macosx/MacOSXWindowSystemInterface.m @@ -376,20 +376,20 @@ NSOpenGLPixelFormat* createPixelFormat(int* iattrs, int niattrs, int* ivalues) { // http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/ObjC_classic/Classes/NSOpenGLPixelFormat.html NSOpenGLPixelFormatAttribute attribs[256]; + DBG_PRINT("createPixelFormat.0: attrs %d: ", niattrs); int idx = 0; int i; for (i = 0; i < niattrs && iattrs[i]>0; i++) { int attr = iattrs[i]; + DBG_PRINT("%d: %d, ", attr, ivalues[i]); switch (attr) { - case NSOpenGLPFANoRecovery: - if (ivalues[i] != 0) { - attribs[idx++] = NSOpenGLPFANoRecovery; - } + case NSOpenGLPFAAccelerated: + // ignored - allow non accelerated profiles, or see NSOpenGLPFANoRecovery break; - case NSOpenGLPFAAccelerated: + case NSOpenGLPFANoRecovery: if (ivalues[i] != 0) { - attribs[idx++] = NSOpenGLPFAAccelerated; + attribs[idx++] = NSOpenGLPFANoRecovery; } break; @@ -445,10 +445,8 @@ NSOpenGLPixelFormat* createPixelFormat(int* iattrs, int niattrs, int* ivalues) { attribs[idx++] = 0; NSOpenGLPixelFormat* fmt = [[NSOpenGLPixelFormat alloc] initWithAttributes:attribs]; - if (fmt == nil) { - // should we fallback to defaults or not? - fmt = [NSOpenGLView defaultPixelFormat]; - } + // if(fmt == nil) { fallback to a [NSOpenGLView defaultPixelFormat] crashed (SIGSEGV) on 10.6.7/NV } + DBG_PRINT("createPixelFormat.X: pfmt %p\n", fmt); [pool release]; return fmt; @@ -510,16 +508,19 @@ NSOpenGLContext* createContext(NSOpenGLContext* share, Bool opaque, int* viewNotReady) { + NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; + getRendererInfo(); - NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; + DBG_PRINT("createContext.0: share %p, view %p, isBackingLayer %d, pixfmt %p, opaque %d\n", + share, view, (int)isBackingLayerView, fmt, opaque); if (view != NULL) { Bool viewReady = true; if(!isBackingLayerView) { if ([view lockFocusIfCanDraw] == NO) { - DBG_PRINT("createContext [view lockFocusIfCanDraw] failed\n"); + DBG_PRINT("createContext.1 [view lockFocusIfCanDraw] failed\n"); viewReady = false; } } @@ -529,7 +530,7 @@ NSOpenGLContext* createContext(NSOpenGLContext* share, if(!isBackingLayerView) { [view unlockFocus]; } - DBG_PRINT("createContext view.frame size %dx%d\n", (int)frame.size.width, (int)frame.size.height); + DBG_PRINT("createContext.2 view.frame size %dx%d\n", (int)frame.size.width, (int)frame.size.height); viewReady = false; } } @@ -542,6 +543,7 @@ NSOpenGLContext* createContext(NSOpenGLContext* share, } // the view is not ready yet + DBG_PRINT("createContext.X: view not ready yet\n"); [pool release]; return NULL; } @@ -562,6 +564,7 @@ NSOpenGLContext* createContext(NSOpenGLContext* share, } } + DBG_PRINT("createContext.X: ctx: %p\n", ctx); [pool release]; return ctx; } |