Merge pull request #605 from Gustl22/glstate_const

GLState: constant UNBIND = 0
This commit is contained in:
Emux 2018-12-03 11:43:30 +02:00 committed by GitHub
commit e20b941eb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 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

@ -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];