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/GLContextImpl.java | |
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/GLContextImpl.java')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/GLContextImpl.java | 50 |
1 files changed, 38 insertions, 12 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLContextImpl.java b/src/jogl/classes/jogamp/opengl/GLContextImpl.java index 98b9ede36..42364dbfd 100644 --- a/src/jogl/classes/jogamp/opengl/GLContextImpl.java +++ b/src/jogl/classes/jogamp/opengl/GLContextImpl.java @@ -1462,29 +1462,55 @@ public abstract class GLContextImpl extends GLContext { final boolean hwAccel = 0 == ( ctp & GLContext.CTX_IMPL_ACCEL_SOFT ); final boolean compatCtx = 0 != ( ctp & GLContext.CTX_PROFILE_COMPAT ); + // // OS related quirks + // if( Platform.getOSType() == Platform.OSType.MACOS ) { - final int quirk1 = GLRendererQuirks.NoOffscreenBitmap; - if(DEBUG) { - System.err.println("Quirk: "+GLRendererQuirks.toString(quirk1)+": cause: OS "+Platform.getOSType()); + // + // OSX + // + { + final int quirk = GLRendererQuirks.NoOffscreenBitmap; + if(DEBUG) { + System.err.println("Quirk: "+GLRendererQuirks.toString(quirk)+": cause: OS "+Platform.getOSType()); + } + quirks[i++] = quirk; + } + + final VersionNumber OSXVersion173 = new VersionNumber(1,7,3); + if( Platform.getOSVersionNumber().compareTo(OSXVersion173) < 0 && glRendererLowerCase.contains("nvidia") ) { + final int quirk = GLRendererQuirks.GLFlushBeforeRelease; + if(DEBUG) { + System.err.println("Quirk: "+GLRendererQuirks.toString(quirk)+": cause: OS "+Platform.getOSType()+", OS Version "+Platform.getOSVersionNumber()+", Renderer "+glRenderer); + } + quirks[i++] = quirk; } - quirks[i++] = quirk1; } else if( Platform.getOSType() == Platform.OSType.WINDOWS ) { + // + // WINDOWS + // final int quirk = GLRendererQuirks.NoDoubleBufferedBitmap; if(DEBUG) { System.err.println("Quirk: "+GLRendererQuirks.toString(quirk)+": cause: OS "+Platform.getOSType()); } quirks[i++] = quirk; - } - - // Renderer related quirks, may also involve OS - if( Platform.OSType.ANDROID == Platform.getOSType() && glRendererLowerCase.contains("powervr") ) { - final int quirk = GLRendererQuirks.NoSetSwapInterval; - if(DEBUG) { - System.err.println("Quirk: "+GLRendererQuirks.toString(quirk)+": cause: OS "+Platform.getOSType() + " / Renderer " + glRenderer); + } else if( Platform.OSType.ANDROID == Platform.getOSType() ) { + // + // ANDROID + // + // Renderer related quirks, may also involve OS + if( glRendererLowerCase.contains("powervr") ) { + final int quirk = GLRendererQuirks.NoSetSwapInterval; + if(DEBUG) { + System.err.println("Quirk: "+GLRendererQuirks.toString(quirk)+": cause: OS "+Platform.getOSType() + " / Renderer " + glRenderer); + } + quirks[i++] = quirk; } - quirks[i++] = quirk; } + + // + // RENDERER related quirks + // if( glRendererLowerCase.contains("mesa") || glRendererLowerCase.contains("gallium") ) { { final int quirk = GLRendererQuirks.NoSetSwapIntervalPostRetarget; |