diff options
Diffstat (limited to 'src/jogl/classes/jogamp/graph/curve/opengl')
-rw-r--r-- | src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PES2.java | 8 | ||||
-rw-r--r-- | src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java | 6 |
2 files changed, 10 insertions, 4 deletions
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PES2.java b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PES2.java index aabef29b0..765b94855 100644 --- a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PES2.java +++ b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PES2.java @@ -223,7 +223,9 @@ public class VBORegion2PES2 extends GLRegion { texCoordFboAttr.enableBuffer(gl, true); indicesFbo.enableBuffer(gl, true); - gl.glDrawElements(GL2ES2.GL_TRIANGLES, indicesFbo.getElementCount() * indicesFbo.getComponentCount(), GL2ES2.GL_UNSIGNED_SHORT, 0); + indicesFbo.bindBuffer(gl, true); + gl.glDrawElements(GL2ES2.GL_TRIANGLES, indicesFbo.getElementCount() * indicesFbo.getComponentCount(), GL2ES2.GL_UNSIGNED_SHORT, 0); + indicesFbo.bindBuffer(gl, false); verticeFboAttr.enableBuffer(gl, false); texCoordFboAttr.enableBuffer(gl, false); @@ -289,7 +291,9 @@ public class VBORegion2PES2 extends GLRegion { texCoordTxtAttr.enableBuffer(gl, true); indicesTxt.enableBuffer(gl, true); - gl.glDrawElements(GL2ES2.GL_TRIANGLES, indicesTxt.getElementCount() * indicesTxt.getComponentCount(), GL2ES2.GL_UNSIGNED_SHORT, 0); + indicesTxt.bindBuffer(gl, true); + gl.glDrawElements(GL2ES2.GL_TRIANGLES, indicesTxt.getElementCount() * indicesTxt.getComponentCount(), GL2ES2.GL_UNSIGNED_SHORT, 0); + indicesTxt.bindBuffer(gl, false); verticeTxtAttr.enableBuffer(gl, false); texCoordTxtAttr.enableBuffer(gl, false); diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java index 14ff0380f..7f3e937e1 100644 --- a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java +++ b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java @@ -129,8 +129,10 @@ public class VBORegionSPES2 extends GLRegion { verticeAttr.enableBuffer(gl, true); texCoordAttr.enableBuffer(gl, true); indices.enableBuffer(gl, true); - - gl.glDrawElements(GL2ES2.GL_TRIANGLES, indices.getElementCount() * indices.getComponentCount(), GL2ES2.GL_UNSIGNED_SHORT, 0); + + indices.bindBuffer(gl, true); + gl.glDrawElements(GL2ES2.GL_TRIANGLES, indices.getElementCount() * indices.getComponentCount(), GL2ES2.GL_UNSIGNED_SHORT, 0); + indices.bindBuffer(gl, false); verticeAttr.enableBuffer(gl, false); texCoordAttr.enableBuffer(gl, false); |