aboutsummaryrefslogtreecommitdiffstats
path: root/src/jake2/render/opengl/JoglES2Driver.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/jake2/render/opengl/JoglES2Driver.java')
-rw-r--r--src/jake2/render/opengl/JoglES2Driver.java14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/jake2/render/opengl/JoglES2Driver.java b/src/jake2/render/opengl/JoglES2Driver.java
index edfe8b2..b6a0a62 100644
--- a/src/jake2/render/opengl/JoglES2Driver.java
+++ b/src/jake2/render/opengl/JoglES2Driver.java
@@ -25,6 +25,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
package jake2.render.opengl;
+import jake2.game.cvar_t;
+import jake2.qcommon.Cvar;
import jake2.qcommon.xcommand_t;
import jake2.render.Base;
@@ -40,8 +42,16 @@ import com.jogamp.opengl.util.glsl.fixedfunc.ShaderSelectionMode;
*/
public abstract class JoglES2Driver extends JoglGL2ES1 implements GLDriver {
- // protected static GLProfile glp = GLProfile.get(GLProfile.GLES2); // exception if n/a is desired
- protected static GLProfile glp = GLProfile.getGL2ES2(); // exception if n/a is desired
+ protected static final GLProfile glp;
+ static {
+ // exception if GLProfile is n/a is desired
+ cvar_t v = Cvar.Get("jogl_gl2es2", "0", 0);
+ if( v.value != 0f ) {
+ glp = GLProfile.getGL2ES2();
+ } else {
+ glp = GLProfile.get(GLProfile.GLES2);
+ }
+ }
// protected static final ShaderSelectionMode shaderSelectionMode = ShaderSelectionMode.AUTO;
protected static final ShaderSelectionMode shaderSelectionMode = ShaderSelectionMode.COLOR_TEXTURE2;