Playground renderer: bind with GLState (#601)
This commit is contained in:
@@ -101,7 +101,9 @@ public class GdxModelRenderer extends LayerRenderer {
|
||||
if (v.pos.zoomLevel < 16)
|
||||
gl.clear(GL.DEPTH_BUFFER_BIT);
|
||||
|
||||
gl.bindBuffer(GL.ELEMENT_ARRAY_BUFFER, 0);
|
||||
// Unbind via GLState to ensure no buffer is replaced by accident
|
||||
GLState.bindElementBuffer(GLState.UNBIND);
|
||||
GLState.bindBuffer(GL.ARRAY_BUFFER, GLState.UNBIND);
|
||||
|
||||
// set state that is expected after modelBatch.end();
|
||||
// modelBatch keeps track of its own state
|
||||
@@ -172,8 +174,8 @@ public class GdxModelRenderer extends LayerRenderer {
|
||||
}
|
||||
|
||||
gl.depthMask(false);
|
||||
gl.bindBuffer(GL.ELEMENT_ARRAY_BUFFER, 0);
|
||||
gl.bindBuffer(GL.ARRAY_BUFFER, 0);
|
||||
GLState.bindElementBuffer(GLState.UNBIND);
|
||||
GLState.bindBuffer(GL.ARRAY_BUFFER, GLState.UNBIND);
|
||||
}
|
||||
|
||||
// @Override
|
||||
|
||||
Reference in New Issue
Block a user