Class GLRendererQuirks
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 <http://feedback.wildfiregames.com/report/opengl/feature/GL_VENDOR>.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Buggy FBO color renderbuffer target, i.e.static final int
Closing X11 displays may cause JVM crashes or X11 errors with some buggy drivers while being used in concert w/ OpenGL.static final int
GL4 context needs to be requested via GL3 profile attribute OSX >= 10.9.0 - kCGLOGLPVersion_GL4_Core may not produce hw-accel context.static final int
Bug 925 - Accept an ES3 Context, if reported via GL-Version-String w/oEGLExt.EGL_OPENGL_ES3_BIT_KHR
.static final int
The OpenGL context needs aglFlush()
before releasing it, otherwise driver may freeze: OSX < 10.7.3 - NVidia Driver.static final int
Non compliant GL context due to a buggy implementation not suitable for use.static final int
Buggy shared OpenGL context support within a multithreaded use-case, not suitable for stable usage.static final int
GLSLdiscard
command leads to undefined behavior or won't get compiled if being used.static final int
GLSL is not compliant or even not stable (crash) OSX < 10.7.0 (?) - NVidia Driver.static final int
Need current GL context when calling new ARB CreateContext function, otherwise driver crashes the VM.static final int
Need current GL context when calling new ARB pixel format query functions, otherwise driver crashes the VM.static final int
Need GL objects (VBO, ..) to be synchronized when utilized concurrently from multiple threads via a shared GL context, otherwise driver crashes the VM.static final int
No reliable ARB_create_context implementation, even if driver claims otherwise.static final int
On Windows no double buffered bitmaps are guaranteed to be available.static final int
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 final int
No full FBO support, i.e.static final int
static final int
No offscreen bitmap available, currently true for JOGL's OSX implementation.static final int
No pbuffer supporting accumulation buffers available, even if driver claims otherwise.static final int
Crashes application when trying to set EGL swap interval on Android 4.0.3 / Pandaboard ES / PowerVR SGX 540static final int
SIGSEGV on setSwapInterval() after changing the context's drawable w/ 'Mesa 8.0.4' dri2SetSwapInterval/DRI2 (soft & intel)static final int
No support for ES or desktop GL >= 3.0 current context without surface, i.e.static final int
Bug 948 - NVIDIA 331.38 (Linux X11) EGL impl. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal void
addQuirk
(int quirk) final void
addQuirks
(int[] quirks, int offset, int len) final void
addQuirks
(GLRendererQuirks quirks) static void
addStickyDeviceQuirk
(AbstractGraphicsDevice device, int quirk) static void
addStickyDeviceQuirks
(AbstractGraphicsDevice device, int[] quirks, int offset, int len) static void
addStickyDeviceQuirks
(AbstractGraphicsDevice device, GLRendererQuirks quirks) static boolean
areSameStickyDevice
(AbstractGraphicsDevice device1, AbstractGraphicsDevice device2) Returns true if both devices have the sameAbstractGraphicsDevice.getUniqueID()
, otherwise false.final boolean
exist
(int quirk) static boolean
existStickyDeviceQuirk
(AbstractGraphicsDevice device, int quirk) static final int
getCount()
Return the number of known quirks.static GLRendererQuirks
Retrieval of stickyAbstractGraphicsDevice
'sGLRendererQuirks
.static void
pushStickyDeviceQuirks
(AbstractGraphicsDevice device, GLRendererQuirks dest) final String
toString()
static final String
toString
(int quirk) final StringBuilder
static void
validateQuirk
(int quirk)
-
Field Details
-
NoDoubleBufferedPBuffer
public static final int NoDoubleBufferedPBufferCrashes 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
- See Also:
-
NoDoubleBufferedBitmap
public static final int NoDoubleBufferedBitmapOn Windows no double buffered bitmaps are guaranteed to be available.- See Also:
-
NoSetSwapInterval
public static final int NoSetSwapIntervalCrashes application when trying to set EGL swap interval on Android 4.0.3 / Pandaboard ES / PowerVR SGX 540- See Also:
-
NoOffscreenBitmap
public static final int NoOffscreenBitmapNo offscreen bitmap available, currently true for JOGL's OSX implementation.- See Also:
-
NoSetSwapIntervalPostRetarget
public static final int NoSetSwapIntervalPostRetargetSIGSEGV on setSwapInterval() after changing the context's drawable w/ 'Mesa 8.0.4' dri2SetSwapInterval/DRI2 (soft & intel)- See Also:
-
GLSLBuggyDiscard
public static final int GLSLBuggyDiscardGLSLdiscard
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:
-
GLNonCompliant
public static final int GLNonCompliantNon compliant GL context due to a buggy implementation not suitable for use.Currently, Mesa >= 9.1.3 (may extend back as far as 9.0) OpenGL 3.1 compatibility context is not compliant. Most programs will give completely broken output (or no output at all. For now, this context is not trusted.
The above has been confirmed for the following Mesa 9.* GL_RENDERER strings:- Mesa .* Intel(R) Sandybridge Desktop
- Gallium 0.4 on AMD RS880
It still has to be verified whether the AMD OpenGL 3.1 core driver is compliant enought.
- See Also:
-
GLFlushBeforeRelease
public static final int GLFlushBeforeReleaseThe OpenGL context needs aglFlush()
before releasing it, otherwise driver may freeze:- OSX < 10.7.3 - NVidia Driver. Bug 533 and Bug 548 @ https://jogamp.org/bugzilla/.
- See Also:
-
DontCloseX11Display
public static final int DontCloseX11DisplayClosing 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:
- Mesa < 8.0 _with_ X11 software renderer
Mesa X11
, not with GLX/DRI renderer. - ATI proprietary Catalyst X11 driver versions:
- 8.78.6
- 8.881
- 8.911
- 9.01.8
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:
- Mesa < 8.0 _with_ X11 software renderer
-
NeedCurrCtx4ARBPixFmtQueries
public static final int NeedCurrCtx4ARBPixFmtQueriesNeed current GL context when calling new ARB pixel format query functions, otherwise driver crashes the VM.Drivers known exposing such bug:
- ATI proprietary Catalyst driver on Windows version ≤ XP. TODO: Validate if bug actually relates to 'old' ATI Windows drivers for old GPU's like X300 regardless of the Windows version.
See Bug 480 - https://jogamp.org/bugzilla/show_bug.cgi?id=480
- See Also:
-
NeedCurrCtx4ARBCreateContext
public static final int NeedCurrCtx4ARBCreateContextNeed current GL context when calling new ARB CreateContext function, otherwise driver crashes the VM.Drivers known exposing such bug:
- ATI proprietary Catalyst Windows driver on laptops with a driver version as reported in GL_VERSION:
- null
- <
12.102.3.0
( amd_catalyst_13.5_mobility_beta2 )
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:
- ATI proprietary Catalyst Windows driver on laptops with a driver version as reported in GL_VERSION:
-
NoFullFBOSupport
public static final int NoFullFBOSupportNo full FBO support, i.e. not compliant w/- GL_ARB_framebuffer_object
- EXT_framebuffer_object
- EXT_framebuffer_multisample
- EXT_framebuffer_blit
- EXT_packed_depth_stencil
- Mesa 7.12-devel on Windows with VMware SVGA3D renderer:
- GL_VERSION: 2.1 Mesa 7.12-devel (git-d6c318e)
- GL_RENDERER: Gallium 0.4 on SVGA3D; build: RELEASE;
Also enabled via
BuggyColorRenderbuffer
.Quirk can also be enabled via property:
jogl.fbo.force.min
.- See Also:
-
GLSLNonCompliant
public static final int GLSLNonCompliantGLSL is not compliant or even not stable (crash)- OSX < 10.7.0 (?) - NVidia Driver. Bug 818 @ https://jogamp.org/bugzilla/.
- See Also:
-
GL4NeedsGL3Request
public static final int GL4NeedsGL3RequestGL4 context needs to be requested via GL3 profile attribute- OSX >= 10.9.0 - kCGLOGLPVersion_GL4_Core may not produce hw-accel context. Bug 867 @ https://jogamp.org/bugzilla/.
- See Also:
-
GLES3ViaEGLES2Config
public static final int GLES3ViaEGLES2ConfigBug 925 - Accept an ES3 Context, if reported via GL-Version-String w/oEGLExt.EGL_OPENGL_ES3_BIT_KHR
.The ES3 Context can be used via
EGL.EGL_OPENGL_ES2_BIT
.The ES3 Context
must be created
with version attributes:EGL.EGL_CONTEXT_CLIENT_VERSION, 2, ..
- Mesa/AMD >= 9.2.1
- Some Android ES3 drivers ..
- See Also:
-
SingletonEGLDisplayOnly
public static final int SingletonEGLDisplayOnlyBug 948 - NVIDIA 331.38 (Linux X11) EGL impl. only supports _one_ EGL Device viaEGL.eglGetDisplay(long)
.Subsequent calls to
EGL.eglGetDisplay(long)
fail.Reusing global EGL display works.
The quirk is autodetected within EGLDrawableFactory's initial default device setup!
Appears on:
- EGL_VENDOR NVIDIA
- EGL_VERSION 1.4
- GL_VENDOR NVIDIA Corporation
- GL_VERSION OpenGL ES 3.0 331.38 (probably w/ 1st NV EGL lib on x86)
- GL_VERSION OpenGL ES 3.1 NVIDIA 355.06 (unstable)
- Platform X11
- CPU Family
Platform.CPUFamily.X86
- See Also:
-
NoMultiSamplingBuffers
public static final int NoMultiSamplingBuffersNo reliable MSAA / FSAAmulti
sampling
available, i.e. driver may crash.Appears on:
- GL_VENDOR nouveau
- GL_RENDERER Gallium 0.4 on NV34
final AbstractGraphicsDevice adevice = GLDrawableFactory.getDesktopFactory(); // or similar if( GLRendererQuirks.existStickyDeviceQuirk(adevice, GLRendererQuirks.NoMultiSamplingBuffers) ) { // don't use MSAA }
- See Also:
-
BuggyColorRenderbuffer
public static final int BuggyColorRenderbufferBuggy FBO color renderbuffer target, i.e. driver may crash.Appears on:
- GL_VENDOR Brian Paul
- GL_RENDERER Mesa X11
- GL_VERSION 2.1 Mesa 7.2
Note: Also enables
NoFullFBOSupport
.Note: GLFBODrawable always uses texture attachments if set.
Quirk can also be enabled via property:
jogl.fbo.force.nocolorrenderbuffer
.- See Also:
-
NoPBufferWithAccum
public static final int NoPBufferWithAccumNo pbuffer supporting accumulation buffers available, even if driver claims otherwise.Some drivers wrongly claim to support pbuffers with accumulation buffers. However, the creation of such pbuffer fails:
com.jogamp.opengl.GLException: pbuffer creation error: Couldn't find a suitable pixel format
Appears on:
- GL_VENDOR Intel
- GL_RENDERER Intel Bear Lake B
- GL_VERSION 1.4.0 - Build 8.14.10.1930
- Platform Windows
- See Also:
-
NoARBCreateContext
public static final int NoARBCreateContextNo reliable ARB_create_context implementation, even if driver claims otherwise.Some drivers wrongly claim to support ARB_create_context. However, the creation of such context fails:
com.jogamp.opengl.GLException: AWT-EventQueue-0: WindowsWGLContex.createContextImpl ctx !ARB, profile > GL2 requested (OpenGL >= 3.0.1). Requested: GLProfile[GL3bc/GL3bc.hw], current: 2.1 (Compat profile, FBO, hardware) - 2.1.8787
Appears on:
- GL_VENDOR ATI Technologies Inc.
- GL_RENDERER ATI Radeon 3100 Graphics
- GL_VERSION 2.1.8787
- Platform Windows
- See Also:
-
NoSurfacelessCtx
public static final int NoSurfacelessCtxNo support for ES or desktop GL >= 3.0 current context without surface, i.e. without a default framebuffer as read- and write drawables.See OpenGL spec 3.0, chapter 2.1 OpenGL Fundamentals, page 7 or
OpenGL ES spec 3.0.2, chapter 2.1 OpenGL Fundamentals, page 6:It is possible to use a GL context without a default framebuffer, in which case a framebuffer object must be used to perform all rendering. This is useful for applications neeting to perform offscreen rendering.
The feature will be attempted at initialization and this quirk will be set if failing.
Known drivers failing the specification:
- GNU/Linux X11 Nvidia proprietary driver
- GL_VERSION 4.4.0 NVIDIA 340.24
- Platform GNU/Linux X11
- See Also:
- GNU/Linux X11 Nvidia proprietary driver
-
-
Constructor Details
-
GLRendererQuirks
public GLRendererQuirks() -
GLRendererQuirks
- Parameters:
quirks
- an array of valid quirksoffset
- offset in quirks array to start readinglen
- number of quirks to read from offset within quirks array- Throws:
IllegalArgumentException
- if one of the quirks is out of range
-
-
Method Details
-
getCount
public static final int getCount()Return the number of known quirks. -
getStickyDeviceQuirks
Retrieval of stickyAbstractGraphicsDevice
'sGLRendererQuirks
.The
AbstractGraphicsDevice
s are mapped via theirAbstractGraphicsDevice.getUniqueID()
.Not thread safe.
-
areSameStickyDevice
public static boolean areSameStickyDevice(AbstractGraphicsDevice device1, AbstractGraphicsDevice device2) Returns true if both devices have the sameAbstractGraphicsDevice.getUniqueID()
, otherwise false. -
addStickyDeviceQuirk
public static void addStickyDeviceQuirk(AbstractGraphicsDevice device, int quirk) throws IllegalArgumentException - Throws:
IllegalArgumentException
- See Also:
-
addStickyDeviceQuirks
public static void addStickyDeviceQuirks(AbstractGraphicsDevice device, int[] quirks, int offset, int len) throws IllegalArgumentException - Throws:
IllegalArgumentException
- See Also:
-
addStickyDeviceQuirks
public static void addStickyDeviceQuirks(AbstractGraphicsDevice device, GLRendererQuirks quirks) throws IllegalArgumentException - Throws:
IllegalArgumentException
- See Also:
-
existStickyDeviceQuirk
Query
of stickyAbstractGraphicsDevice
'sGLRendererQuirks
.Not thread safe. However, use after changing the sticky quirks is safe.
-
pushStickyDeviceQuirks
Pushing
the stickyAbstractGraphicsDevice
'sGLRendererQuirks
to the givendestination
.Not thread safe. However, use after changing the sticky quirks is safe.
-
addQuirk
- Parameters:
quirk
- valid quirk to be added- Throws:
IllegalArgumentException
- if the quirk is out of range
-
addQuirks
- Parameters:
quirks
- an array of valid quirks to be addedoffset
- offset in quirks array to start readinglen
- number of quirks to read from offset within quirks array- Throws:
IllegalArgumentException
- if one of the quirks is out of range
-
addQuirks
- Parameters:
quirks
- valid GLRendererQuirks to be added
-
exist
- Parameters:
quirk
- the quirk to be tested- Returns:
- true if quirk exist, otherwise false
- Throws:
IllegalArgumentException
- if quirk is out of range
-
toString
-
toString
-
validateQuirk
- Parameters:
quirk
- the quirk to be validated, i.e. whether it is out of range- Throws:
IllegalArgumentException
- if quirk is out of range
-
toString
- Parameters:
quirk
- the quirk to be converted to String- Returns:
- the String equivalent of this quirk
- Throws:
IllegalArgumentException
- if quirk is out of range
-