GLState: constant UNBIND = 0

This commit is contained in:
Gustl22
2018-12-02 23:28:12 +01:00
parent bb87c8a51b
commit 07afebba4e
5 changed files with 7 additions and 6 deletions

View File

@@ -94,8 +94,8 @@ public class GdxSpriteBatchTest extends GdxMapApp {
mMapRenderer.onDrawFrame();
gl.flush();
GLState.bindVertexBuffer(0);
GLState.bindElementBuffer(0);
GLState.bindVertexBuffer(GLState.UNBIND);
GLState.bindElementBuffer(GLState.UNBIND);
gl.frontFace(GL.CCW);
spriteBatch.setProjectionMatrix(camera.combined);

View File

@@ -85,7 +85,7 @@ public final class BufferObject extends Inlist<BufferObject> {
}
public void unbind() {
GLState.bindBuffer(target, 0);
GLState.bindBuffer(target, GLState.UNBIND);
}
// ---------------------------- pool ----------------------------

View File

@@ -29,6 +29,7 @@ public class GLState {
static final Logger log = LoggerFactory.getLogger(GLState.class);
public final static int DISABLED = -1;
public final static int UNBIND = 0;
private final static boolean[] vertexArray = {false, false};
private static boolean blend = false;

View File

@@ -215,7 +215,7 @@ public class MapRenderer {
gl.bufferData(GL.ELEMENT_ARRAY_BUFFER,
indices.length * 2, buf,
GL.STATIC_DRAW);
GLState.bindElementBuffer(0);
GLState.bindElementBuffer(GLState.UNBIND);
/* initialize default quad */
FloatBuffer floatBuffer = MapRenderer.getFloatBuffer(8);
@@ -228,7 +228,7 @@ public class MapRenderer {
gl.bufferData(GL.ARRAY_BUFFER,
quad.length * 4, floatBuffer,
GL.STATIC_DRAW);
GLState.bindVertexBuffer(0);
GLState.bindVertexBuffer(GLState.UNBIND);
GLState.init();

View File

@@ -297,7 +297,7 @@ public final class LineTexBucket extends LineBucket {
GLState.bindVertexBuffer(mVertexFlipID);
gl.bufferData(GL.ARRAY_BUFFER, flip.length, sbuf,
GL.STATIC_DRAW);
GLState.bindVertexBuffer(0);
GLState.bindVertexBuffer(GLState.UNBIND);
// mTexID = new int[10];
// byte[] stipple = new byte[40];