Package gov.nasa.worldwind.util
Class BasicGLCapabilitiesChooser
- java.lang.Object
-
- com.jogamp.opengl.DefaultGLCapabilitiesChooser
-
- gov.nasa.worldwind.util.BasicGLCapabilitiesChooser
-
- All Implemented Interfaces:
com.jogamp.nativewindow.CapabilitiesChooser,com.jogamp.opengl.GLCapabilitiesChooser
public class BasicGLCapabilitiesChooser extends com.jogamp.opengl.DefaultGLCapabilitiesChooserBasicGLCapabilitiesChooser provides an implementation ofGLCapabilitiesChooserfor use with WorldWindow implementations (for example, WorldWindowGLCanvas and WorldWindowGLJPanel).BasicGLCapabilitiesChooser extends the behavior of the default GLCapabilitiesChooser by implementing a fallback behavior when device supported stereo is requested but is not supported by the hardware. In this case, BasicGLCapabilitiesChooser attempts to find a match to the desired capabilities, but without device supported stereo. When the application does not request device supported stereo, BasicGLCapabilitiesChooser provides the same behavior as DefaultGLCapabilitiesChooser.
-
-
Constructor Summary
Constructors Constructor Description BasicGLCapabilitiesChooser()Constructs a newBasicGLCapabilitiesChooser, but otherwise does nothing.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intchooseCapabilities(com.jogamp.nativewindow.CapabilitiesImmutable desired, java.util.List<? extends com.jogamp.nativewindow.CapabilitiesImmutable> available, int windowSystemRecommendedChoice)Overridden to provide a fallback behavior when device supported stereo requested but is not supported by the hardware.protected intchooseStereoCapabilities(com.jogamp.nativewindow.CapabilitiesImmutable desired, java.util.List<? extends com.jogamp.nativewindow.CapabilitiesImmutable> available, int windowSystemRecommendedChoice)Attempts to use the superclass functionality to find a match to the desired GL capabilities in the list of available capabilities.
-
-
-
Method Detail
-
chooseCapabilities
public int chooseCapabilities(com.jogamp.nativewindow.CapabilitiesImmutable desired, java.util.List<? extends com.jogamp.nativewindow.CapabilitiesImmutable> available, int windowSystemRecommendedChoice)Overridden to provide a fallback behavior when device supported stereo requested but is not supported by the hardware. When thedesiredGL capabilities does not specify device supported stereo, this calls DefaultGLCapabilitiesChooser.chooseCapabilities.- Specified by:
chooseCapabilitiesin interfacecom.jogamp.nativewindow.CapabilitiesChooser- Overrides:
chooseCapabilitiesin classcom.jogamp.opengl.DefaultGLCapabilitiesChooser- Parameters:
desired- the desired GL capabilities.available- the list of available GL capabilities on the graphics device.windowSystemRecommendedChoice- an index into the list of available GL capabilities indicating the window system's recommended capabilities, or -1 to indicate no recommendation.- Returns:
- an index into the list of available GL capabilities.
-
chooseStereoCapabilities
protected int chooseStereoCapabilities(com.jogamp.nativewindow.CapabilitiesImmutable desired, java.util.List<? extends com.jogamp.nativewindow.CapabilitiesImmutable> available, int windowSystemRecommendedChoice)Attempts to use the superclass functionality to find a match to the desired GL capabilities in the list of available capabilities. This assumes that the desired GL capabilities request device supported stereo. If the superclass cannot find a match, this attempts to find a match to the desired capabilities, but without device supported stereo.- Parameters:
desired- the desired GL capabilities.available- the list of available GL capabilities on the graphics device.windowSystemRecommendedChoice- an index into the list of available GL capabilities indicating the window system's recommended capabilities, or -1 to indicate no recommendation.- Returns:
- an index into the list of available GL capabilities.
-
-