diff options
author | Sven Gothel <[email protected]> | 2012-09-21 08:28:42 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-09-21 08:28:42 +0200 |
commit | 459af1bba130495943e51ff289a094b602c642cd (patch) | |
tree | a0c4d606dd702f3d6ded054d7c4a52ae2f109797 /src/jogl | |
parent | 5b378cb2cd162cb9af44812c37935eb3a83aabd2 (diff) |
MacOSXCGLContext: Fix missing initialization of 'needsSetContextPBuffer' if not offscreen-layer.
Diffstat (limited to 'src/jogl')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java index 929ac00c2..eae365925 100644 --- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java +++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java @@ -488,6 +488,7 @@ public abstract class MacOSXCGLContext extends GLContextImpl throw new RuntimeException("Anonymous drawable instance's handle neither NSView, NSWindow nor PBuffer: "+toHexString(drawableHandle)+", "+drawable.getClass().getName()+",\n\t"+drawable); } } + needsSetContextPBuffer = isPBuffer; backingLayerHost = NativeWindowFactory.getOffscreenLayerSurface(surface, true); boolean incompleteView = null != backingLayerHost; @@ -600,11 +601,12 @@ public abstract class MacOSXCGLContext extends GLContextImpl public void swapBuffers(boolean doubleBuffered) { MacOSXCGLContext.NSOpenGLImpl.this.swapBuffers(); } } ) ; - } else if( chosenCaps.isPBuffer() && CGL.isNSOpenGLPixelBuffer(drawableHandle) ) { + } else if( CGL.isNSOpenGLPixelBuffer(drawableHandle) ) { texID = 0; pbufferHandle = drawableHandle; if(0 != drawableHandle) { // complete 'validatePBufferConfig(..)' procedure CGL.setContextPBuffer(ctx, pbufferHandle); + needsSetContextPBuffer = false; } } else { throw new GLException("BackingLayerHost w/ unknown handle (!FBO, !PBuffer): "+drawable); @@ -652,9 +654,7 @@ public abstract class MacOSXCGLContext extends GLContextImpl if( needsSetContextPBuffer && 0 != drawableHandle && CGL.isNSOpenGLPixelBuffer(drawableHandle) ) { // Must associate the pbuffer with our newly-created context needsSetContextPBuffer = false; - if(0 != drawableHandle) { - CGL.setContextPBuffer(ctx, drawableHandle); - } + CGL.setContextPBuffer(ctx, drawableHandle); if(DEBUG) { System.err.println("NS.validateDrawableConfig bind pbuffer "+toHexString(drawableHandle)+" -> ctx "+toHexString(ctx)); } |