com.jogamp.opengl
Class GLRendererQuirks

java.lang.Object
  extended by com.jogamp.opengl.GLRendererQuirks

public class GLRendererQuirks
extends Object

GLRendererQuirks contains information of known bugs of various GL renderer. This information allows us to workaround them.

Using centralized quirk identifier enables us to locate code dealing w/ it and hence eases it's maintenance.

Some GL_VENDOR and GL_RENDERER strings are listed here .


Field Summary
static int COUNT
          Number of quirks known.
static int DontCloseX11Display
          Closing X11 displays may cause JVM crashes or X11 errors with some buggy drivers while being used in concert w/ OpenGL.
static int GLFlushBeforeRelease
          The OpenGL Context needs a glFlush() before releasing it, otherwise driver may freeze: OSX < 10.7.3 - NVidia Driver.
static int GLNonCompliant
          Non compliant GL context due to a buggy implementation not suitable for use.
static int GLSLBuggyDiscard
          GLSL discard command leads to undefined behavior or won't get compiled if being used.
static int NeedCurrCtx4ARBCreateContext
          Need current GL Context when calling new ARB CreateContext function, otherwise driver crashes the VM.
static int NeedCurrCtx4ARBPixFmtQueries
          Need current GL Context when calling new ARB pixel format query functions, otherwise driver crashes the VM.
static int NoDoubleBufferedBitmap
          On Windows no double buffered bitmaps are guaranteed to be available.
static int NoDoubleBufferedPBuffer
          Crashes XServer when using double buffered PBuffer with GL_RENDERER: Mesa DRI Intel(R) Sandybridge Desktop Mesa DRI Intel(R) Ivybridge Mobile - 3.0 Mesa 8.0.4 Gallium 0.4 on AMD CYPRESS For now, it is safe to disable it w/ hw-acceleration.
static int NoFullFBOSupport
          No full FBO support, i.e.
static int NoOffscreenBitmap
          No offscreen bitmap available, currently true for JOGL's OSX implementation.
static int NoSetSwapInterval
          Crashes application when trying to set EGL swap interval on Android 4.0.3 / Pandaboard ES / PowerVR SGX 540
static int NoSetSwapIntervalPostRetarget
          SIGSEGV on setSwapInterval() after changing the context's drawable w/ 'Mesa 8.0.4' dri2SetSwapInterval/DRI2 (soft & intel)
 
Constructor Summary
GLRendererQuirks(int[] quirks, int offset, int len)
           
GLRendererQuirks(List<Integer> quirks)
           
 
Method Summary
 boolean exist(int quirk)
           
 String toString()
           
static String toString(int quirk)
           
 StringBuilder toString(StringBuilder sb)
           
static void validateQuirk(int quirk)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NoDoubleBufferedPBuffer

public static final int NoDoubleBufferedPBuffer
Crashes XServer when using double buffered PBuffer with GL_RENDERER: For now, it is safe to disable it w/ hw-acceleration.

See Also:
Constant Field Values

NoDoubleBufferedBitmap

public static final int NoDoubleBufferedBitmap
On Windows no double buffered bitmaps are guaranteed to be available.

See Also:
Constant Field Values

NoSetSwapInterval

public static final int NoSetSwapInterval
Crashes application when trying to set EGL swap interval on Android 4.0.3 / Pandaboard ES / PowerVR SGX 540

See Also:
Constant Field Values

NoOffscreenBitmap

public static final int NoOffscreenBitmap
No offscreen bitmap available, currently true for JOGL's OSX implementation.

See Also:
Constant Field Values

NoSetSwapIntervalPostRetarget

public static final int NoSetSwapIntervalPostRetarget
SIGSEGV on setSwapInterval() after changing the context's drawable w/ 'Mesa 8.0.4' dri2SetSwapInterval/DRI2 (soft & intel)

See Also:
Constant Field Values

GLSLBuggyDiscard

public static final int GLSLBuggyDiscard
GLSL discard command leads to undefined behavior or won't get compiled if being used. Appears to have happened on Nvidia Tegra2, but seems to be fine now. FIXME: Constrain version.

See Also:
Constant Field Values

GLNonCompliant

public static final int GLNonCompliant
Non compliant GL context due to a buggy implementation not suitable for use.

Mesa >= 9.0 (?), Intel driver, OpenGL 3.1 compatibility context is not compliant:

 GL_RENDERER: 'Mesa .* Intel(R) Sandybridge Desktop' 
 

Mesa >= 9.0 (?), AMD driver, OpenGL 3.1 core and compatibility context is not compliant:

 GL_RENDERER: 'Gallium 0.4 on AMD RS880'
 

See Also:
Constant Field Values

GLFlushBeforeRelease

public static final int GLFlushBeforeRelease
The OpenGL Context needs a glFlush() before releasing it, otherwise driver may freeze:

See Also:
Constant Field Values

DontCloseX11Display

public static final int DontCloseX11Display
Closing X11 displays may cause JVM crashes or X11 errors with some buggy drivers while being used in concert w/ OpenGL.

Some drivers may require X11 displays to be closed in the same order as they were created, some may not allow them to be closed at all while resources are being used somehow.

Drivers known exposing such bug:

See Bug 515 - https://jogamp.org/bugzilla/show_bug.cgi?id=515 and X11Util.ATI_HAS_XCLOSEDISPLAY_BUG.

See Bug 705 - https://jogamp.org/bugzilla/show_bug.cgi?id=705

See Also:
Constant Field Values

NeedCurrCtx4ARBPixFmtQueries

public static final int NeedCurrCtx4ARBPixFmtQueries
Need current GL Context when calling new ARB pixel format query functions, otherwise driver crashes the VM.

Drivers known exposing such bug:

See Bug 480 - https://jogamp.org/bugzilla/show_bug.cgi?id=480

See Also:
Constant Field Values

NeedCurrCtx4ARBCreateContext

public static final int NeedCurrCtx4ARBCreateContext
Need current GL Context when calling new ARB CreateContext function, otherwise driver crashes the VM.

Drivers known exposing such bug:

See Bug 706 - https://jogamp.org/bugzilla/show_bug.cgi?id=706
See Bug 520 - https://jogamp.org/bugzilla/show_bug.cgi?id=520

See Also:
Constant Field Values

NoFullFBOSupport

public static final int NoFullFBOSupport
No full FBO support, i.e. not compliant w/ . Drivers known exposing such bug: Quirk can also be enabled via property: jogl.fbo.force.min.

See Also:
Constant Field Values

COUNT

public static final int COUNT
Number of quirks known.

See Also:
Constant Field Values
Constructor Detail

GLRendererQuirks

public GLRendererQuirks(int[] quirks,
                        int offset,
                        int len)
                 throws IllegalArgumentException
Parameters:
quirks - an array of valid quirks
offset - offset in quirks array to start reading
len - number of quirks to read from offset within quirks array
Throws:
IllegalArgumentException - if one of the quirks is out of range

GLRendererQuirks

public GLRendererQuirks(List<Integer> quirks)
                 throws IllegalArgumentException
Parameters:
quirks - a list of valid quirks
Throws:
IllegalArgumentException - if one of the quirks is out of range
Method Detail

exist

public final boolean exist(int quirk)
                    throws IllegalArgumentException
Parameters:
quirk - the quirk to be tested
Returns:
true if quirk exist, otherwise false
Throws:
IllegalArgumentException - if quirk is out of range

toString

public final StringBuilder toString(StringBuilder sb)

toString

public final String toString()
Overrides:
toString in class Object

validateQuirk

public static void validateQuirk(int quirk)
                          throws IllegalArgumentException
Parameters:
quirk - the quirk to be validated, i.e. whether it is out of range
Throws:
IllegalArgumentException - if quirk is out of range

toString

public static final String toString(int quirk)
                             throws IllegalArgumentException
Parameters:
quirk - the quirk to be converted to String
Returns:
the String equivalent of this quirk
Throws:
IllegalArgumentException - if quirk is out of range


Copyright 2010 JogAmp Community.