diff --git a/arc-core/src/arc/graphics/g2d/SpriteBatch.java b/arc-core/src/arc/graphics/g2d/SpriteBatch.java index 45c7c94a..a1b04f5b 100644 --- a/arc-core/src/arc/graphics/g2d/SpriteBatch.java +++ b/arc-core/src/arc/graphics/g2d/SpriteBatch.java @@ -80,6 +80,9 @@ public SpriteBatch(int size, Shader defaultShader){ }else{ shader = defaultShader; } + + //mark indices as dirty once for GL30 + mesh.getIndicesBuffer(); }else{ vertices = new float[0]; shader = null; @@ -126,8 +129,6 @@ protected void flush(){ // } Mesh mesh = this.mesh; mesh.setVertices(vertices, 0, idx); - mesh.getIndicesBuffer().position(0); - mesh.getIndicesBuffer().limit(count); mesh.render(getShader(), Gl.triangles, 0, count); idx = 0;