summaryrefslogtreecommitdiffstats
path: root/src/jake2/render/glconfig_t.java
diff options
context:
space:
mode:
authorCarsten Weisse <[email protected]>2005-05-07 18:23:26 +0000
committerCarsten Weisse <[email protected]>2005-05-07 18:23:26 +0000
commit79288e2165c844ff6435a868ea52a961f4aecbf7 (patch)
treee5025ad42a94bb9a684857c1a2b73ca4ee12f978 /src/jake2/render/glconfig_t.java
parent18826312798b2d0f90625253259be1b98cafbe53 (diff)
helper functions to get the OpenGL version as float value
Diffstat (limited to 'src/jake2/render/glconfig_t.java')
-rw-r--r--src/jake2/render/glconfig_t.java14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/jake2/render/glconfig_t.java b/src/jake2/render/glconfig_t.java
index 25f2198..8e4f49c 100644
--- a/src/jake2/render/glconfig_t.java
+++ b/src/jake2/render/glconfig_t.java
@@ -19,12 +19,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
// Created on 20.11.2003 by RST.
-// $Id: glconfig_t.java,v 1.1 2004-07-07 19:59:34 hzi Exp $
+// $Id: glconfig_t.java,v 1.2 2005-05-07 18:23:26 cawe Exp $
package jake2.render;
public class glconfig_t {
-
+
public int renderer;
public String renderer_string;
public String vendor_string;
@@ -32,4 +32,14 @@ public class glconfig_t {
public String extensions_string;
public boolean allow_cds;
+
+ private float version = 1.1f;
+
+ public void parseOpenGLVersion() {
+ version = Float.parseFloat(version_string.substring(0, 3));
+ }
+
+ public float getOpenGLVersion() {
+ return version;
+ }
}