From 6c7091317c5531691bcae7c18f8e07d5fcbece9f Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 8 Mar 2023 06:12:15 +0100 Subject: Apply NonFSAAGLCapabilitiesChooser in NEWTGLContext (tests only). TODO: Consider applying it in default chooser? --- .../com/jogamp/opengl/test/junit/graph/PerfTextRendererNEWT00.java | 3 ++- .../jogamp/opengl/test/junit/graph/demos/GPUUISceneNewtDemo.java | 2 +- src/test/com/jogamp/opengl/test/junit/util/NEWTGLContext.java | 7 +++++++ 3 files changed, 10 insertions(+), 2 deletions(-) (limited to 'src/test/com') 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)); -- cgit v1.2.3