GLState: constant UNBIND = 0
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -85,7 +85,7 @@ public final class BufferObject extends Inlist<BufferObject> {
|
||||
}
|
||||
|
||||
public void unbind() {
|
||||
GLState.bindBuffer(target, 0);
|
||||
GLState.bindBuffer(target, GLState.UNBIND);
|
||||
}
|
||||
|
||||
// ---------------------------- pool ----------------------------
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user