aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/com')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/FBObject.java15
-rw-r--r--src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java42
2 files changed, 45 insertions, 12 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/FBObject.java b/src/jogl/classes/com/jogamp/opengl/FBObject.java
index 6f2ac3e35..7060bb7d1 100644
--- a/src/jogl/classes/com/jogamp/opengl/FBObject.java
+++ b/src/jogl/classes/com/jogamp/opengl/FBObject.java
@@ -60,7 +60,6 @@ import com.jogamp.opengl.FBObject.Attachment.Type;
*/
public class FBObject {
protected static final boolean DEBUG = Debug.debug("FBObject");
- private static final boolean forceMinimumFBOSupport = Debug.isPropertyDefined("jogl.fbo.force.min", true);
private static final boolean FBOResizeQuirk = false;
private static enum DetachAction { NONE, DISPOSE, RECREATE };
@@ -813,6 +812,7 @@ public class FBObject {
maxColorAttachments = 1;
if( fullFBOSupport || NV_fbo_color_attachments ) {
try {
+ val[0] = 0;
gl.glGetIntegerv(GL2ES2.GL_MAX_COLOR_ATTACHMENTS, val, 0);
realMaxColorAttachments = 1 <= val[0] ? val[0] : 1; // cap minimum to 1
} catch (GLException gle) { gle.printStackTrace(); }
@@ -823,15 +823,10 @@ public class FBObject {
colorAttachmentCount = 0;
maxSamples = gl.getMaxRenderbufferSamples();
- if(!forceMinimumFBOSupport) {
- gl.glGetIntegerv(GL.GL_MAX_TEXTURE_SIZE, val, 0);
- maxTextureSize = val[0];
- gl.glGetIntegerv(GL.GL_MAX_RENDERBUFFER_SIZE, val, 0);
- maxRenderbufferSize = val[0];
- } else {
- maxTextureSize = 2048;
- maxRenderbufferSize = 2048;
- }
+ gl.glGetIntegerv(GL.GL_MAX_TEXTURE_SIZE, val, 0);
+ maxTextureSize = val[0];
+ gl.glGetIntegerv(GL.GL_MAX_RENDERBUFFER_SIZE, val, 0);
+ maxRenderbufferSize = val[0];
checkPreGLError(gl);
diff --git a/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java b/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java
index 78bd62e42..36893f5ec 100644
--- a/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java
+++ b/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java
@@ -27,6 +27,8 @@
*/
package com.jogamp.opengl;
+import java.util.List;
+
/**
* GLRendererQuirks contains information of known bugs of various GL renderer.
* This information allows us to workaround them.
@@ -151,14 +153,36 @@ public class GLRendererQuirks {
*/
public static final int NeedCurrCtx4ARBCreateContext = 10;
+ /**
+ * No full FBO support, i.e. not compliant w/
+ * <ul>
+ * <li>GL_ARB_framebuffer_object</li>
+ * <li>EXT_framebuffer_object</li>
+ * <li>EXT_framebuffer_multisample</li>
+ * <li>EXT_framebuffer_blit</li>
+ * <li>EXT_packed_depth_stencil</li>
+ * </ul>.
+ * Drivers known exposing such bug:
+ * <ul>
+ * <li>Mesa <i>7.12-devel</i> on Windows with VMware <i>SVGA3D</i> renderer:
+ * <ul>
+ * <li>GL_VERSION: <i>2.1 Mesa 7.12-devel (git-d6c318e)</i> </li>
+ * <li>GL_RENDERER: <i>Gallium 0.4 on SVGA3D; build: RELEASE;</i> </li>
+ * </ul></li>
+ * </ul>
+ * Quirk can also be enabled via property: <code>jogl.fbo.force.min</code>.
+ */
+ public static final int NoFullFBOSupport = 11;
+
/** Number of quirks known. */
- public static final int COUNT = 11;
+ public static final int COUNT = 12;
private static final String[] _names = new String[] { "NoDoubleBufferedPBuffer", "NoDoubleBufferedBitmap", "NoSetSwapInterval",
"NoOffscreenBitmap", "NoSetSwapIntervalPostRetarget", "GLSLBuggyDiscard",
"GLNonCompliant", "GLFlushBeforeRelease", "DontCloseX11Display",
- "NeedCurrCtx4ARBPixFmtQueries", "NeedCurrCtx4ARBCreateContext"
+ "NeedCurrCtx4ARBPixFmtQueries", "NeedCurrCtx4ARBCreateContext",
+ "NoFullFBOSupport"
};
private final int _bitmask;
@@ -183,6 +207,20 @@ public class GLRendererQuirks {
}
/**
+ * @param quirks a list of valid quirks
+ * @throws IllegalArgumentException if one of the quirks is out of range
+ */
+ public GLRendererQuirks(List<Integer> quirks) throws IllegalArgumentException {
+ int bitmask = 0;
+ for(int i=0; i<quirks.size(); i++) {
+ final int quirk = quirks.get(i);
+ validateQuirk(quirk);
+ bitmask |= 1 << quirk;
+ }
+ _bitmask = bitmask;
+ }
+
+ /**
* @param quirk the quirk to be tested
* @return true if quirk exist, otherwise false
* @throws IllegalArgumentException if quirk is out of range