diff options
author | Sven Gothel <[email protected]> | 2013-07-05 05:06:35 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-07-05 05:06:35 +0200 |
commit | 5dfa035f5319a888592df1954f82131e0ed37ba6 (patch) | |
tree | 9d3743edbd5b4a5969d1e1fe21b49fc3048ccf1a /src/jogl/classes | |
parent | 96f5c1ab3ada336bad8704521d47f7db5031334c (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/jogl/classes')
-rw-r--r-- | src/jogl/classes/javax/media/opengl/GLContext.java | 13 |
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; } |