Skip to content

Commit

Permalink
Fix of the bug 1078
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien Gouesse committed Oct 1, 2014
1 parent 39cd0df commit 99f91f8
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 4 deletions.
20 changes: 18 additions & 2 deletions src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java
Expand Up @@ -340,17 +340,33 @@ public class GLRendererQuirks {
* </p>
*/
public static final int BuggyColorRenderbuffer = 18;

/**
* Some Intel drivers under Windows wrongly claims to support pbuffers
* with accumulation buffers. Then, the creation of a pbuffer fails:
* javax.media.opengl.GLException: pbuffer creation error: Couldn't find a suitable pixel format
* <p>
* Appears on:
* <ul>
* <li>GL_VENDOR Intel</li>
* <li>GL_RENDERER Intel Bear Lake B</li>
* <li>GL_VERSION 1.4.0 - Build 8.14.10.1930</li>
* </ul>
*
* </p>
*/
public static final int NoPBufferWithAccum = 19;

/** Return the number of known quirks. */
public static final int getCount() { return 19; }
public static final int getCount() { return 20; }

private static final String[] _names = new String[] { "NoDoubleBufferedPBuffer", "NoDoubleBufferedBitmap", "NoSetSwapInterval",
"NoOffscreenBitmap", "NoSetSwapIntervalPostRetarget", "GLSLBuggyDiscard",
"GLNonCompliant", "GLFlushBeforeRelease", "DontCloseX11Display",
"NeedCurrCtx4ARBPixFmtQueries", "NeedCurrCtx4ARBCreateContext",
"NoFullFBOSupport", "GLSLNonCompliant", "GL4NeedsGL3Request",
"GLSharedContextBuggy", "GLES3ViaEGLES2Config", "SingletonEGLDisplayOnly",
"NoMultiSamplingBuffers", "BuggyColorRenderbuffer"
"NoMultiSamplingBuffers", "BuggyColorRenderbuffer", "NoPBufferWithAccum"
};

private static final IdentityHashMap<String, GLRendererQuirks> stickyDeviceQuirks = new IdentityHashMap<String, GLRendererQuirks>();
Expand Down
7 changes: 7 additions & 0 deletions src/jogl/classes/jogamp/opengl/GLContextImpl.java
Expand Up @@ -1841,6 +1841,13 @@ private final void setRendererQuirks(final AbstractGraphicsDevice adevice, final
quirks.addQuirk( quirk );
}
}
if (glVendor.equals("Intel") && glRenderer.equals("Intel Bear Lake B")) {
final int quirk = GLRendererQuirks.NoPBufferWithAccum;
if(DEBUG) {
System.err.println("Quirk: "+GLRendererQuirks.toString(quirk)+": cause: OS "+Platform.getOSType()+", [Vendor "+glVendor+" and Renderer "+glRenderer+"]");
}
quirks.addQuirk( quirk );
}
} else if( Platform.OSType.ANDROID == Platform.getOSType() ) {
//
// ANDROID
Expand Down
Expand Up @@ -50,6 +50,7 @@

import com.jogamp.common.nio.Buffers;
import com.jogamp.nativewindow.MutableGraphicsConfiguration;
import com.jogamp.opengl.GLRendererQuirks;

import jogamp.nativewindow.windows.DWM_BLURBEHIND;
import jogamp.nativewindow.windows.GDI;
Expand Down Expand Up @@ -476,10 +477,10 @@ static boolean GLCapabilities2AttribList(final GLCapabilitiesImmutable caps,
}
iattributes.put(niattribs++, WGLExt.WGL_DEPTH_BITS_ARB);
iattributes.put(niattribs++, caps.getDepthBits());
if (caps.getAccumRedBits() > 0 ||
if (!sharedResource.getRendererQuirks().exist(GLRendererQuirks.NoPBufferWithAccum) && (caps.getAccumRedBits() > 0 ||
caps.getAccumGreenBits() > 0 ||
caps.getAccumBlueBits() > 0 ||
caps.getAccumAlphaBits() > 0) {
caps.getAccumAlphaBits() > 0)) {
iattributes.put(niattribs++, WGLExt.WGL_ACCUM_BITS_ARB);
iattributes.put(niattribs++, ( caps.getAccumRedBits() +
caps.getAccumGreenBits() +
Expand Down

0 comments on commit 99f91f8

Please sign in to comment.