diff options
author | Sven Gothel <[email protected]> | 2023-03-08 06:12:15 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-03-08 06:12:15 +0100 |
commit | 6c7091317c5531691bcae7c18f8e07d5fcbece9f (patch) | |
tree | 4240cd6f4183caff4d76081f40cbf017e47542fe /src/test/com/jogamp/opengl | |
parent | d76fc6f518606def8ddc52e0cd4d8a29bd2536fc (diff) |
Apply NonFSAAGLCapabilitiesChooser in NEWTGLContext (tests only). TODO: Consider applying it in default chooser?
Diffstat (limited to 'src/test/com/jogamp/opengl')
3 files changed, 10 insertions, 2 deletions
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)); |