aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-02-21 09:26:19 +0100
committerSven Gothel <[email protected]>2013-02-21 09:26:19 +0100
commit24fe89e6d7cc551aaffb6c95624271eef027b275 (patch)
tree6357b6ad0c19696afd819f6850bcb8d725ed716b /src
parent43df6ed31d5144fb8fcdab51eae62fc123364a38 (diff)
Fix GLVersionNumber (Bug 679): Don't use a subsequent version number if not valid!
Diffstat (limited to 'src')
-rw-r--r--src/jogl/classes/jogamp/opengl/GLVersionNumber.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLVersionNumber.java b/src/jogl/classes/jogamp/opengl/GLVersionNumber.java
index 1004f04c6..83815f7a4 100644
--- a/src/jogl/classes/jogamp/opengl/GLVersionNumber.java
+++ b/src/jogl/classes/jogamp/opengl/GLVersionNumber.java
@@ -29,6 +29,9 @@
package jogamp.opengl;
import java.util.StringTokenizer;
+
+import javax.media.opengl.GLContext;
+
import com.jogamp.common.util.VersionNumber;
/**
@@ -90,9 +93,11 @@ 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 == val[0] && altMinor > val[1]) || altMajor == val[0] + 1) {
- val[0] = altMajor;
- val[1] = altMinor;
+ if ( (altMajor == val[0] && altMinor > val[1]) || altMajor == val[0] + 1 ) {
+ if( GLContext.isValidGLVersion(altMajor, altMinor) ) {
+ val[0] = altMajor;
+ val[1] = altMinor;
+ }
}
}
}