diff options
author | Sven Gothel <[email protected]> | 2019-08-21 02:19:20 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2019-08-21 02:19:20 +0200 |
commit | 209bb2f0dc3418d168dc6887802bf4368b6d6f4e (patch) | |
tree | fec0d342d2346d66eb4ee91c98b7b95e04c2e861 /src/jogl/classes/jogamp | |
parent | 1f0d7d4b416521ef56fdc81b28d128c7f3279188 (diff) |
Bug 1384: Allow GLRendererQuirks to be overridden by user properties
Allow GLRendererQuirks to be overridden by user properties,
allowing to either force (inject) a quirk by a user property
or to ignore a quirk by a user property.
This helps:
- debugging certain quirk behavior (See Bug 1383)
- allowing a user to customize the quirk setting
+++
This patch also refines the quirk: GLNonCompliant -> GL3CompatNonCompliant,
i.e. constraints its semantics to GL3 compatible context.
+++
This patch also removed useless code of GLRendererQuirk,
i.e. the 'int[] quirk' array arguments which are nonsense
or wasteful, as we operate with bitmasks.
Diffstat (limited to 'src/jogl/classes/jogamp')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/GLContextImpl.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLContextImpl.java b/src/jogl/classes/jogamp/opengl/GLContextImpl.java index 84c62b95d..35c3eb266 100644 --- a/src/jogl/classes/jogamp/opengl/GLContextImpl.java +++ b/src/jogl/classes/jogamp/opengl/GLContextImpl.java @@ -1928,9 +1928,12 @@ public abstract class GLContextImpl extends GLContext { reqGLVersion.getMajor(), reqGLVersion.getMinor(), reqCtxProfileBits, major, minor, ctxProfileBits, vendorVersion, withinGLVersionsMapping); - if( strictMatch && glRendererQuirks.exist(GLRendererQuirks.GLNonCompliant) ) { + if( strictMatch && glRendererQuirks.exist(GLRendererQuirks.GL3CompatNonCompliant) && + 0 != ( ctxProfileBits & GLContext.CTX_PROFILE_COMPAT) && (major > 3 || (major == 3 && minor >= 1)) + ) + { if(DEBUG) { - System.err.println(getThreadName() + ": GLContext.setGLFuncAvail.X: FAIL, GL is not compliant: "+GLContext.getGLVersion(major, minor, ctxProfileBits, glVersion)+", "+glRenderer); + System.err.println(getThreadName() + ": GLContext.setGLFuncAvail.X: FAIL, compat GL3 is not compliant: "+GLContext.getGLVersion(major, minor, ctxProfileBits, glVersion)+", "+glRenderer); } return false; } @@ -2378,7 +2381,7 @@ public abstract class GLContextImpl extends GLContext { } if (compatCtx && (major > 3 || (major == 3 && minor >= 1))) { // FIXME: Apply vendor version constraints! - final int quirk = GLRendererQuirks.GLNonCompliant; + final int quirk = GLRendererQuirks.GL3CompatNonCompliant; if(DEBUG) { System.err.println("Quirk: "+GLRendererQuirks.toString(quirk)+": cause: Renderer " + glRenderer); } |