summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--make/scripts/tests.sh19
-rw-r--r--src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java48
-rw-r--r--src/jogl/classes/jogamp/opengl/GLContextImpl.java10
-rw-r--r--src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java88
-rw-r--r--src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java8
-rw-r--r--src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java30
-rw-r--r--src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfiguration.java4
-rw-r--r--src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfigurationFactory.java52
-rw-r--r--src/jogl/classes/jogamp/opengl/x11/glx/X11PbufferGLXDrawable.java4
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile01NEWT.java28
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile03NEWTOffscreen.java88
11 files changed, 272 insertions, 107 deletions
diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh
index c1b2459d2..95917b7b5 100644
--- a/make/scripts/tests.sh
+++ b/make/scripts/tests.sh
@@ -106,6 +106,9 @@ function jrun() {
#D_ARGS="-Djogl.debug.DebugGL -Djogl.debug.TraceGL"
#D_ARGS="-Djogl.debug.DebugGL -Djogl.debug.TraceGL -Dnativewindow.debug=all -Djogl.debug=all -Dnewt.debug=all"
#D_ARGS="-Djogl.debug.GLProfile -Djogl.debug.GLContext -Djogl.quirks.force=GL3CompatNonCompliant,NoSurfacelessCtx -Djogl.disable.opengles"
+ #D_ARGS="-Djogl.quirks.force=NoDoubleBufferedPBuffer"
+ D_ARGS="-Dnativewindow.debug.GraphicsConfiguration"
+ #D_ARGS="-Djogamp.common.utils.locks.Lock.timeout=600000"
#D_ARGS="-Djogamp.debug=all"
#D_ARGS="-Dnativewindow.debug=all"
@@ -116,8 +119,8 @@ function jrun() {
#D_ARGS="-Djogl.debug=all -Dnativewindow.debug=all"
#D_ARGS="-Djogamp.debug=all -Dnativewindow.debug=all -Djogl.debug=all -Dnewt.debug=all"
- D_ARGS="-Dnativewindow.debug.JAWT -Djogamp.debug.UnsafeUtil"
- X_ARGS="--illegal-access=warn"
+ #D_ARGS="-Dnativewindow.debug.JAWT -Djogamp.debug.UnsafeUtil"
+ #X_ARGS="--illegal-access=warn"
#D_ARGS="-Djogamp.debug.NativeLibrary=true -Djogamp.debug.JNILibLoader=true"
#D_ARGS="-Djogl.debug.GLContext -Djogamp.debug.NativeLibrary -Djogamp.debug.JNILibLoader -Djogl.debug.DebugGL -Djogl.debug.GLDebugMessageHandler"
#D_ARGS="-Djogamp.debug.ProcAddressHelper -Djogamp.debug.NativeLibrary -Djogamp.debug.NativeLibrary.Lookup -Djogamp.debug.JNILibLoader -Djogl.debug.GLContext"
@@ -947,9 +950,17 @@ function testawtswt() {
#testawt com.jogamp.opengl.test.junit.jogl.demos.gl2.awt.TestGearsAWT $*
#testawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting01dAWT $*
-#linux Mesa/AMD:
+# Linux Mesa/AMD:
#testnoawt com.jogamp.opengl.test.junit.jogl.util.texture.TestGLReadBufferUtilTextureIOWrite01NEWT $*
-testnoawt com.jogamp.opengl.test.junit.jogl.util.texture.TestBug817GLReadBufferUtilGLCTXDefFormatTypeES2NEWT $*
+#testnoawt com.jogamp.opengl.test.junit.jogl.util.texture.TestBug817GLReadBufferUtilGLCTXDefFormatTypeES2NEWT $*
+#testawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting01aAWT $*
+#testawt com.jogamp.opengl.test.junit.newt.parenting.TestParenting01dAWT $*
+
+# Linux Mesa/Soft
+#testnoawt com.jogamp.opengl.test.junit.jogl.math.TestPMVMatrix01NEWT $*
+#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestGLProfile01NEWT $*
+testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestGLProfile03NEWTOffscreen $*
+#testnoawt com.jogamp.opengl.test.junit.jogl.acore.TestMainVersionGLWindowNEWT $*
# ATI/Linux: XCB Unknown request in queue while dequeuing
# Most likely this is a multi-threaded client and XInitThreads has not been called
diff --git a/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java b/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java
index 6f0aa2186..c62a7d298 100644
--- a/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java
+++ b/src/jogl/classes/com/jogamp/opengl/GLRendererQuirks.java
@@ -491,8 +491,52 @@ public class GLRendererQuirks {
*/
public static final int NoFBOSupport = 23;
+ /**
+ * Don't use the ChooseFBConfig's best match,
+ * instead utilize the given {@link GLCapabilitiesChooser} or {@link DefaultGLCapabilitiesChooser}
+ * without any recommendation.
+ * <p>
+ * The default behavior without this quirk is using a given {@link GLCapabilitiesChooser}
+ * and pass the ChooseFBConfig's best match as a recommendation.
+ * </p>
+ * <p>
+ * This quirk currently exist to be injected by the user via the properties,
+ * see {@link GLRendererQuirks.Override}.
+ * </p>
+ */
+ public static final int DontChooseFBConfigBestMatch = 24;
+
+ /**
+ * On Mesa >= 18.0.0, {@code glXChooseFBConfig} selects <i>better</i>
+ * {@link GLCapabilities} FBConfig than actually supported by
+ * {@link glXCreatePbuffer} and {@code glXCreateGLXPixmap}.
+ * <p>
+ * As tested on Mesa 18.3.6, requesting an RGB 8bit color component
+ * FBConfig for {@code GLX_PBUFFER_BIT} and {@code GLX_PIXMAP_BIT} {@code GLX_DRAWABLE_TYPE}s
+ * via {@code glXChooseFBConfig} returns an RGB 10bit color component
+ * FBConfig as its best match.
+ * Subsequent {@code glXCreatePbuffer} and {@code glXCreateGLXPixmap} calls fail.
+ * </p>
+ * <p>
+ * This bugs seems to occur in Mesa >= 18.0.0 using <i>allow_rgb10_configs</i>, which is the default now.
+ * While the 10 bit color components are not listed for
+ * on-screen {@code GLX.GLX_WINDOW_BIT} {@code GLX_DRAWABLE_TYPE}s,
+ * they are listed for above mentioned off-screen types without {@code XVisualInfo} reference.
+ * </p>
+ * <p>
+ * This quirk disables using any color component > 8 bit for
+ * {@code GLX_PBUFFER_BIT} and {@code GLX_PIXMAP_BIT} types
+ * and forces using an optional given {@link GLCapabilitiesChooser}
+ * or the {@link DefaultGLCapabilitiesChooser}.
+ * </p>
+ * <p>
+ * Note: Also implies {@link #DontChooseFBConfigBestMatch} for {@code GLX_PBUFFER_BIT} and {@code GLX_PIXMAP_BIT} types.
+ * </p>
+ */
+ public static final int No10BitColorCompOffscreen = 25;
+
/** Return the number of known quirks, aka quirk bit count. */
- public static final int getCount() { return 24; }
+ public static final int getCount() { return 26; }
private static final String[] _names = new String[] { "NoDoubleBufferedPBuffer", "NoDoubleBufferedBitmap", "NoSetSwapInterval",
"NoOffscreenBitmap", "NoSetSwapIntervalPostRetarget", "GLSLBuggyDiscard",
@@ -502,7 +546,7 @@ public class GLRendererQuirks {
"GLSharedContextBuggy", "GLES3ViaEGLES2Config", "SingletonEGLDisplayOnly",
"NoMultiSamplingBuffers", "BuggyColorRenderbuffer", "NoPBufferWithAccum",
"NeedSharedObjectSync", "NoARBCreateContext", "NoSurfacelessCtx",
- "NoFBOSupport"
+ "NoFBOSupport", "DontChooseFBConfigBestMatch", "No10BitColorCompOffscreen"
};
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 443e2d6af..0b1214720 100644
--- a/src/jogl/classes/jogamp/opengl/GLContextImpl.java
+++ b/src/jogl/classes/jogamp/opengl/GLContextImpl.java
@@ -2435,6 +2435,7 @@ public abstract class GLContextImpl extends GLContext {
if( isDriverMesa ) {
final VersionNumber mesaSafeFBOVersion = new VersionNumber(8, 0, 0);
final VersionNumber mesaIntelBuggySharedCtx921 = new VersionNumber(9, 2, 1);
+ final VersionNumber mesaNo10BitColorCompPBuffer = new VersionNumber(18, 0, 0); // Mesa 18.0.0
final VersionNumber mesaSafeGL3Compat = new VersionNumber(18, 2, 0); // Mesa 18.2.0
final VersionNumber mesaSafeDoubleBufferedPBuffer = new VersionNumber(18, 2, 2); // Mesa 18.2.2
final VersionNumber mesaSafeSetSwapIntervalPostRetarget = mesaSafeDoubleBufferedPBuffer; // Mesa 18.2.2
@@ -2442,7 +2443,14 @@ public abstract class GLContextImpl extends GLContext {
if( vendorVersion.compareTo(mesaSafeSetSwapIntervalPostRetarget) < 0 ) {
final int quirk = GLRendererQuirks.NoSetSwapIntervalPostRetarget;
if(DEBUG) {
- System.err.println("Quirk: "+GLRendererQuirks.toString(quirk)+": cause: Renderer " + glRenderer);
+ System.err.println("Quirk: "+GLRendererQuirks.toString(quirk)+": cause: Renderer " + glRenderer + " / Mesa-Version "+vendorVersion);
+ }
+ quirks.addQuirk( quirk );
+ }
+ if( vendorVersion.compareTo(mesaNo10BitColorCompPBuffer) >= 0 ) { // FIXME: When is it fixed ??
+ final int quirk = GLRendererQuirks.No10BitColorCompOffscreen;
+ if(DEBUG) {
+ System.err.println("Quirks: "+GLRendererQuirks.toString(quirk)+": cause: Renderer " + glRenderer + " / Mesa-Version "+vendorVersion);
}
quirks.addQuirk( quirk );
}
diff --git a/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java
index 5505fed52..98d16a0d2 100644
--- a/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java
+++ b/src/jogl/classes/jogamp/opengl/egl/EGLGraphicsConfigurationFactory.java
@@ -43,13 +43,16 @@ import com.jogamp.nativewindow.AbstractGraphicsConfiguration;
import com.jogamp.nativewindow.AbstractGraphicsDevice;
import com.jogamp.nativewindow.AbstractGraphicsScreen;
import com.jogamp.nativewindow.CapabilitiesChooser;
+import com.jogamp.nativewindow.CapabilitiesFilter;
import com.jogamp.nativewindow.CapabilitiesImmutable;
import com.jogamp.nativewindow.GraphicsConfigurationFactory;
import com.jogamp.nativewindow.NativeWindowFactory;
import com.jogamp.nativewindow.VisualIDHolder;
+import com.jogamp.nativewindow.CapabilitiesFilter.RemovalCriteria;
import com.jogamp.nativewindow.VisualIDHolder.VIDType;
import com.jogamp.opengl.GLCapabilities;
import com.jogamp.opengl.GLCapabilitiesChooser;
+import com.jogamp.opengl.GLCapabilitiesFilter;
import com.jogamp.opengl.GLCapabilitiesImmutable;
import com.jogamp.opengl.GLContext;
import com.jogamp.opengl.GLDrawableFactory;
@@ -331,8 +334,9 @@ public class EGLGraphicsConfigurationFactory extends GLGraphicsConfigurationFact
final int nativeVisualID, final boolean forceTransparentFlag) {
final long eglDisplay = device.getHandle();
final GLProfile glp = capsChosen.getGLProfile();
+ final GLRendererQuirks glrq = GLDrawableFactory.getEGLFactory().getRendererQuirks(device, glp);
final int winattrmask = GLGraphicsConfigurationUtil.getExclusiveWinAttributeBits(capsChosen);
- List<GLCapabilitiesImmutable> availableCaps = null;
+ ArrayList<GLCapabilitiesImmutable> availableCaps = null;
int recommendedIndex = -1;
final IntBuffer numConfigs = Buffers.newDirectIntBuffer(1);
@@ -375,25 +379,33 @@ public class EGLGraphicsConfigurationFactory extends GLGraphicsConfigurationFact
}
hasEGLChosenCaps = false;
}
- final boolean useRecommendedIndex = hasEGLChosenCaps && !forceTransparentFlag && capsChosen.isBackgroundOpaque(); // only use recommended idx if not translucent
- final boolean skipCapsChooser = null == chooser && useRecommendedIndex; // fast path: skip choosing if using recommended idx and null chooser is used
+ final boolean isPBufferOrBitmap = capsChosen.isBitmap() || capsChosen.isPBuffer();
+ final boolean dontChooseFBConfigBestMatch = GLRendererQuirks.exist(glrq, GLRendererQuirks.DontChooseFBConfigBestMatch) ||
+ ( isPBufferOrBitmap && GLRendererQuirks.exist(glrq, GLRendererQuirks.No10BitColorCompOffscreen) );
+ final boolean useRecommendedIndex = !dontChooseFBConfigBestMatch &&
+ hasEGLChosenCaps && !forceTransparentFlag && capsChosen.isBackgroundOpaque();
+ final boolean shallSkipCapsChooser = null == chooser && useRecommendedIndex;
if( hasEGLChosenCaps ) {
- availableCaps = eglConfigs2GLCaps(device, glp, configs, numConfigs.get(0), winattrmask, forceTransparentFlag, skipCapsChooser /* onlyFirsValid */);
+ availableCaps = eglConfigs2GLCaps(device, glp, configs, numConfigs.get(0), winattrmask, forceTransparentFlag, shallSkipCapsChooser /* onlyFirsValid */);
if(availableCaps.size() > 0) {
- final long recommendedEGLConfig = configs.get(0);
- recommendedIndex = 0;
+ if( useRecommendedIndex ) {
+ recommendedIndex = 0;
+ }
if (DEBUG) {
+ final long recommendedEGLConfig = configs.get(0);
System.err.println("EGLGraphicsConfiguration.eglChooseConfig: #1 eglChooseConfig: recommended fbcfg " + toHexString(recommendedEGLConfig) + ", idx " + recommendedIndex);
- System.err.println("EGLGraphicsConfiguration.eglChooseConfig: #1 useRecommendedIndex "+useRecommendedIndex+", skipCapsChooser "+skipCapsChooser);
- System.err.println("EGLGraphicsConfiguration.eglChooseConfig: #1 fbcfg caps " + availableCaps.get(recommendedIndex));
+ System.err.println("EGLGraphicsConfiguration.eglChooseConfig: #1 useRecommendedIndex "+useRecommendedIndex+", shallSkipCapsChooser "+shallSkipCapsChooser);
+ if( 0 <= recommendedIndex ) {
+ System.err.println("EGLGraphicsConfiguration.eglChooseConfig: #1 fbcfg recommended caps " + availableCaps.get(recommendedIndex));
+ }
}
} else if (DEBUG) {
System.err.println("EGLGraphicsConfiguration.eglChooseConfig: #1 eglChooseConfig: no caps for recommended fbcfg " + toHexString(configs.get(0)));
- System.err.println("EGLGraphicsConfiguration.eglChooseConfig: #1 useRecommendedIndex "+useRecommendedIndex+", skipCapsChooser "+skipCapsChooser);
+ System.err.println("EGLGraphicsConfiguration.eglChooseConfig: #1 useRecommendedIndex "+useRecommendedIndex+", shallSkipCapsChooser "+shallSkipCapsChooser);
}
} else if (DEBUG) {
System.err.println("EGLGraphicsConfiguration.eglChooseConfig: #1 eglChooseConfig: no configs");
- System.err.println("EGLGraphicsConfiguration.eglChooseConfig: #1 useRecommendedIndex "+useRecommendedIndex+", skipCapsChooser "+skipCapsChooser);
+ System.err.println("EGLGraphicsConfiguration.eglChooseConfig: #1 useRecommendedIndex "+useRecommendedIndex+", shallSkipCapsChooser "+shallSkipCapsChooser);
}
// 2nd choice: get all GLCapabilities available, no preferred recommendedIndex available
@@ -419,43 +431,47 @@ public class EGLGraphicsConfigurationFactory extends GLGraphicsConfigurationFact
return null;
}
+ final boolean skipCapsChooser = shallSkipCapsChooser && 0 <= recommendedIndex;
if(DEBUG) {
System.err.println("EGLGraphicsConfiguration.eglChooseConfig: got configs: "+availableCaps.size());
for(int i=0; i<availableCaps.size(); i++) {
System.err.println(i+": "+availableCaps.get(i));
}
}
-
- if( VisualIDHolder.VID_UNDEFINED != nativeVisualID ) { // implies !hasEGLChosenCaps
- final List<GLCapabilitiesImmutable> removedCaps = new ArrayList<GLCapabilitiesImmutable>();
- for(int i=0; i<availableCaps.size(); ) {
- final GLCapabilitiesImmutable aCap = availableCaps.get(i);
- if(aCap.getVisualID(VIDType.NATIVE) != nativeVisualID) {
- if(DEBUG) { System.err.println("Remove["+i+"] (mismatch VisualID): "+aCap); }
- removedCaps.add(availableCaps.remove(i));
- } else if( 0 == aCap.getDepthBits() && 0 < capsChosen.getDepthBits() ) {
- // Hack for HiSilicon/Vivante/Immersion.16 Renderer ..
- if(DEBUG) { System.err.println("Remove["+i+"] (mismatch depth-bits): "+aCap); }
- removedCaps.add(availableCaps.remove(i));
- } else {
- i++;
- }
+ // Filter availableCaps
+ {
+ final ArrayList<RemovalCriteria<GLCapabilitiesImmutable>> criteria = new ArrayList<RemovalCriteria<GLCapabilitiesImmutable>>();
+ if( !skipCapsChooser && isPBufferOrBitmap && GLRendererQuirks.exist(glrq, GLRendererQuirks.No10BitColorCompOffscreen) ) {
+ criteria.add(new CapabilitiesFilter.RemoveMoreColorCompBits<GLCapabilitiesImmutable>(8));
}
- if(0==availableCaps.size()) {
- availableCaps = removedCaps;
- if(DEBUG) {
- System.err.println("EGLGraphicsConfiguration.eglChooseConfig: post filter nativeVisualID "+toHexString(nativeVisualID)+" no config found, revert to all");
+ if( VisualIDHolder.VID_UNDEFINED != nativeVisualID) {
+ criteria.add(new CapabilitiesFilter.RemoveUnmatchedNativeVisualID<GLCapabilitiesImmutable>(nativeVisualID));
+ }
+ if( 0 < capsChosen.getDepthBits() ) {
+ // Hack for HiSilicon/Vivante/Immersion.16 Renderer ..
+ criteria.add(new GLCapabilitiesFilter.RemoveLessDepthBits<GLCapabilitiesImmutable>(1));
+ }
+ if( criteria.size() > 0 ) {
+ final ArrayList<GLCapabilitiesImmutable> removedCaps = CapabilitiesFilter.removeMatching(availableCaps, criteria);
+ if( removedCaps.size() > 0 ) {
+ if(DEBUG) {
+ System.err.println("EGLGraphicsConfiguration.eglChooseConfig: filtered configs: "+availableCaps.size());
+ for(int i=0; i<availableCaps.size(); i++) {
+ System.err.println(i+": "+availableCaps.get(i));
+ }
+ }
}
- } else if(DEBUG) {
- System.err.println("EGLGraphicsConfiguration.eglChooseConfig: post filter nativeVisualID "+toHexString(nativeVisualID)+" got configs: "+availableCaps.size());
- for(int i=0; i<availableCaps.size(); i++) {
- System.err.println(i+": "+availableCaps.get(i));
+ if(0==availableCaps.size()) {
+ availableCaps = removedCaps;
+ if(DEBUG) {
+ System.err.println("EGLGraphicsConfiguration.eglChooseConfig: post filter visualID "+toHexString(nativeVisualID )+" no config found, revert to all");
+ }
}
}
}
final int chosenIndex;
- if( skipCapsChooser && 0 <= recommendedIndex ) {
+ if( skipCapsChooser ) {
chosenIndex = recommendedIndex;
} else {
chosenIndex = chooseCapabilities(chooser, capsChosen, availableCaps, recommendedIndex);
@@ -474,9 +490,9 @@ public class EGLGraphicsConfigurationFactory extends GLGraphicsConfigurationFact
return res;
}
- static List<GLCapabilitiesImmutable> eglConfigs2GLCaps(final EGLGraphicsDevice device, final GLProfile glp, final PointerBuffer configs, final int num, final int winattrmask, final boolean forceTransparentFlag, final boolean onlyFirstValid) {
+ static ArrayList<GLCapabilitiesImmutable> eglConfigs2GLCaps(final EGLGraphicsDevice device, final GLProfile glp, final PointerBuffer configs, final int num, final int winattrmask, final boolean forceTransparentFlag, final boolean onlyFirstValid) {
final GLRendererQuirks defaultQuirks = GLRendererQuirks.getStickyDeviceQuirks( GLDrawableFactory.getEGLFactory().getDefaultDevice() );
- final List<GLCapabilitiesImmutable> bucket = new ArrayList<GLCapabilitiesImmutable>(num);
+ final ArrayList<GLCapabilitiesImmutable> bucket = new ArrayList<GLCapabilitiesImmutable>(num);
for(int i=0; i<num; i++) {
final GLCapabilitiesImmutable caps = EGLGraphicsConfiguration.EGLConfig2Capabilities(defaultQuirks, device, glp, configs.get(i), winattrmask, forceTransparentFlag);
if(null != caps) {
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java
index 4ffe6e7d1..a54584964 100644
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java
+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfiguration.java
@@ -375,10 +375,10 @@ public class WindowsWGLGraphicsConfiguration extends MutableGraphicsConfiguratio
return pformats;
}
- static List <GLCapabilitiesImmutable> wglARBPFIDs2GLCapabilities(final WindowsWGLDrawableFactory.SharedResource sharedResource,
- final AbstractGraphicsDevice device, final GLProfile glp,
- final long hdc, final int[] pfdIDs, final int winattrbits,
- final boolean onlyFirstValid) {
+ static ArrayList <GLCapabilitiesImmutable> wglARBPFIDs2GLCapabilities(final WindowsWGLDrawableFactory.SharedResource sharedResource,
+ final AbstractGraphicsDevice device, final GLProfile glp,
+ final long hdc, final int[] pfdIDs, final int winattrbits,
+ final boolean onlyFirstValid) {
if (!sharedResource.hasARBPixelFormat()) {
return null;
}
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java
index 99268f13f..c365e8734 100644
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java
+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLGraphicsConfigurationFactory.java
@@ -37,6 +37,7 @@ import com.jogamp.nativewindow.AbstractGraphicsConfiguration;
import com.jogamp.nativewindow.AbstractGraphicsDevice;
import com.jogamp.nativewindow.AbstractGraphicsScreen;
import com.jogamp.nativewindow.CapabilitiesChooser;
+import com.jogamp.nativewindow.CapabilitiesFilter;
import com.jogamp.nativewindow.DefaultGraphicsScreen;
import com.jogamp.nativewindow.GraphicsConfigurationFactory;
import com.jogamp.nativewindow.CapabilitiesImmutable;
@@ -46,6 +47,7 @@ import com.jogamp.nativewindow.ProxySurface;
import com.jogamp.nativewindow.VisualIDHolder;
import com.jogamp.opengl.GLCapabilitiesImmutable;
import com.jogamp.opengl.GLCapabilitiesChooser;
+import com.jogamp.opengl.GLCapabilitiesFilter;
import com.jogamp.opengl.GLContext;
import com.jogamp.opengl.GLDrawableFactory;
import com.jogamp.opengl.GLException;
@@ -354,6 +356,11 @@ public class WindowsWGLGraphicsConfigurationFactory extends GLGraphicsConfigurat
final int winattrbits = GLGraphicsConfigurationUtil.getExclusiveWinAttributeBits(capsChosen)
& ~GLGraphicsConfigurationUtil.BITMAP_BIT; // w/o BITMAP
final GLProfile glProfile = capsChosen.getGLProfile();
+ final GLRendererQuirks glrq = factory.getRendererQuirks(device, glProfile);
+ final boolean isPBufferOrBitmap = capsChosen.isBitmap() || capsChosen.isPBuffer();
+ final boolean dontChooseFBConfigBestMatch = GLRendererQuirks.exist(glrq, GLRendererQuirks.DontChooseFBConfigBestMatch) ||
+ ( isPBufferOrBitmap && GLRendererQuirks.exist(glrq, GLRendererQuirks.No10BitColorCompOffscreen) );
+ final boolean useRecommendedIndex = !dontChooseFBConfigBestMatch && capsChosen.isBackgroundOpaque();
final int pfdIDCount = WindowsWGLGraphicsConfiguration.wglARBPFDIDCount((WindowsWGLContext)sharedResource.getContext(), hdc);
@@ -409,7 +416,9 @@ public class WindowsWGLGraphicsConfigurationFactory extends GLGraphicsConfigurat
hdc, iattributes, accelerationMode, fattributes);
}
if (null != pformats) {
- recommendedIndex = 0;
+ if( useRecommendedIndex ) {
+ recommendedIndex = 0;
+ }
} else {
if(DEBUG) {
System.err.println("updateGraphicsConfigurationARB: wglChoosePixelFormatARB failed with: "+capsChosen);
@@ -429,9 +438,9 @@ public class WindowsWGLGraphicsConfigurationFactory extends GLGraphicsConfigurat
return false;
}
}
- final boolean skipCapsChooser = 0 <= recommendedIndex && null == chooser && capsChosen.isBackgroundOpaque(); // fast path: skip choosing if using recommended idx and null chooser is used and if not translucent
+ final boolean skipCapsChooser = 0 <= recommendedIndex && null == chooser && useRecommendedIndex;
- final List<GLCapabilitiesImmutable> availableCaps =
+ final ArrayList<GLCapabilitiesImmutable> availableCaps =
WindowsWGLGraphicsConfiguration.wglARBPFIDs2GLCapabilities(sharedResource, device, glProfile,
hdc, pformats, winattrbits, skipCapsChooser /* onlyFirstValid */);
@@ -451,6 +460,21 @@ public class WindowsWGLGraphicsConfigurationFactory extends GLGraphicsConfigurat
pformats[recommendedIndex] + ", idx " + recommendedIndex +", "+availableCaps.get(recommendedIndex));
}
}
+ if(DEBUG) {
+ System.err.println("updateGraphicsConfigurationARB: got configs: "+availableCaps.size());
+ for(int i=0; i<availableCaps.size(); i++) {
+ System.err.println(i+": "+availableCaps.get(i));
+ }
+ }
+ if( !skipCapsChooser && isPBufferOrBitmap && GLRendererQuirks.exist(glrq, GLRendererQuirks.No10BitColorCompOffscreen) ) {
+ CapabilitiesFilter.removeMoreColorComps(availableCaps, 8);
+ if(DEBUG) {
+ System.err.println("updateGraphicsConfigurationARB: filtered configs: "+availableCaps.size());
+ for(int i=0; i<availableCaps.size(); i++) {
+ System.err.println(i+": "+availableCaps.get(i));
+ }
+ }
+ }
final int chosenIndex;
if( skipCapsChooser ) {
diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfiguration.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfiguration.java
index 8f7d710cd..caff16812 100644
--- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfiguration.java
+++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfiguration.java
@@ -282,11 +282,11 @@ public class X11GLXGraphicsConfiguration extends X11GraphicsConfiguration implem
return GLXFBConfig2GLCapabilities(device, glp, fbcfg, winattrmask, isMultisampleAvailable, tmp, xRenderPictFormat);
}
- static List<GLCapabilitiesImmutable> GLXFBConfig2GLCapabilities(final X11GraphicsDevice device, final GLProfile glp, final PointerBuffer fbcfgsL,
+ static ArrayList<GLCapabilitiesImmutable> GLXFBConfig2GLCapabilities(final X11GraphicsDevice device, final GLProfile glp, final PointerBuffer fbcfgsL,
final int winattrmask, final boolean isMultisampleAvailable, final boolean onlyFirstValid) {
final IntBuffer tmp = Buffers.newDirectIntBuffer(1);
final XRenderPictFormat xRenderPictFormat= XRenderPictFormat.create();
- final List<GLCapabilitiesImmutable> result = new ArrayList<GLCapabilitiesImmutable>();
+ final ArrayList<GLCapabilitiesImmutable> result = new ArrayList<GLCapabilitiesImmutable>();
for (int i = 0; i < fbcfgsL.limit(); i++) {
final long fbcfg = fbcfgsL.get(i);
final GLCapabilitiesImmutable c = GLXFBConfig2GLCapabilities(device, glp, fbcfg, winattrmask, isMultisampleAvailable, tmp, xRenderPictFormat);
diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfigurationFactory.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfigurationFactory.java
index 4dc2d7e0b..739061bbe 100644
--- a/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfigurationFactory.java
+++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11GLXGraphicsConfigurationFactory.java
@@ -37,6 +37,7 @@ import com.jogamp.nativewindow.AbstractGraphicsConfiguration;
import com.jogamp.nativewindow.AbstractGraphicsDevice;
import com.jogamp.nativewindow.AbstractGraphicsScreen;
import com.jogamp.nativewindow.CapabilitiesChooser;
+import com.jogamp.nativewindow.CapabilitiesFilter;
import com.jogamp.nativewindow.CapabilitiesImmutable;
import com.jogamp.nativewindow.GraphicsConfigurationFactory;
import com.jogamp.nativewindow.VisualIDHolder;
@@ -44,11 +45,12 @@ import com.jogamp.nativewindow.VisualIDHolder.VIDType;
import com.jogamp.opengl.DefaultGLCapabilitiesChooser;
import com.jogamp.opengl.GLCapabilities;
import com.jogamp.opengl.GLCapabilitiesChooser;
+import com.jogamp.opengl.GLCapabilitiesFilter;
import com.jogamp.opengl.GLCapabilitiesImmutable;
import com.jogamp.opengl.GLDrawableFactory;
import com.jogamp.opengl.GLException;
import com.jogamp.opengl.GLProfile;
-
+import com.jogamp.opengl.GLRendererQuirks;
import com.jogamp.common.ExceptionUtils;
import com.jogamp.common.nio.Buffers;
import com.jogamp.common.nio.PointerBuffer;
@@ -295,7 +297,8 @@ public class X11GLXGraphicsConfigurationFactory extends GLGraphicsConfigurationF
final IntBuffer count = Buffers.newDirectIntBuffer(1);
count.put(0, -1);
final int winattrmask = GLGraphicsConfigurationUtil.getExclusiveWinAttributeBits(capsChosen);
- List<GLCapabilitiesImmutable> availableCaps;
+ final GLRendererQuirks glrq = factory.getRendererQuirks(x11Device, glProfile);
+ ArrayList<GLCapabilitiesImmutable> availableCaps;
// 1st choice: get GLCapabilities based on users GLCapabilities setting recommendedIndex as preferred choice,
// skipped if xvisualID is given
final boolean hasGLXChosenCaps;
@@ -305,21 +308,25 @@ public class X11GLXGraphicsConfigurationFactory extends GLGraphicsConfigurationF
} else {
hasGLXChosenCaps = false;
}
- final boolean useRecommendedIndex = hasGLXChosenCaps && capsChosen.isBackgroundOpaque(); // only use recommended idx if not translucent
- final boolean skipCapsChooser = null == chooser && useRecommendedIndex; // fast path: skip choosing if using recommended idx and null chooser is used
+ final boolean isPBufferOrBitmap = capsChosen.isBitmap() || capsChosen.isPBuffer();
+ final boolean dontChooseFBConfigMatch = GLRendererQuirks.exist(glrq, GLRendererQuirks.DontChooseFBConfigBestMatch) ||
+ ( isPBufferOrBitmap && GLRendererQuirks.exist(glrq, GLRendererQuirks.No10BitColorCompOffscreen) );
+ final boolean useRecommendedIndex = !dontChooseFBConfigMatch &&
+ hasGLXChosenCaps && capsChosen.isBackgroundOpaque();
+ final boolean shallSkipCapsChooser = null == chooser && useRecommendedIndex;
if (hasGLXChosenCaps) {
- availableCaps = X11GLXGraphicsConfiguration.GLXFBConfig2GLCapabilities(x11Device, glProfile, fbcfgsL, winattrmask, isMultisampleAvailable, skipCapsChooser /* onlyFirstValid */);
+ availableCaps = X11GLXGraphicsConfiguration.GLXFBConfig2GLCapabilities(x11Device, glProfile, fbcfgsL, winattrmask, isMultisampleAvailable, shallSkipCapsChooser /* onlyFirstValid */);
if(availableCaps.size() > 0) {
recommendedIndex = useRecommendedIndex ? 0 : -1;
if (DEBUG) {
System.err.println("glXChooseFBConfig recommended fbcfg " + toHexString(fbcfgsL.get(0)) + ", idx " + recommendedIndex);
- System.err.println("useRecommendedIndex "+useRecommendedIndex+", skipCapsChooser "+skipCapsChooser);
+ System.err.println("useRecommendedIndex "+useRecommendedIndex+", shallSkipCapsChooser "+shallSkipCapsChooser);
System.err.println("user caps " + capsChosen);
System.err.println("fbcfg caps " + fbcfgsL.limit()+", availCaps "+availableCaps.get(0));
}
} else if (DEBUG) {
System.err.println("glXChooseFBConfig no caps for recommended fbcfg " + toHexString(fbcfgsL.get(0)));
- System.err.println("useRecommendedIndex "+useRecommendedIndex+", skipCapsChooser "+skipCapsChooser);
+ System.err.println("useRecommendedIndex "+useRecommendedIndex+", shallSkipCapsChooser "+shallSkipCapsChooser);
System.err.println("user caps " + capsChosen);
}
} else {
@@ -340,21 +347,28 @@ public class X11GLXGraphicsConfigurationFactory extends GLGraphicsConfigurationF
}
availableCaps = X11GLXGraphicsConfiguration.GLXFBConfig2GLCapabilities(x11Device, glProfile, fbcfgsL, winattrmask, isMultisampleAvailable, false /* onlyOneValid */);
}
-
+ final boolean skipCapsChooser = shallSkipCapsChooser && 0 <= recommendedIndex;
if(DEBUG) {
System.err.println("X11GLXGraphicsConfiguration.chooseGraphicsConfigurationFBConfig: got configs: "+availableCaps.size());
for(int i=0; i<availableCaps.size(); i++) {
System.err.println(i+": "+availableCaps.get(i));
}
- }
-
- if( VisualIDHolder.VID_UNDEFINED != xvisualID ) { // implies !hasGLXChosenCaps
- for(int i=0; i<availableCaps.size(); ) {
- final VisualIDHolder vidh = availableCaps.get(i);
- if(vidh.getVisualID(VIDType.X11_XVISUAL) != xvisualID ) {
- availableCaps.remove(i);
- } else {
- i++;
+ System.err.println("recommendedIndex "+recommendedIndex+", skipCapsChooser "+skipCapsChooser);
+ }
+ // Filter availableCaps
+ {
+ final List<GLCapabilitiesImmutable> removedCaps;
+ if( !skipCapsChooser && isPBufferOrBitmap && GLRendererQuirks.exist(glrq, GLRendererQuirks.No10BitColorCompOffscreen) ) {
+ removedCaps = CapabilitiesFilter.removeMoreColorCompsAndUnmatchingNativeVisualID(availableCaps, 8, xvisualID);
+ } else {
+ removedCaps = CapabilitiesFilter.removeUnmatchingNativeVisualID(availableCaps, xvisualID);
+ }
+ if( removedCaps.size() > 0 ) {
+ if(DEBUG) {
+ System.err.println("X11GLXGraphicsConfiguration.chooseGraphicsConfigurationFBConfig: filtered configs: "+availableCaps.size());
+ for(int i=0; i<availableCaps.size(); i++) {
+ System.err.println(i+": "+availableCaps.get(i));
+ }
}
}
if(0==availableCaps.size()) {
@@ -362,13 +376,11 @@ public class X11GLXGraphicsConfigurationFactory extends GLGraphicsConfigurationF
System.err.println("X11GLXGraphicsConfiguration.chooseGraphicsConfigurationFBConfig: post filter visualID "+toHexString(xvisualID )+" no config found, failed - return null");
}
return null;
- } else if(DEBUG) {
- System.err.println("X11GLXGraphicsConfiguration.chooseGraphicsConfigurationFBConfig: post filter visualID "+toHexString(xvisualID)+" got configs: "+availableCaps.size());
}
}
final int chosenIndex;
- if( skipCapsChooser && 0 <= recommendedIndex ) {
+ if( skipCapsChooser ) {
chosenIndex = recommendedIndex;
} else {
chosenIndex = chooseCapabilities(chooser, capsChosen, availableCaps, recommendedIndex);
diff --git a/src/jogl/classes/jogamp/opengl/x11/glx/X11PbufferGLXDrawable.java b/src/jogl/classes/jogamp/opengl/x11/glx/X11PbufferGLXDrawable.java
index b961c97a2..9a95857fd 100644
--- a/src/jogl/classes/jogamp/opengl/x11/glx/X11PbufferGLXDrawable.java
+++ b/src/jogl/classes/jogamp/opengl/x11/glx/X11PbufferGLXDrawable.java
@@ -115,7 +115,9 @@ public class X11PbufferGLXDrawable extends X11GLXDrawable {
final long pbuffer = GLX.glXCreatePbuffer(display, config.getFBConfig(), iattributes);
if (pbuffer == 0) {
// FIXME: query X error code for detail error message
- throw new GLException("pbuffer creation error: glXCreatePbuffer() failed");
+ throw new GLException("pbuffer creation error: glXCreatePbuffer() failed using fbConfig 0x"+
+ Long.toHexString(config.getFBConfig())+", size "+ms.getSurfaceWidth()+"x"+ms.getSurfaceHeight()+
+ ", "+config.getChosenCapabilities());
}
// Set up instance variables
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile01NEWT.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile01NEWT.java
index f2f35012d..4326a4692 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile01NEWT.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile01NEWT.java
@@ -75,7 +75,7 @@ public class TestGLProfile01NEWT extends GLProfile0XBase {
}
@Test
- public void test02GLProfileMaxProgrammable() throws InterruptedException {
+ public void test11GLProfileMaxProgrammable() throws InterruptedException {
// Assuming at least one programmable profile is available
final GLProfile glp = GLProfile.getMaxProgrammable(true);
System.out.println("GLProfile.getMaxProgrammable(): "+glp);
@@ -84,7 +84,7 @@ public class TestGLProfile01NEWT extends GLProfile0XBase {
}
@Test
- public void test03GLProfileMaxFixedFunc() throws InterruptedException {
+ public void test22GLProfileMaxFixedFunc() throws InterruptedException {
// Assuming at least one fixed function profile is available
final GLProfile glp = GLProfile.getMaxFixedFunc(true);
System.out.println("GLProfile.getMaxFixedFunc(): "+glp);
@@ -93,7 +93,7 @@ public class TestGLProfile01NEWT extends GLProfile0XBase {
}
@Test
- public void test04GLProfileGL2ES1() throws InterruptedException {
+ public void test31GLProfileGL2ES1() throws InterruptedException {
if(!GLProfile.isAvailable(GLProfile.GL2ES1)) {
System.out.println("GLProfile GL2ES1 n/a");
return;
@@ -104,7 +104,7 @@ public class TestGLProfile01NEWT extends GLProfile0XBase {
}
@Test
- public void test05GLProfileGL2ES2() throws InterruptedException {
+ public void test32GLProfileGL2ES2() throws InterruptedException {
if(!GLProfile.isAvailable(GLProfile.GL2ES2)) {
System.out.println("GLProfile GL2ES2 n/a");
return;
@@ -115,7 +115,7 @@ public class TestGLProfile01NEWT extends GLProfile0XBase {
}
@Test
- public void test06GLProfileGL4ES3() throws InterruptedException {
+ public void test33GLProfileGL4ES3() throws InterruptedException {
if(!GLProfile.isAvailable(GLProfile.GL4ES3)) {
System.out.println("GLProfile GL4ES3 n/a");
return;
@@ -126,7 +126,7 @@ public class TestGLProfile01NEWT extends GLProfile0XBase {
}
@Test
- public void test07GLProfileGL2GL3() throws InterruptedException {
+ public void test34GLProfileGL2GL3() throws InterruptedException {
if(!GLProfile.isAvailable(GLProfile.GL2GL3)) {
System.out.println("GLProfile GL2GL3 n/a");
return;
@@ -147,42 +147,42 @@ public class TestGLProfile01NEWT extends GLProfile0XBase {
}
@Test
- public void test10_GL4bc() throws InterruptedException {
+ public void test41_GL4bc() throws InterruptedException {
testSpecificProfile(GLProfile.GL4bc);
}
@Test
- public void test11_GL3bc() throws InterruptedException {
+ public void test42_GL3bc() throws InterruptedException {
testSpecificProfile(GLProfile.GL3bc);
}
@Test
- public void test12_GL2() throws InterruptedException {
+ public void test43_GL2() throws InterruptedException {
testSpecificProfile(GLProfile.GL2);
}
@Test
- public void test13_GL4() throws InterruptedException {
+ public void test44_GL4() throws InterruptedException {
testSpecificProfile(GLProfile.GL4);
}
@Test
- public void test14_GL3() throws InterruptedException {
+ public void test45_GL3() throws InterruptedException {
testSpecificProfile(GLProfile.GL3);
}
@Test
- public void test15_GLES1() throws InterruptedException {
+ public void test46_GLES1() throws InterruptedException {
testSpecificProfile(GLProfile.GLES1);
}
@Test
- public void test16_GLES2() throws InterruptedException {
+ public void test47_GLES2() throws InterruptedException {
testSpecificProfile(GLProfile.GLES2);
}
@Test
- public void test17_GLES3() throws InterruptedException {
+ public void test48_GLES3() throws InterruptedException {
testSpecificProfile(GLProfile.GLES3);
}
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile03NEWTOffscreen.java b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile03NEWTOffscreen.java
index 12cb0d6a8..3f3e14965 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile03NEWTOffscreen.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile03NEWTOffscreen.java
@@ -42,17 +42,27 @@ import org.junit.runners.MethodSorters;
public class TestGLProfile03NEWTOffscreen extends GLProfile0XBase {
@Test
- public void test01GLProfileDefault() throws InterruptedException {
+ public void test01GLProfileDefaultFBO() throws InterruptedException {
System.out.println("GLProfile "+GLProfile.glAvailabilityToString());
System.out.println("GLProfile.getDefaultDevice(): "+GLProfile.getDefaultDevice());
final GLProfile glp = GLProfile.getDefault();
System.out.println("GLProfile.getDefault(): "+glp);
- final GLCapabilitiesImmutable caps = new GLCapabilities(glp);
+ final GLCapabilities caps = new GLCapabilities(glp);
+ caps.setFBO(true);
+ validateOnlineOffscreen("default", caps);
+ }
+ @Test
+ public void test02GLProfileDefaultPBuffer() throws InterruptedException {
+ System.out.println("GLProfile "+GLProfile.glAvailabilityToString());
+ System.out.println("GLProfile.getDefaultDevice(): "+GLProfile.getDefaultDevice());
+ final GLProfile glp = GLProfile.getDefault();
+ System.out.println("GLProfile.getDefault(): "+glp);
+ final GLCapabilities caps = new GLCapabilities(glp);
+ caps.setPBuffer(true);
validateOnlineOffscreen("default", caps);
}
-
@Test
- public void test02GLProfileDefaultBitmap() throws InterruptedException {
+ public void test03GLProfileDefaultBitmap() throws InterruptedException {
System.out.println("GLProfile "+GLProfile.glAvailabilityToString());
System.out.println("GLProfile.getDefaultDevice(): "+GLProfile.getDefaultDevice());
final GLProfile glp = GLProfile.getDefault();
@@ -63,25 +73,63 @@ public class TestGLProfile03NEWTOffscreen extends GLProfile0XBase {
}
@Test
- public void test02GLProfileMaxProgrammable() throws InterruptedException {
+ public void test11GLProfileMaxProgrammableFBO() throws InterruptedException {
// Assuming at least one programmable profile is available
final GLProfile glp = GLProfile.getMaxProgrammable(true);
System.out.println("GLProfile.getMaxProgrammable(): "+glp);
- final GLCapabilitiesImmutable caps = new GLCapabilities(glp);
+ final GLCapabilities caps = new GLCapabilities(glp);
+ caps.setFBO(true);
+ validateOnlineOffscreen("maxProgrammable", caps);
+ }
+ @Test
+ public void test12GLProfileMaxProgrammablePBuffer() throws InterruptedException {
+ // Assuming at least one programmable profile is available
+ final GLProfile glp = GLProfile.getMaxProgrammable(true);
+ System.out.println("GLProfile.getMaxProgrammable(): "+glp);
+ final GLCapabilities caps = new GLCapabilities(glp);
+ caps.setPBuffer(true);
+ validateOnlineOffscreen("maxProgrammable", caps);
+ }
+ // @Test // might not be available
+ public void test13GLProfileMaxProgrammableBitmap() throws InterruptedException {
+ // Assuming at least one programmable profile is available
+ final GLProfile glp = GLProfile.getMaxProgrammable(true);
+ System.out.println("GLProfile.getMaxProgrammable(): "+glp);
+ final GLCapabilities caps = new GLCapabilities(glp);
+ caps.setBitmap(true);
validateOnlineOffscreen("maxProgrammable", caps);
}
@Test
- public void test03GLProfileMaxFixedFunc() throws InterruptedException {
+ public void test21GLProfileMaxFixedFuncFBO() throws InterruptedException {
// Assuming at least one fixed function profile is available
final GLProfile glp = GLProfile.getMaxFixedFunc(true);
System.out.println("GLProfile.getMaxFixedFunc(): "+glp);
- final GLCapabilitiesImmutable caps = new GLCapabilities(glp);
+ final GLCapabilities caps = new GLCapabilities(glp);
+ caps.setFBO(true);
+ validateOnlineOffscreen("maxFixedFunc", caps);
+ }
+ @Test
+ public void test22GLProfileMaxFixedFuncPBuffer() throws InterruptedException {
+ // Assuming at least one fixed function profile is available
+ final GLProfile glp = GLProfile.getMaxFixedFunc(true);
+ System.out.println("GLProfile.getMaxFixedFunc(): "+glp);
+ final GLCapabilities caps = new GLCapabilities(glp);
+ caps.setPBuffer(true);
+ validateOnlineOffscreen("maxFixedFunc", caps);
+ }
+ @Test
+ public void test23GLProfileMaxFixedFuncBitmap() throws InterruptedException {
+ // Assuming at least one fixed function profile is available
+ final GLProfile glp = GLProfile.getMaxFixedFunc(true);
+ System.out.println("GLProfile.getMaxFixedFunc(): "+glp);
+ final GLCapabilities caps = new GLCapabilities(glp);
+ caps.setBitmap(true);
validateOnlineOffscreen("maxFixedFunc", caps);
}
@Test
- public void test04GLProfileGL2ES1() throws InterruptedException {
+ public void test31GLProfileGL2ES1() throws InterruptedException {
if(!GLProfile.isAvailable(GLProfile.GL2ES1)) {
System.out.println("GLProfile GL2ES1 n/a");
return;
@@ -92,7 +140,7 @@ public class TestGLProfile03NEWTOffscreen extends GLProfile0XBase {
}
@Test
- public void test05GLProfileGL2ES2() throws InterruptedException {
+ public void test32GLProfileGL2ES2() throws InterruptedException {
if(!GLProfile.isAvailable(GLProfile.GL2ES2)) {
System.out.println("GLProfile GL2ES2 n/a");
return;
@@ -103,7 +151,7 @@ public class TestGLProfile03NEWTOffscreen extends GLProfile0XBase {
}
@Test
- public void test06GLProfileGL4ES3() throws InterruptedException {
+ public void test33GLProfileGL4ES3() throws InterruptedException {
if(!GLProfile.isAvailable(GLProfile.GL4ES3)) {
System.out.println("GLProfile GL4ES3 n/a");
return;
@@ -114,7 +162,7 @@ public class TestGLProfile03NEWTOffscreen extends GLProfile0XBase {
}
@Test
- public void test07GLProfileGL2GL3() throws InterruptedException {
+ public void test34GLProfileGL2GL3() throws InterruptedException {
if(!GLProfile.isAvailable(GLProfile.GL2GL3)) {
System.out.println("GLProfile GL2GL3 n/a");
return;
@@ -135,42 +183,42 @@ public class TestGLProfile03NEWTOffscreen extends GLProfile0XBase {
}
@Test
- public void test10_GL4bc() throws InterruptedException {
+ public void test41_GL4bc() throws InterruptedException {
testSpecificProfile(GLProfile.GL4bc);
}
@Test
- public void test11_GL3bc() throws InterruptedException {
+ public void test42_GL3bc() throws InterruptedException {
testSpecificProfile(GLProfile.GL3bc);
}
@Test
- public void test12_GL2() throws InterruptedException {
+ public void test43_GL2() throws InterruptedException {
testSpecificProfile(GLProfile.GL2);
}
@Test
- public void test13_GL4() throws InterruptedException {
+ public void test44_GL4() throws InterruptedException {
testSpecificProfile(GLProfile.GL4);
}
@Test
- public void test14_GL3() throws InterruptedException {
+ public void test45_GL3() throws InterruptedException {
testSpecificProfile(GLProfile.GL3);
}
@Test
- public void test15_GLES1() throws InterruptedException {
+ public void test46_GLES1() throws InterruptedException {
testSpecificProfile(GLProfile.GLES1);
}
@Test
- public void test16_GLES2() throws InterruptedException {
+ public void test47_GLES2() throws InterruptedException {
testSpecificProfile(GLProfile.GLES2);
}
@Test
- public void test17_GLES3() throws InterruptedException {
+ public void test48_GLES3() throws InterruptedException {
testSpecificProfile(GLProfile.GLES3);
}