aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/jogamp/opengl')
-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;
+ }
}
}
}