diff options
author | Sven Gothel <[email protected]> | 2012-10-19 10:11:59 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-10-19 10:11:59 +0200 |
commit | 4c41dbb44670b0420e5f804911e1f729662598b7 (patch) | |
tree | 2a538c21dc468e93e4fddbcde48b59aedb4e9608 /src/jake2/render/opengl/JoglES1Driver.java | |
parent | 5c21146b8fc75481b9ae164c2e9f5cfbfb8897a1 (diff) |
Added JOGL2 Flags (README/Jake2.sh), New JOGL Renderer Order, ..
New JOGL Renderer Order, last comes first if not defined by 'vid_ref':
- jogldummy
- joglgl2
- jogles2
- jogles1
+++
README JOGL2 Flags:
JOGL Renderer can be set via 'vid_ref', i.e. '+set vid_ref jogles2'
- jogles1 ES1 renderer, may use GL2ES1 w/ 'jogl_gl2es1 1'
- jogles2 ES1 renderer, may use GL2ES2 w/ 'jogl_gl2es2 1'
- joglgl2 GL2 renderer, maybe disabled w/ 'jogl_gl2 0'
- jogldummy NOP GL renderer to measure performance w/o GL costs
Special GLProfile selection flags:
- jogl_gl2 0 disable joglgl2, default enabled '1'
- jogl_gl2es1 1 allow desktop GL2ES1 for jogles1 renderer, default disabled '0'
- jogl_gl2es2 1 allow desktop GL2ES2 for jogles2 renderer, default disabled '0'
Special drawable surface flags:
- jogl_rgb565 1 requesting a RGB565 surface, otherwise request default RGB888 surface
Diffstat (limited to 'src/jake2/render/opengl/JoglES1Driver.java')
-rw-r--r-- | src/jake2/render/opengl/JoglES1Driver.java | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/jake2/render/opengl/JoglES1Driver.java b/src/jake2/render/opengl/JoglES1Driver.java index be3a9fd..64d3790 100644 --- a/src/jake2/render/opengl/JoglES1Driver.java +++ b/src/jake2/render/opengl/JoglES1Driver.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; @@ -38,8 +40,16 @@ import com.jogamp.newt.ScreenMode; */ public abstract class JoglES1Driver extends JoglGL2ES1 implements GLDriver { - // protected static GLProfile glp = GLProfile.get(GLProfile.GLES1); // exception if n/a is desired - protected static GLProfile glp = GLProfile.get(GLProfile.GL2ES1); // 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_gl2es1", "0", 0); + if( v.value != 0f ) { + glp = GLProfile.getGL2ES1(); + } else { + glp = GLProfile.get(GLProfile.GLES1); + } + } protected JoglES1Driver() { super(true); |