From c0c5fac5301f7264cfdd69117c1f85adfdc7b604 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 22 Sep 2014 23:22:57 +0200 Subject: Fix GLContextImpl.setRendererQuirks(..) CTX_IMPL_ACCEL_SOFT profile state - GLContextImpl.setRendererQuirks(..) in called in GLContextImpl.setGLFunctionAvailability(..) - GLContextImpl.setRendererQuirks(..) was called before fixing CTX_IMPL_ACCEL_SOFT via isCurrentContextHardwareRasterizer(). The latter set CTX_IMPL_ACCEL_SOFT based on known software renderer string within GL_RENDERER. This lead to incorrect hwAccel assumption and hence wrong setting of GLRendererQuirks: - NoDoubleBufferedPBuffer (was selected even w/ later CTX_IMPL_ACCEL_SOFT) - BuggyColorRenderbuffer (was never selected) - Fix performs GLContextImpl.setRendererQuirks(..) _after_ fixing CTX_IMPL_ACCEL_SOFT via isCurrentContextHardwareRasterizer(). --- src/jogl/classes/jogamp/opengl/GLContextImpl.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/jogl/classes/jogamp/opengl/GLContextImpl.java') diff --git a/src/jogl/classes/jogamp/opengl/GLContextImpl.java b/src/jogl/classes/jogamp/opengl/GLContextImpl.java index 6239103da..01478a422 100644 --- a/src/jogl/classes/jogamp/opengl/GLContextImpl.java +++ b/src/jogl/classes/jogamp/opengl/GLContextImpl.java @@ -1607,6 +1607,10 @@ public abstract class GLContextImpl extends GLContext { ctxProfileBits &= ~ ( GLContext.CTX_IMPL_ES2_COMPAT | GLContext.CTX_IMPL_ES3_COMPAT ) ; } + if(!isCurrentContextHardwareRasterizer()) { + ctxProfileBits |= GLContext.CTX_IMPL_ACCEL_SOFT; + } + final VersionNumberString vendorVersion = GLVersionNumber.createVendorVersion(glVersion); setRendererQuirks(adevice, getDrawableImpl().getFactoryImpl(), @@ -1620,10 +1624,6 @@ public abstract class GLContextImpl extends GLContext { return false; } - if(!isCurrentContextHardwareRasterizer()) { - ctxProfileBits |= GLContext.CTX_IMPL_ACCEL_SOFT; - } - contextFQN = getContextFQN(adevice, major, minor, ctxProfileBits); if (DEBUG) { System.err.println(getThreadName() + ": GLContext.setGLFuncAvail.0 validated FQN: "+contextFQN+" - "+GLContext.getGLVersion(major, minor, ctxProfileBits, glVersion)); -- cgit v1.2.3