|
JOGL v2.6.0-rc-20250712
JOGL, High-Performance Graphics Binding for Java (public API).
|
Public Member Functions | |
| int | chooseCapabilities (final CapabilitiesImmutable desired, final List<? extends CapabilitiesImmutable > available, final int windowSystemRecommendedChoice) |
Chooses the index (0..available.length - 1) of the Capabilities most closely matching the desired one from the list of all supported. More... | |
| int | chooseCapabilities (CapabilitiesImmutable desired, List<? extends CapabilitiesImmutable > available, int windowSystemRecommendedChoice) |
Chooses the index (0..available.length - 1) of the Capabilities most closely matching the desired one from the list of all supported. More... | |
The default implementation of the CapabilitiesChooser interface, which provides consistent visual selection behavior across platforms. The precise algorithm is deliberately left loosely specified. Some properties are:
Attempts to match as closely as possible the given Capabilities, but will select one with fewer capabilities (i.e., lower color depth) if necessary.
If there is no exact match, prefers a more-capable visual to a less-capable one.
If there is more than one exact match, chooses an arbitrary one.
If a valid windowSystemRecommendedChoice parameter is supplied, chooses that instead of using the cross-platform code.
Definition at line 70 of file DefaultCapabilitiesChooser.java.
| int com.jogamp.nativewindow.DefaultCapabilitiesChooser.chooseCapabilities | ( | final CapabilitiesImmutable | desired, |
| final List<? extends CapabilitiesImmutable > | available, | ||
| final int | windowSystemRecommendedChoice | ||
| ) |
Chooses the index (0..available.length - 1) of the Capabilities most closely matching the desired one from the list of all supported.
Some of the entries in the available array may be null; the chooser must ignore these. The windowSystemRecommendedChoice parameter may be provided to the chooser by the underlying window system; if this index is valid, it is recommended, but not necessarily required, that the chooser select that entry.
Note: this method is called automatically by the GraphicsConfigurationFactory#chooseGraphicsConfiguration method when an instance of this class is passed in to it. It should generally not be invoked by users directly, unless it is desired to delegate the choice to some other CapabilitiesChooser object.
Implements com.jogamp.nativewindow.CapabilitiesChooser.
Definition at line 82 of file DefaultCapabilitiesChooser.java.