aboutsummaryrefslogtreecommitdiffstats
path: root/src/jake2/render
diff options
context:
space:
mode:
authorCarsten Weisse <[email protected]>2006-12-12 14:46:04 +0000
committerCarsten Weisse <[email protected]>2006-12-12 14:46:04 +0000
commit7aac96c5f93048b7c4df77feb656bc632e77634b (patch)
tree1c61fe7782a421039fbabc4dc24aa5e0f2c2be9a /src/jake2/render
parentf4d92458eec1ec006e69bc5ab68aee29c599a4b7 (diff)
add a better multitexturing check
Diffstat (limited to 'src/jake2/render')
-rw-r--r--src/jake2/render/fast/Main.java18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/jake2/render/fast/Main.java b/src/jake2/render/fast/Main.java
index 1bb6d07..98d2b2c 100644
--- a/src/jake2/render/fast/Main.java
+++ b/src/jake2/render/fast/Main.java
@@ -2,7 +2,7 @@
* Main.java
* Copyright (C) 2003
*
- * $Id: Main.java,v 1.4 2006-11-22 15:05:39 cawe Exp $
+ * $Id: Main.java,v 1.5 2006-12-12 14:46:04 cawe Exp $
*/
/*
Copyright (C) 1997-2001 Id Software, Inc.
@@ -1249,12 +1249,20 @@ public abstract class Main extends Base {
}
if (gl_config.extensions_string.indexOf("GL_ARB_multitexture") >= 0) {
- VID.Printf(Defines.PRINT_ALL, "...using GL_ARB_multitexture\n");
- qglActiveTextureARB = true;
- TEXTURE0 = GL_TEXTURE0_ARB;
- TEXTURE1 = GL_TEXTURE1_ARB;
+ // check if the extension realy exists
+ try {
+ gl.glClientActiveTextureARB(GL_TEXTURE0_ARB);
+ // seems to work correctly
+ VID.Printf(Defines.PRINT_ALL, "...using GL_ARB_multitexture\n");
+ qglActiveTextureARB = true;
+ TEXTURE0 = GL_TEXTURE0_ARB;
+ TEXTURE1 = GL_TEXTURE1_ARB;
+ } catch (Exception e) {
+ qglActiveTextureARB = false;
+ }
}
else {
+ qglActiveTextureARB = false;
VID.Printf(Defines.PRINT_ALL, "...GL_ARB_multitexture not found\n");
}