aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-10-24 17:45:18 +0200
committerSven Gothel <[email protected]>2014-10-24 17:45:18 +0200
commit9e3843bf51b1e297eba181b9c5e15a0da8614e7b (patch)
tree36af2a91b0b264af4507f8946e4750cb3a941c63 /src
parente2d7816823039fc75be809d64b88a3d3af9cdca8 (diff)
parent1e039b27aa1c036f663091d1018c3c15b259b80d (diff)
Merge pull request #85 from gouessej/master
Skips ARB_create_context with ATI Radeon 3100 (see the bug 1038)
Diffstat (limited to 'src')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java28
-rw-r--r--src/jogl/classes/jogamp/opengl/GLContextImpl.java11
-rw-r--r--src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java2
3 files changed, 38 insertions, 3 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java b/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java
index 7b5e6b8f1..e4cd5c5d9 100644
--- a/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java
+++ b/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java
@@ -394,9 +394,33 @@ public class GLRendererQuirks {
* </p>
*/
public static final int NeedSharedObjectSync = 20;
+
+ /**
+ * No reliable ARB_create_context implementation,
+ * even if driver claims otherwise.
+ * <p>
+ * Some drivers wrongly claim to support ARB_create_context.
+ * However, the creation of such context fails:
+ * <pre>
+ * javax.media.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
+ * </pre>
+ * </p>
+ * <p>
+ * Appears on:
+ * <ul>
+ * <li>GL_VENDOR ATI Technologies Inc.</li>
+ * <li>GL_RENDERER ATI Radeon 3100 Graphics</li>
+ * <li>GL_VERSION 2.1.8787</li>
+ * <li>Platform Windows</li>
+ * </ul>
+ * </p>
+ */
+ public static final int NoARBCreateContext = 21;
/** Return the number of known quirks. */
- public static final int getCount() { return 21; }
+ public static final int getCount() { return 22; }
private static final String[] _names = new String[] { "NoDoubleBufferedPBuffer", "NoDoubleBufferedBitmap", "NoSetSwapInterval",
"NoOffscreenBitmap", "NoSetSwapIntervalPostRetarget", "GLSLBuggyDiscard",
@@ -405,7 +429,7 @@ public class GLRendererQuirks {
"NoFullFBOSupport", "GLSLNonCompliant", "GL4NeedsGL3Request",
"GLSharedContextBuggy", "GLES3ViaEGLES2Config", "SingletonEGLDisplayOnly",
"NoMultiSamplingBuffers", "BuggyColorRenderbuffer", "NoPBufferWithAccum",
- "NeedSharedObjectSync"
+ "NeedSharedObjectSync", "NoARBCreateContext"
};
private static final IdentityHashMap<String, GLRendererQuirks> stickyDeviceQuirks = new IdentityHashMap<String, GLRendererQuirks>();
diff --git a/src/jogl/classes/jogamp/opengl/GLContextImpl.java b/src/jogl/classes/jogamp/opengl/GLContextImpl.java
index 45a4f2426..a44075e90 100644
--- a/src/jogl/classes/jogamp/opengl/GLContextImpl.java
+++ b/src/jogl/classes/jogamp/opengl/GLContextImpl.java
@@ -1851,6 +1851,17 @@ public abstract class GLContextImpl extends GLContext {
}
quirks.addQuirk( quirk );
}
+
+ if ( vendorVersion.compareTo(VersionNumberString.zeroVersion) == 0 ) {
+ final VersionNumber glVersionNumber = new VersionNumber(glVersion);
+ if ( glVersionNumber.getSub() <= 8787 && glRenderer.equals("ATI Radeon 3100 Graphics") ) { // "old" driver -> sub-minor = vendor version
+ final int quirk = GLRendererQuirks.NoARBCreateContext;
+ if(DEBUG) {
+ System.err.println("Quirk: "+GLRendererQuirks.toString(quirk)+": cause: OS "+Platform.getOSType()+", [Vendor "+glVendor+", Renderer "+glRenderer+" and Version "+glVersion+"]");
+ }
+ quirks.addQuirk( quirk );
+ }
+ }
} else if( isDriverIntel && glRenderer.equals("Intel Bear Lake B") ) {
final int quirk = GLRendererQuirks.NoPBufferWithAccum;
if(DEBUG) {
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java
index 33980d663..ebd107c47 100644
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java
+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLContext.java
@@ -331,7 +331,7 @@ public class WindowsWGLContext extends GLContextImpl {
isProcCreateContextAttribsARBAvailable = false;
isExtARBCreateContextAvailable = false;
}
- if ( isProcCreateContextAttribsARBAvailable && isExtARBCreateContextAvailable && !GLProfile.disableOpenGLARBContext ) {
+ if ( isProcCreateContextAttribsARBAvailable && isExtARBCreateContextAvailable && !GLProfile.disableOpenGLARBContext && !getRendererQuirks().exist( GLRendererQuirks.NoARBCreateContext ) ) {
// initial ARB context creation
contextHandle = createContextARB(shareWithHandle, true);
createContextARBTried=true;