diff options
author | Sven Gothel <[email protected]> | 2012-10-02 07:33:17 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-10-02 07:33:17 +0200 |
commit | eb7ca05a602bfd3decf545e2807b7bfaf5a09a1e (patch) | |
tree | bcf0e8c64ee14f8b8f1a185deb6708d46ed6445c /src/jogl | |
parent | 98d5ae6b31802235426f0f540f7d0df74884a3d3 (diff) |
GLRendererQuirks.NoDoubleBufferedPBuffer: Set if ( mesa || gallium ) && hwAccel
Diffstat (limited to 'src/jogl')
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java | 10 | ||||
-rw-r--r-- | src/jogl/classes/jogamp/opengl/GLContextImpl.java | 9 |
2 files changed, 14 insertions, 5 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java b/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java index 1bbe22548..82799bf67 100644 --- a/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java +++ b/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java @@ -36,7 +36,15 @@ package com.jogamp.opengl; * </p> */ public class GLRendererQuirks { - /** Crashes XServer when using double buffered PBuffer with 'Mesa DRI Intel(R) Sandybridge Desktop' & 'Mesa DRI Intel(R) Ivybridge Mobile - 3.0 Mesa 8.0.4' */ + /** + * Crashes XServer when using double buffered PBuffer with: + * <ul> + * <li>Mesa DRI Intel(R) Sandybridge Desktop</li> + * <li>Mesa DRI Intel(R) Ivybridge Mobile - 3.0 Mesa 8.0.4</li> + * <li>Gallium 0.4 on AMD CYPRESS</li> + * </ul> + * For now, it is safe to disable it w/ hw-acceleration. + */ public static final int NoDoubleBufferedPBuffer = 0; /** On Windows no double buffered bitmaps are guaranteed to be available. */ diff --git a/src/jogl/classes/jogamp/opengl/GLContextImpl.java b/src/jogl/classes/jogamp/opengl/GLContextImpl.java index d7f61681f..249dc9c62 100644 --- a/src/jogl/classes/jogamp/opengl/GLContextImpl.java +++ b/src/jogl/classes/jogamp/opengl/GLContextImpl.java @@ -1261,7 +1261,7 @@ public abstract class GLContextImpl extends GLContext { // setContextVersion(major, minor, ctxProfileBits, true); - setRendererQuirks(); + setRendererQuirks( 0 == ( ctxProfileBits & GLContext.CTX_IMPL_ACCEL_SOFT ) ); setDefaultSwapInterval(); @@ -1270,7 +1270,7 @@ public abstract class GLContextImpl extends GLContext { } } - private final void setRendererQuirks() { + private final void setRendererQuirks(boolean hwAccel) { int[] quirks = new int[GLRendererQuirks.COUNT]; int i = 0; @@ -1297,7 +1297,7 @@ public abstract class GLContextImpl extends GLContext { } quirks[i++] = quirk; } - if( glRendererLowerCase.contains("mesa") ) { + if( glRendererLowerCase.contains("mesa") || glRendererLowerCase.contains("gallium") ) { { final int quirk = GLRendererQuirks.NoSetSwapIntervalPostRetarget; if(DEBUG) { @@ -1305,7 +1305,8 @@ public abstract class GLContextImpl extends GLContext { } quirks[i++] = quirk; } - if( glRendererLowerCase.contains("intel(r)") ) { + if( hwAccel /* glRendererLowerCase.contains("intel(r)") || glRendererLowerCase.contains("amd") */ ) + { final int quirk = GLRendererQuirks.NoDoubleBufferedPBuffer; if(DEBUG) { System.err.println("Quirk: "+GLRendererQuirks.toString(quirk)+": cause: Renderer " + glRenderer); |