diff options
author | Sven Gothel <[email protected]> | 2012-10-23 13:47:09 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-10-23 13:47:09 +0200 |
commit | 28204694f215520090a8422db2a7f0090943638d (patch) | |
tree | 9a71d5d2fc6e670667ace0e41fd5ef3f77676d13 /src/jake2/render/opengl/JoglGL2ES1.java | |
parent | 953acae56d7cf60db712d8486a69552aac9ca6a1 (diff) |
JoglGL2ES1: Remove ctor arg hasPointExt, since it's impl. in FFP Emul.
Diffstat (limited to 'src/jake2/render/opengl/JoglGL2ES1.java')
-rw-r--r-- | src/jake2/render/opengl/JoglGL2ES1.java | 35 |
1 files changed, 8 insertions, 27 deletions
diff --git a/src/jake2/render/opengl/JoglGL2ES1.java b/src/jake2/render/opengl/JoglGL2ES1.java index 524fdaf..34dd58d 100644 --- a/src/jake2/render/opengl/JoglGL2ES1.java +++ b/src/jake2/render/opengl/JoglGL2ES1.java @@ -10,33 +10,21 @@ import com.jogamp.opengl.util.ImmModeSink; public class JoglGL2ES1 implements QGL { - private final boolean hasPointExt; private GL2ES1 gl; protected ImmModeSink ims; private boolean inBlock = false; // within begin/end - JoglGL2ES1(boolean hasPointExt) { - this.hasPointExt = hasPointExt; + JoglGL2ES1() { } void setGL(GL2ES1 gl) { this.gl = gl; - if(hasPointExt) { - ims = ImmModeSink.createFixed(4, - 3, GL.GL_FLOAT, // vertex - 0, 0, // color - 0, 0, // normal - 2, GL.GL_FLOAT, // texture - GL.GL_STATIC_DRAW); - } else { - ims = ImmModeSink.createFixed(6000, - 3, GL.GL_FLOAT, // vertex - 4, GL.GL_UNSIGNED_BYTE, // color (for particle simulation) - 0, 0, // normal - 2, GL.GL_FLOAT, // texture - GL.GL_STATIC_DRAW); - ims.setResizeElementCount(512); - } + ims = ImmModeSink.createFixed(4, + 3, GL.GL_FLOAT, // vertex + 4, GL.GL_FLOAT, // color (for R_RenderDlights) + 0, 0, // normal + 2, GL.GL_FLOAT, // texture + GL.GL_STATIC_DRAW); } public void glBegin(int mode) { @@ -247,14 +235,7 @@ public class JoglGL2ES1 implements QGL { StringBuilder sb = new StringBuilder(); sb.append(gl.glGetString(name)); sb.append(" GL_ARB_multitexture"); - if(hasPointExt) { - sb.append(" ").append(GL_EXT_point_parameters); - } else { - int p0; - while( 0 <= ( p0 = sb.indexOf(GL_EXT_point_parameters) ) ) { - sb = sb.replace(p0, p0+GL_EXT_point_parameters.length(), ""); - } - } + sb.append(" ").append(GL_EXT_point_parameters); return sb.toString(); } return gl.glGetString(name); |