diff options
author | Sven Gothel <[email protected]> | 2014-10-08 08:17:23 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-10-08 22:31:32 +0200 |
commit | b56d805821cd694343456856dfd34666c0e2fc17 (patch) | |
tree | 1b0c5537973914c21df3249a86ee0fdeb8b840f9 /src | |
parent | c7ac21e7d25e5271f600806c93e3bd870d45bce3 (diff) |
Bug 1087: Set default framebuffer for OSX DummyDrawable, hence enforce NSView realization for DummyDrawable
Diffstat (limited to 'src')
-rw-r--r-- | src/jogl/native/macosx/MacOSXWindowSystemInterface.m | 2 | ||||
-rw-r--r-- | src/nativewindow/native/macosx/OSXmisc.m | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/jogl/native/macosx/MacOSXWindowSystemInterface.m b/src/jogl/native/macosx/MacOSXWindowSystemInterface.m index d4d3ddad9..462b5393d 100644 --- a/src/jogl/native/macosx/MacOSXWindowSystemInterface.m +++ b/src/jogl/native/macosx/MacOSXWindowSystemInterface.m @@ -556,8 +556,8 @@ NSOpenGLContext* createContext(NSOpenGLContext* share, GLint zeroOpacity = 0; [ctx setValues:&zeroOpacity forParameter:NSOpenGLCPSurfaceOpacity]; } + [ctx setView:view]; // Bug 1087: Set default framebuffer, hence enforce NSView realization if( viewReadyAndLocked ) { - [ctx setView:view]; [view unlockFocus]; } } diff --git a/src/nativewindow/native/macosx/OSXmisc.m b/src/nativewindow/native/macosx/OSXmisc.m index bf01f19d8..127b329d1 100644 --- a/src/nativewindow/native/macosx/OSXmisc.m +++ b/src/nativewindow/native/macosx/OSXmisc.m @@ -333,7 +333,7 @@ JNIEXPORT jlong JNICALL Java_jogamp_nativewindow_macosx_OSXUtil_CreateNSWindow0 NSWindow* myWindow = [[NSWindow alloc] initWithContentRect: rect styleMask: NSBorderlessWindowMask backing: NSBackingStoreBuffered - defer: YES]; + defer: NO]; // Bug 1087: Set default framebuffer, hence enforce NSView realization [myWindow setReleasedWhenClosed: YES]; // default [myWindow setPreservesContentDuringLiveResize: YES]; // Remove animations @@ -349,6 +349,13 @@ NS_ENDHANDLER [myWindow setOpaque: NO]; [myWindow setBackgroundColor: [NSColor clearColor]]; + // Bug 1087: Set default framebuffer, hence enforce NSView realization + // However, using the NSWindow ctor w/ 'defer: NO' seems sufficient + // and we are invisible - no focus! + // NSView* myView = [myWindow contentView]; + // [myView lockFocus]; + // [myView unlockFocus]; + [pool release]; return (jlong) ((intptr_t) myWindow); |