summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-07-05 05:06:35 +0200
committerSven Gothel <[email protected]>2013-07-05 05:06:35 +0200
commit5dfa035f5319a888592df1954f82131e0ed37ba6 (patch)
tree9d3743edbd5b4a5969d1e1fe21b49fc3048ccf1a /src
parent96f5c1ab3ada336bad8704521d47f7db5031334c (diff)
Workaround NVidia driver 325.8 returning 4.3-compat for any compat request, i.e. allowing 4.3 and 4.4 for GL version validation.
4.4 b/c it may come up soon.
Diffstat (limited to 'src')
-rw-r--r--src/jogl/classes/javax/media/opengl/GLContext.java13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/jogl/classes/javax/media/opengl/GLContext.java b/src/jogl/classes/javax/media/opengl/GLContext.java
index 684d0de65..daede5ac0 100644
--- a/src/jogl/classes/javax/media/opengl/GLContext.java
+++ b/src/jogl/classes/javax/media/opengl/GLContext.java
@@ -1157,7 +1157,14 @@ public abstract class GLContext {
/* 1.*/ { 0, 1, 2, 3, 4, 5 },
/* 2.*/ { 0, 1 },
/* 3.*/ { 0, 1, 2, 3 },
- /* 4.*/ { 0, 1, 2 } };
+ /* 4.*/ { 0, 1, 2 } }; // FIXME add 4.3 !
+
+ private static final int GL_VERSIONS_VALID[][] = {
+ /* 0.*/ { -1 },
+ /* 1.*/ { 0, 1, 2, 3, 4, 5 },
+ /* 2.*/ { 0, 1 },
+ /* 3.*/ { 0, 1, 2, 3 },
+ /* 4.*/ { 0, 1, 2, 3, 4 } }; // 4.4 coming up soon ?
public static final int getMaxMajor() {
return GL_VERSIONS.length-1;
@@ -1169,8 +1176,8 @@ public abstract class GLContext {
}
public static final boolean isValidGLVersion(int major, int minor) {
- if(1>major || major>=GL_VERSIONS.length) return false;
- if(0>minor || minor>=GL_VERSIONS[major].length) return false;
+ if(1>major || major>=GL_VERSIONS_VALID.length) return false;
+ if(0>minor || minor>=GL_VERSIONS_VALID[major].length) return false;
return true;
}