JOGL v2.6.0-rc-20250712
JOGL, High-Performance Graphics Binding for Java (public API).
|
GLRendererQuirks contains information of known bugs of various GL renderer. More...
Classes | |
enum | Override |
Allow overriding any quirk settings via the two properties: More... | |
Public Member Functions | |
GLRendererQuirks () | |
final void | addQuirk (final int quirkBit) throws IllegalArgumentException |
final void | addQuirks (final GLRendererQuirks quirks) |
final boolean | exist (final int quirkBit) throws IllegalArgumentException |
Method tests whether the given quirk exists. More... | |
final StringBuilder | toString (StringBuilder sb) |
final String | toString () |
Static Public Member Functions | |
static final int | getCount () |
Return the number of known quirks, aka quirk bit count. More... | |
static GLRendererQuirks | getStickyDeviceQuirks (final AbstractGraphicsDevice device) |
Retrieval of sticky AbstractGraphicsDevice 's GLRendererQuirks . More... | |
static boolean | areSameStickyDevice (final AbstractGraphicsDevice device1, final AbstractGraphicsDevice device2) |
Returns true if both devices have the same AbstractGraphicsDevice#getUniqueID() , otherwise false. More... | |
static void | addStickyDeviceQuirk (final AbstractGraphicsDevice device, final int quirk) throws IllegalArgumentException |
Adding given quirk of sticky AbstractGraphicsDevice 's GLRendererQuirks . More... | |
static void | addStickyDeviceQuirks (final AbstractGraphicsDevice device, final GLRendererQuirks quirks) throws IllegalArgumentException |
Adding given quirks of sticky AbstractGraphicsDevice 's GLRendererQuirks . More... | |
static boolean | existStickyDeviceQuirk (final AbstractGraphicsDevice device, final int quirkBit) |
Query of sticky AbstractGraphicsDevice 's GLRendererQuirks . More... | |
static void | pushStickyDeviceQuirks (final AbstractGraphicsDevice device, final GLRendererQuirks dest) |
Pushing the sticky AbstractGraphicsDevice 's GLRendererQuirks to the given destination . More... | |
static final Override | getOverride (final int quirkBit) throws IllegalArgumentException |
static boolean | exist (final GLRendererQuirks quirks, final int quirkBit) throws IllegalArgumentException |
Convenient static method to call exist(int) on the given quirks with an added null check. More... | |
static void | validateQuirk (final int quirkBit) throws IllegalArgumentException |
static final String | toString (final int quirkBit) throws IllegalArgumentException |
Static Public Attributes | |
static final int | NoDoubleBufferedPBuffer = 0 |
Crashes XServer when using double buffered PBuffer with hardware GL_RENDERER on Mesa < 18.2.2: More... | |
static final int | NoDoubleBufferedBitmap = 1 |
On Windows no double buffered bitmaps are guaranteed to be available. More... | |
static final int | NoSetSwapInterval = 2 |
Crashes application when trying to set EGL swap interval on Android 4.0.3 / Pandaboard ES / PowerVR SGX 540. More... | |
static final int | NoOffscreenBitmap = 3 |
No offscreen bitmap available, currently true for JOGL's OSX implementation. More... | |
static final int | NoSetSwapIntervalPostRetarget = 4 |
SIGSEGV on setSwapInterval() after changing the context's drawable w/ Mesa >= 8.0.4 until Mesa < 18.2.2: dri2SetSwapInterval/DRI2 (soft & intel) More... | |
static final int | GLSLBuggyDiscard = 5 |
GLSL discard command leads to undefined behavior or won't get compiled if being used. More... | |
static final int | GL3CompatNonCompliant = 6 |
Non compliant OpenGL 3.1+ compatibility profile due to a buggy implementation not suitable for use. More... | |
static final int | GLFlushBeforeRelease = 7 |
The OpenGL context needs a glFlush() before releasing it, otherwise driver may freeze: More... | |
static final int | DontCloseX11Display = 8 |
Closing X11 displays may cause JVM crashes or X11 errors with some buggy drivers while being used in concert w/ OpenGL. More... | |
static final int | NeedCurrCtx4ARBPixFmtQueries = 9 |
Need current GL context when calling new ARB pixel format query functions, otherwise driver crashes the VM. More... | |
static final int | NeedCurrCtx4ARBCreateContext = 10 |
Need current GL context when calling new ARB CreateContext function, otherwise driver crashes the VM. More... | |
static final int | NoFullFBOSupport = 11 |
No full FBO support, i.e. More... | |
static final int | GLSLNonCompliant = 12 |
GLSL is not compliant or even not stable (crash) More... | |
static final int | GL4NeedsGL3Request = 13 |
GL4 context needs to be requested via GL3 profile attribute. More... | |
static final int | GLSharedContextBuggy = 14 |
Buggy shared OpenGL context support within a multithreaded use-case, not suitable for stable usage. More... | |
static final int | GLES3ViaEGLES2Config = 15 |
Bug 925 - Accept an ES3 Context, if reported via GL-Version-String w/o EGLExt#EGL_OPENGL_ES3_BIT_KHR . More... | |
static final int | SingletonEGLDisplayOnly = 16 |
Bug 948 - NVIDIA 331.38 (Linux X11) EGL impl. More... | |
static final int | NoMultiSamplingBuffers = 17 |
No reliable MSAA / FSAA multi sampling available, i.e. More... | |
static final int | BuggyColorRenderbuffer = 18 |
Buggy FBO color renderbuffer target, i.e. More... | |
static final int | NoPBufferWithAccum = 19 |
No pbuffer supporting accumulation buffers available, even if driver claims otherwise. More... | |
static final int | NeedSharedObjectSync = 20 |
Need GL objects (VBO, ..) to be synchronized when utilized concurrently from multiple threads via a shared GL context, otherwise driver crashes the VM. More... | |
static final int | NoARBCreateContext = 21 |
No reliable ARB_create_context implementation, even if driver claims otherwise. More... | |
static final int | NoSurfacelessCtx = 22 |
No support for ES or desktop GL >= 3.0 current context without surface, i.e. More... | |
static final int | NoFBOSupport = 23 |
No FBO support at all. More... | |
static final int | DontChooseFBConfigBestMatch = 24 |
Don't use the ChooseFBConfig's best match, instead utilize the given GLCapabilitiesChooser or DefaultGLCapabilitiesChooser without any recommendation. More... | |
static final int | No10BitColorCompOffscreen = 25 |
On Mesa >= 18.0.0, glXChooseFBConfig selects better GLCapabilities FBConfig than actually supported by glXCreatePbuffer and glXCreateGLXPixmap . More... | |
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 http://feedback.wildfiregames.com/report/opengl/feature/GL_VENDOR.
For testing purpose or otherwise, you may override the implemented quirk bit setting behavior using GLRendererQuirks.Override
.
Definition at line 57 of file GLRendererQuirks.java.
com.jogamp.opengl.GLRendererQuirks.GLRendererQuirks | ( | ) |
final void com.jogamp.opengl.GLRendererQuirks.addQuirk | ( | final int | quirkBit | ) | throws IllegalArgumentException |
quirkBit | valid quirk to be added |
IllegalArgumentException | if the quirk is out of range |
Definition at line 694 of file GLRendererQuirks.java.
final void com.jogamp.opengl.GLRendererQuirks.addQuirks | ( | final GLRendererQuirks | quirks | ) |
quirks | valid GLRendererQuirks to be added |
Definition at line 702 of file GLRendererQuirks.java.
|
static |
Adding given quirk
of sticky AbstractGraphicsDevice
's GLRendererQuirks
.
Not thread safe.
Definition at line 593 of file GLRendererQuirks.java.
|
static |
Adding given quirks
of sticky AbstractGraphicsDevice
's GLRendererQuirks
.
Not thread safe.
Definition at line 604 of file GLRendererQuirks.java.
|
static |
Returns true if both devices have the same AbstractGraphicsDevice#getUniqueID()
, otherwise false.
Definition at line 582 of file GLRendererQuirks.java.
|
static |
Convenient static method to call exist(int)
on the given quirks
with an added null
check.
quirks | GLRendererQuirks instance, maybe null |
quirkBit | the quirk to be tested |
true
if the quirks
is not null
and the given quirkBit
is set, otherwise false
. IllegalArgumentException | if quirk is out of range |
Definition at line 731 of file GLRendererQuirks.java.
final boolean com.jogamp.opengl.GLRendererQuirks.exist | ( | final int | quirkBit | ) | throws IllegalArgumentException |
Method tests whether the given quirk exists.
This methods respects the potential GLRendererQuirks.Override
setting by user properties. Therefor this method returns true
for FORCE
'ed quirks and false
for IGNORE
'ed quirks.
quirkBit | the quirk to be tested |
IllegalArgumentException | if quirk is out of range |
Definition at line 717 of file GLRendererQuirks.java.
|
static |
Query
of sticky AbstractGraphicsDevice
's GLRendererQuirks
.
Not thread safe. However, use after changing the sticky quirks is safe.
Definition at line 615 of file GLRendererQuirks.java.
|
static |
Return the number of known quirks, aka quirk bit count.
Definition at line 540 of file GLRendererQuirks.java.
|
static |
Definition at line 630 of file GLRendererQuirks.java.
|
static |
Retrieval of sticky AbstractGraphicsDevice
's GLRendererQuirks
.
The AbstractGraphicsDevice
s are mapped via their AbstractGraphicsDevice#getUniqueID()
.
Not thread safe.
Definition at line 565 of file GLRendererQuirks.java.
|
static |
Pushing
the sticky AbstractGraphicsDevice
's GLRendererQuirks
to the given destination
.
Not thread safe. However, use after changing the sticky quirks is safe.
Definition at line 626 of file GLRendererQuirks.java.
final String com.jogamp.opengl.GLRendererQuirks.toString | ( | ) |
Definition at line 758 of file GLRendererQuirks.java.
|
static |
quirkBit | the quirk to be converted to String |
IllegalArgumentException | if quirk is out of range |
Definition at line 777 of file GLRendererQuirks.java.
final StringBuilder com.jogamp.opengl.GLRendererQuirks.toString | ( | StringBuilder | sb | ) |
Definition at line 735 of file GLRendererQuirks.java.
|
static |
quirkBit | the quirk to be validated, i.e. whether it is out of range |
IllegalArgumentException | if quirk is out of range |
Definition at line 766 of file GLRendererQuirks.java.
|
static |
Buggy FBO color renderbuffer target, i.e.
driver may crash.
Appears on:
TODO: We have to determine the exact version range, i.e. not adding the quirk with fixed driver version!
Note: Also enables NoFullFBOSupport
.
Note: GLFBODrawable always uses texture attachments if set.
Definition at line 377 of file GLRendererQuirks.java.
|
static |
Don't use the ChooseFBConfig's best match, instead utilize the given GLCapabilitiesChooser
or DefaultGLCapabilitiesChooser
without any recommendation.
The default behavior without this quirk is using a given GLCapabilitiesChooser
and pass the ChooseFBConfig's best match as a recommendation.
This quirk currently exist to be injected by the user via the properties, see GLRendererQuirks.Override
.
Definition at line 508 of file GLRendererQuirks.java.
|
static |
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:
Mesa X11
, not with GLX/DRI renderer. See Bug 515 - https://jogamp.org/bugzilla/show_bug.cgi?id=515 and jogamp.nativewindow.x11.X11Util#ATI_HAS_XCLOSEDISPLAY_BUG
.
See Bug 705 - https://jogamp.org/bugzilla/show_bug.cgi?id=705
Definition at line 179 of file GLRendererQuirks.java.
|
static |
Non compliant OpenGL 3.1+ compatibility profile due to a buggy implementation not suitable for use.
Mesa versions in the range [9.1.3 .. 18.2.0[ are not fully compliant with the OpenGL 3.1 compatibility profile. Most programs will give completely broken output (or no output at all.
The above has been confirmed for the following Mesa 9.* GL_RENDERER strings:
Default implementation sets this quirk on all Mesa < 18.2.0 drivers.
Definition at line 141 of file GLRendererQuirks.java.
|
static |
GL4 context needs to be requested via GL3 profile attribute.
Definition at line 254 of file GLRendererQuirks.java.
|
static |
Bug 925 - Accept an ES3 Context, if reported via GL-Version-String w/o EGLExt#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, ..
Definition at line 308 of file GLRendererQuirks.java.
|
static |
The OpenGL context needs a glFlush()
before releasing it, otherwise driver may freeze:
Definition at line 149 of file GLRendererQuirks.java.
|
static |
Buggy shared OpenGL context support within a multithreaded use-case, not suitable for stable usage.
X11 Mesa DRI Intel(R) driver >= 9.2.1 cannot handle multithreaded shared GLContext usage with non-blocking exclusive X11 display connections. References:
However, not all multithreaded use-cases are broken, e.g. our GLMediaPlayer does work.
The above has been confirmed for the following Mesa 9.* strings:
On Android 4.*, Huawei's Ascend G615 w/ Immersion.16 could not make a shared context current, which uses a pbuffer drawable:
Definition at line 290 of file GLRendererQuirks.java.
|
static |
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.
Definition at line 120 of file GLRendererQuirks.java.
|
static |
GLSL is not compliant or even not stable (crash)
Definition at line 246 of file GLRendererQuirks.java.
|
static |
Need current GL context when calling new ARB CreateContext function, otherwise driver crashes the VM.
Drivers known exposing such bug:
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
Definition at line 215 of file GLRendererQuirks.java.
|
static |
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
Definition at line 195 of file GLRendererQuirks.java.
|
static |
Need GL objects (VBO, ..) to be synchronized when utilized concurrently from multiple threads via a shared GL context, otherwise driver crashes the VM.
Usually synchronization should not be required, if the shared GL objects are created and immutable before concurrent usage.
However, using drivers exposing this issue always require the user to synchronize access of shared GL objects.
Synchronization can be avoided if accessing the shared GL objects exclusively via a queue or Ringbuffer
, see GLMediaPlayerImpl as an example.
Appears on:
See Bug 1088 - https://jogamp.org/bugzilla/show_bug.cgi?id=1088
Definition at line 431 of file GLRendererQuirks.java.
|
static |
On Mesa >= 18.0.0, glXChooseFBConfig
selects better GLCapabilities
FBConfig than actually supported by glXCreatePbuffer
and glXCreateGLXPixmap
.
As tested on Mesa 18.3.6, requesting an RGB 8bit color component FBConfig for GLX_PBUFFER_BIT
and GLX_PIXMAP_BIT
GLX_DRAWABLE_TYPE
s via glXChooseFBConfig
returns an RGB 10bit color component FBConfig as its best match. Subsequent glXCreatePbuffer
and glXCreateGLXPixmap
calls fail.
This bugs seems to occur in Mesa >= 18.0.0 using allow_rgb10_configs, which is the default now. While the 10 bit color components are not listed for on-screen GLX.GLX_WINDOW_BIT
GLX_DRAWABLE_TYPE
s, they are listed for above mentioned off-screen types without XVisualInfo
reference.
This quirk disables using any color component > 8 bit for GLX_PBUFFER_BIT
and GLX_PIXMAP_BIT
types and forces using an optional given GLCapabilitiesChooser
or the DefaultGLCapabilitiesChooser
.
Note: Also implies DontChooseFBConfigBestMatch
for GLX_PBUFFER_BIT
and GLX_PIXMAP_BIT
types.
Definition at line 537 of file GLRendererQuirks.java.
|
static |
No 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)
Appears on:
Definition at line 455 of file GLRendererQuirks.java.
|
static |
On Windows no double buffered bitmaps are guaranteed to be available.
Definition at line 102 of file GLRendererQuirks.java.
|
static |
Crashes XServer when using double buffered PBuffer with hardware GL_RENDERER on Mesa < 18.2.2:
For now, it is safe to disable it w/ hw-acceleration.
Definition at line 99 of file GLRendererQuirks.java.
|
static |
No FBO support at all.
This quirk currently exist to be injected by the user via the properties only, see GLRendererQuirks.Override
.
Definition at line 493 of file GLRendererQuirks.java.
|
static |
No full FBO support, i.e.
not compliant w/
. Drivers known exposing such bug:
Note: Also enabled via BuggyColorRenderbuffer
.
Definition at line 238 of file GLRendererQuirks.java.
|
static |
No reliable MSAA / FSAA multi
sampling
available, i.e.
driver may crash.
Appears on:
TODO: We have to determine the exact version range, i.e. not adding the quirk with fixed driver version!
TODO: Since we currently don't handle this quirk internally, a user may need to do the following:
final AbstractGraphicsDevice adevice = GLDrawableFactory.getDesktopFactory(); // or similar if( GLRendererQuirks.existStickyDeviceQuirk(adevice, GLRendererQuirks.NoMultiSamplingBuffers) ) { // don't use MSAA }
Definition at line 356 of file GLRendererQuirks.java.
|
static |
No offscreen bitmap available, currently true for JOGL's OSX implementation.
Definition at line 108 of file GLRendererQuirks.java.
|
static |
No 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:
Definition at line 399 of file GLRendererQuirks.java.
|
static |
Crashes application when trying to set EGL swap interval on Android 4.0.3 / Pandaboard ES / PowerVR SGX 540.
Definition at line 105 of file GLRendererQuirks.java.
|
static |
SIGSEGV on setSwapInterval() after changing the context's drawable w/ Mesa >= 8.0.4 until Mesa < 18.2.2: dri2SetSwapInterval/DRI2 (soft & intel)
Definition at line 111 of file GLRendererQuirks.java.
|
static |
No 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:
Definition at line 484 of file GLRendererQuirks.java.
|
static |
Bug 948 - NVIDIA 331.38 (Linux X11) EGL impl.
only supports one EGL Device via EGL#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:
Platform.CPUFamily#X86
Definition at line 334 of file GLRendererQuirks.java.