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/jogl/classes/com/jogamp | |
parent | d76fc6f518606def8ddc52e0cd4d8a29bd2536fc (diff) |
Apply NonFSAAGLCapabilitiesChooser in NEWTGLContext (tests only). TODO: Consider applying it in default chooser?
Diffstat (limited to 'src/jogl/classes/com/jogamp')
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/util/caps/NonFSAAGLCapabilitiesChooser.java | 17 |
1 files changed, 14 insertions, 3 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 { |