diff options
author | Sven Gothel <[email protected]> | 2012-10-24 17:03:41 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-10-24 17:03:41 +0200 |
commit | f2661adf587390a61cbb7fe2e3377da2d57672a7 (patch) | |
tree | 9209633502880237aa86e424ebbc811c7ed662a9 /src/jogl/classes/jogamp/opengl/GLVersionNumber.java | |
parent | dedf4ea7ddab1279602208fa194231ea65409251 (diff) |
Adapt to GlueGen change 08a8defda8b6f49eb794cf787f688ba65bfe7b37 (VersionNumber)
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/GLVersionNumber.java')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/GLVersionNumber.java | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLVersionNumber.java b/src/jogl/classes/jogamp/opengl/GLVersionNumber.java index 5bd008f83..1004f04c6 100644 --- a/src/jogl/classes/jogamp/opengl/GLVersionNumber.java +++ b/src/jogl/classes/jogamp/opengl/GLVersionNumber.java @@ -53,26 +53,26 @@ class GLVersionNumber extends VersionNumber { tok.nextToken(); // GL_ tok.nextToken(); // VERSION_ if (!tok.hasMoreTokens()) { - major = 0; + val[0] = 0; return; } - major = Integer.valueOf(tok.nextToken()).intValue(); + val[0] = Integer.valueOf(tok.nextToken()).intValue(); if (!tok.hasMoreTokens()) { - minor = 0; + val[1] = 0; return; } - minor = Integer.valueOf(tok.nextToken()).intValue(); + val[1] = Integer.valueOf(tok.nextToken()).intValue(); if (!tok.hasMoreTokens()) { - sub = 0; + val[2] = 0; return; } - sub = Integer.valueOf(tok.nextToken()).intValue(); + val[2] = Integer.valueOf(tok.nextToken()).intValue(); } else { int radix = 10; if (versionString.length() > 2) { if (Character.isDigit(versionString.charAt(0)) && versionString.charAt(1) == '.' && Character.isDigit(versionString.charAt(2))) { - major = Character.digit(versionString.charAt(0), radix); - minor = Character.digit(versionString.charAt(2), radix); + val[0] = Character.digit(versionString.charAt(0), radix); + val[1] = Character.digit(versionString.charAt(2), radix); // See if there's version-specific information which might // imply a more recent OpenGL version StringTokenizer tok = new StringTokenizer(versionString, " "); @@ -90,9 +90,9 @@ class GLVersionNumber extends VersionNumber { // Avoid possibly confusing situations by putting some // constraints on the upgrades we do to the major and // minor versions - if ((altMajor == major && altMinor > minor) || altMajor == major + 1) { - major = altMajor; - minor = altMinor; + if ((altMajor == val[0] && altMinor > val[1]) || altMajor == val[0] + 1) { + val[0] = altMajor; + val[1] = altMinor; } } } @@ -106,8 +106,8 @@ class GLVersionNumber extends VersionNumber { // FIXME: refactor desktop OpenGL dependencies and make this // class work properly for OpenGL ES System.err.println("Info: ExtensionAvailabilityCache: FunctionAvailabilityCache.Version.<init>: " + e); - major = 1; - minor = 0; + val[0] = 1; + val[1] = 0; /* throw (IllegalArgumentException) new IllegalArgumentException( |