org.xith3d.render.jsr231
Class OldStyleGLCapabilitiesChooser
java.lang.Object
org.xith3d.render.jsr231.OldStyleGLCapabilitiesChooser
- All Implemented Interfaces:
- javax.media.opengl.GLCapabilitiesChooser
public class OldStyleGLCapabilitiesChooser
- extends java.lang.Object
- implements javax.media.opengl.GLCapabilitiesChooser
The default implementation of the GLCapabilitiesChooser interface,
which provides consistent visual selection behavior across platforms. The
precise algorithm is deliberately left loosely specified. Some properties
are:
- As long as there is at least one available non-null GLCapabilities which
matches the "stereo" option, will return a valid index.
- Attempts to match as closely as possible the given GLCapabilities, but
will select one with fewer capabilities (i.e., lower color depth) if
necessary.
- Prefers hardware-accelerated visuals to non-hardware-accelerated.
- 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.
- May select the opposite of a double- or single-buffered visual (based on
the user's request) in dire situations.
- Color depth (including alpha) mismatches are weighted higher than depth
buffer mismatches, which are in turn weighted higher than accumulation buffer
(including alpha) and stencil buffer depth mismatches.
|
Method Summary |
int |
chooseCapabilities(javax.media.opengl.GLCapabilities desired,
javax.media.opengl.GLCapabilities[] available,
int windowSystemRecommendedChoice)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OldStyleGLCapabilitiesChooser
public OldStyleGLCapabilitiesChooser()
chooseCapabilities
public int chooseCapabilities(javax.media.opengl.GLCapabilities desired,
javax.media.opengl.GLCapabilities[] available,
int windowSystemRecommendedChoice)
- Specified by:
chooseCapabilities in interface javax.media.opengl.GLCapabilitiesChooser