diff options
Diffstat (limited to 'src')
4 files changed, 24 insertions, 5 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/caps/NonFSAAGLCapabilitiesChooser.java b/src/jogl/classes/com/jogamp/opengl/util/caps/NonFSAAGLCapabilitiesChooser.java index 27d04e8b9..818d1136f 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/caps/NonFSAAGLCapabilitiesChooser.java +++ b/src/jogl/classes/com/jogamp/opengl/util/caps/NonFSAAGLCapabilitiesChooser.java @@ -40,6 +40,14 @@ import com.jogamp.opengl.GLCapabilitiesChooser; * i.e. all matching {@link GLCapabilitiesImmutable} with {@link GLCapabilitiesImmutable#getSampleBuffers()}. */ public class NonFSAAGLCapabilitiesChooser extends DefaultGLCapabilitiesChooser { + private final boolean verbose; + public NonFSAAGLCapabilitiesChooser(final boolean verbose) { + this.verbose = verbose; + } + public NonFSAAGLCapabilitiesChooser() { + this.verbose = false; + } + @Override public int chooseCapabilities(final CapabilitiesImmutable desired, final List<? extends CapabilitiesImmutable> available, @@ -58,10 +66,13 @@ public class NonFSAAGLCapabilitiesChooser extends DefaultGLCapabilitiesChooser { /** if( caps.equals(recommended) ) { // the matching index is enough! System.err.println("Dropping["+i+"] "+caps+", matched recommended["+recommendedIdx+"] = "+recommended); recommendedIdx = -1; - } else */ if( recommendedIdx == i ) { - System.err.println("Dropping["+i+"] "+caps+", sameidx recommended["+recommendedIdx+"] = "+recommended); + } else */ + if( recommendedIdx == i ) { + if( verbose ) { + System.err.println("Dropping["+i+"] "+caps+", sameidx recommended["+recommendedIdx+"] = "+recommended); + } recommendedIdx = -1; - } else { + } else if( verbose ) { System.err.println("Dropping "+caps+" != recommended["+recommendedIdx+"]"); } } else { diff --git a/src/test/com/jogamp/opengl/test/junit/graph/PerfTextRendererNEWT00.java b/src/test/com/jogamp/opengl/test/junit/graph/PerfTextRendererNEWT00.java index 57e713179..102a330ab 100644 --- a/src/test/com/jogamp/opengl/test/junit/graph/PerfTextRendererNEWT00.java +++ b/src/test/com/jogamp/opengl/test/junit/graph/PerfTextRendererNEWT00.java @@ -229,7 +229,8 @@ public class PerfTextRendererNEWT00 { } } System.err.println(VersionUtil.getPlatformInfo()); - System.err.println(JoglVersion.getInstance().toString(gl)); + System.err.println(JoglVersion.getAllAvailableCapabilitiesInfo(winctx.window.getScreen().getDisplay().getGraphicsDevice(), null).toString()); + System.err.println(JoglVersion.getGLInfo(gl, null, false /* withCapsAndExts */).toString()); System.err.println("VSync Swap Interval: "+gl.getSwapInterval()); System.err.println("GLDrawable surface size: "+winctx.context.getGLDrawable().getSurfaceWidth()+" x "+winctx.context.getGLDrawable().getSurfaceHeight()); diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneNewtDemo.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneNewtDemo.java index e3bec8b22..be0b64156 100644 --- a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneNewtDemo.java +++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneNewtDemo.java @@ -144,7 +144,7 @@ public class GPUUISceneNewtDemo { final GLWindow window = GLWindow.create(screen, caps); if( 0 == SceneMSAASamples ) { - window.setCapabilitiesChooser(new NonFSAAGLCapabilitiesChooser()); + window.setCapabilitiesChooser(new NonFSAAGLCapabilitiesChooser(true)); } window.setPosition(x, y); window.setSize(width, height); diff --git a/src/test/com/jogamp/opengl/test/junit/util/NEWTGLContext.java b/src/test/com/jogamp/opengl/test/junit/util/NEWTGLContext.java index 5dcfb2f98..878f2be5b 100644 --- a/src/test/com/jogamp/opengl/test/junit/util/NEWTGLContext.java +++ b/src/test/com/jogamp/opengl/test/junit/util/NEWTGLContext.java @@ -36,6 +36,7 @@ import com.jogamp.opengl.GLCapabilities; import com.jogamp.opengl.GLContext; import com.jogamp.opengl.GLDrawable; import com.jogamp.opengl.GLDrawableFactory; +import com.jogamp.opengl.util.caps.NonFSAAGLCapabilitiesChooser; import org.junit.Assert; @@ -66,6 +67,12 @@ public class NEWTGLContext { final Window window = NewtFactory.createWindow(screen, caps); Assert.assertNotNull(window); window.setSize(width, height); + if( !caps.getSampleBuffers() ) { + // Make sure to not have FSAA if not requested + // TODO: Implement in default chooser? + window.setCapabilitiesChooser(new NonFSAAGLCapabilitiesChooser(true)); + } + window.setVisible(true); Assert.assertTrue(NewtTestUtil.waitForVisible(window, true, null)); Assert.assertTrue(NewtTestUtil.waitForRealized(window, true, null)); |