aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/games/jogl/DefaultGLCapabilitiesChooser.java
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2004-04-12 19:40:30 +0000
committerKenneth Russel <[email protected]>2004-04-12 19:40:30 +0000
commitdc4d980ec184d2372b5bde0384ff17cda845c0b5 (patch)
treeebed0e5ec948b347b6a4c13cf707cb9f3e6ec720 /src/net/java/games/jogl/DefaultGLCapabilitiesChooser.java
parent4b7ef68fc3d3e836829a5a83245f0f0c874a3201 (diff)
Fixed Javadoc problems
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@107 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/net/java/games/jogl/DefaultGLCapabilitiesChooser.java')
-rw-r--r--src/net/java/games/jogl/DefaultGLCapabilitiesChooser.java17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/net/java/games/jogl/DefaultGLCapabilitiesChooser.java b/src/net/java/games/jogl/DefaultGLCapabilitiesChooser.java
index de7f500b5..8d5ecabc9 100644
--- a/src/net/java/games/jogl/DefaultGLCapabilitiesChooser.java
+++ b/src/net/java/games/jogl/DefaultGLCapabilitiesChooser.java
@@ -71,13 +71,28 @@ package net.java.games.jogl;
than accumulation buffer (including alpha) and stencil buffer
depth mismatches.
+ <LI> If a valid windowSystemRecommendedChoice parameter is
+ supplied, chooses that instead of using the cross-platform code.
+
</UL>
*/
public class DefaultGLCapabilitiesChooser implements GLCapabilitiesChooser {
private static final boolean DEBUG = false;
- public int chooseCapabilities(GLCapabilities desired, GLCapabilities[] available) {
+ public int chooseCapabilities(GLCapabilities desired,
+ GLCapabilities[] available,
+ int windowSystemRecommendedChoice) {
+ if (windowSystemRecommendedChoice >= 0 &&
+ windowSystemRecommendedChoice < available.length &&
+ available[windowSystemRecommendedChoice] != null) {
+ if (DEBUG) {
+ System.err.println("Choosing window system's recommended choice of " + windowSystemRecommendedChoice);
+ System.err.println(available[windowSystemRecommendedChoice]);
+ }
+ return windowSystemRecommendedChoice;
+ }
+
if (DEBUG) {
for (int i = 0; i < available.length; i++) {
System.err.println("Available " + i + ": " + available[i]);