diff options
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); |