diff options
author | Sven Gothel <[email protected]> | 2013-02-21 10:27:31 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-02-21 10:27:31 +0100 |
commit | ffcf0cb5beaf3c7c363d45cef0b9d18dcf3f50c6 (patch) | |
tree | f7901402b9cd70d0ee9d87a4814ecd3aabda6da4 /src/jogl/classes/jogamp/opengl/macosx | |
parent | 97401c4b832aa6f65bfbad47c54d18e4b720dbce (diff) |
Bug 548 and Bug 679: Add 'glFlush()' requirement (OSX < 10.7.3 && NVIDIA GPU) to GLRendererQuirks and perform only if exists.
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/macosx')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java index dbb1d4931..3825f855c 100644 --- a/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java +++ b/src/jogl/classes/jogamp/opengl/macosx/cgl/MacOSXCGLContext.java @@ -74,6 +74,7 @@ import com.jogamp.common.util.VersionNumber; import com.jogamp.gluegen.runtime.ProcAddressTable; import com.jogamp.gluegen.runtime.opengl.GLProcAddressResolver; import com.jogamp.opengl.GLExtensions; +import com.jogamp.opengl.GLRendererQuirks; import com.jogamp.opengl.util.PMVMatrix; import com.jogamp.opengl.util.glsl.ShaderCode; import com.jogamp.opengl.util.glsl.ShaderProgram; @@ -793,8 +794,8 @@ public abstract class MacOSXCGLContext extends GLContextImpl @Override public boolean release(long ctx) { try { - if( null != MacOSXCGLContext.this.getGLProcAddressTable() ) { // gl successfully initialized ? - gl.glFlush(); // w/o glFlush()/glFinish() OSX < 10.7 (NVidia driver) may freeze + if( hasRendererQuirk(GLRendererQuirks.GLFlushBeforeRelease) && null != MacOSXCGLContext.this.getGLProcAddressTable() ) { + gl.glFlush(); } } catch (GLException gle) { if(DEBUG) { @@ -975,7 +976,9 @@ public abstract class MacOSXCGLContext extends GLContextImpl @Override public boolean release(long ctx) { try { - gl.glFlush(); // w/o glFlush()/glFinish() OSX < 10.7 (NVidia driver) may freeze + if( hasRendererQuirk(GLRendererQuirks.GLFlushBeforeRelease) && null != MacOSXCGLContext.this.getGLProcAddressTable() ) { + gl.glFlush(); + } } catch (GLException gle) { if(DEBUG) { System.err.println("MacOSXCGLContext.CGLImpl.release: INFO: glFlush() catched exception:"); |