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? --- .../opengl/util/caps/NonFSAAGLCapabilitiesChooser.java | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'src/jogl/classes') 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 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 { -- cgit v1.2.3