aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PVBAAES2.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PVBAAES2.java')
-rw-r--r--src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PVBAAES2.java38
1 files changed, 4 insertions, 34 deletions
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PVBAAES2.java b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PVBAAES2.java
index ac7ec21fc..3acbd6c73 100644
--- a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PVBAAES2.java
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PVBAAES2.java
@@ -232,14 +232,8 @@ public final class VBORegion2PVBAAES2 extends GLRegion {
// seal buffers
indicesBuffer.seal(gl, true);
indicesBuffer.enableBuffer(gl, false);
- gca_CurveParamsAttr.seal(gl, true);
- gca_CurveParamsAttr.enableBuffer(gl, false);
- gca_VerticesAttr.seal(gl, true);
- gca_VerticesAttr.enableBuffer(gl, false);
- if( hasColorChannel && null != gca_ColorsAttr ) {
- gca_ColorsAttr.seal(gl, true);
- gca_ColorsAttr.enableBuffer(gl, false);
- }
+ vpc_ileave.seal(gl, true);
+ vpc_ileave.enableBuffer(gl, false);
if( hasColorTexture && null != gcu_ColorTexUnit && colorTexSeq.isTextureAvailable() ) {
final TextureSequence.TextureFrame frame = colorTexSeq.getLastTexture();
final Texture tex = frame.getTexture();
@@ -577,11 +571,7 @@ public final class VBORegion2PVBAAES2 extends GLRegion {
gl.glUniform(gcu_PMVMatrix02);
- gca_VerticesAttr.enableBuffer(gl, true);
- gca_CurveParamsAttr.enableBuffer(gl, true);
- if( hasColorChannel && null != gca_ColorsAttr ) {
- gca_ColorsAttr.enableBuffer(gl, true);
- }
+ vpc_ileave.enableBuffer(gl, true);
indicesBuffer.bindBuffer(gl, true); // keeps VBO binding
if( hasColorTexture && null != gcu_ColorTexUnit && colorTexSeq.isTextureAvailable() ) {
final TextureSequence.TextureFrame frame = colorTexSeq.getNextTexture(gl);
@@ -599,11 +589,7 @@ public final class VBORegion2PVBAAES2 extends GLRegion {
}
indicesBuffer.bindBuffer(gl, false);
- if( hasColorChannel && null != gca_ColorsAttr ) {
- gca_ColorsAttr.enableBuffer(gl, false);
- }
- gca_CurveParamsAttr.enableBuffer(gl, false);
- gca_VerticesAttr.enableBuffer(gl, false);
+ vpc_ileave.enableBuffer(gl, false);
}
@Override
@@ -617,22 +603,6 @@ public final class VBORegion2PVBAAES2 extends GLRegion {
fbo = null;
texA = null;
}
- if(null != gca_VerticesAttr) {
- gca_VerticesAttr.destroy(gl);
- gca_VerticesAttr = null;
- }
- if(null != gca_CurveParamsAttr) {
- gca_CurveParamsAttr.destroy(gl);
- gca_CurveParamsAttr = null;
- }
- if(null != gca_ColorsAttr) {
- gca_ColorsAttr.destroy(gl);
- gca_ColorsAttr = null;
- }
- if(null != indicesBuffer) {
- indicesBuffer.destroy(gl);
- indicesBuffer = null;
- }
if(null != gca_FboVerticesAttr) {
gca_FboVerticesAttr.destroy(gl);