summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/graph/curve
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/jogamp/graph/curve')
-rw-r--r--src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PMSAAES2.java17
-rw-r--r--src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PVBAAES2.java16
-rw-r--r--src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java11
3 files changed, 9 insertions, 35 deletions
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PMSAAES2.java b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PMSAAES2.java
index c09e75b53..bc87b3faa 100644
--- a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PMSAAES2.java
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PMSAAES2.java
@@ -40,6 +40,7 @@ import com.jogamp.opengl.GLUniformData;
import jogamp.graph.curve.opengl.shader.AttributeNames;
import jogamp.graph.curve.opengl.shader.UniformNames;
+import com.jogamp.graph.curve.Region;
import com.jogamp.graph.curve.opengl.GLRegion;
import com.jogamp.graph.curve.opengl.RegionRenderer;
import com.jogamp.graph.curve.opengl.RenderState;
@@ -322,7 +323,7 @@ public final class VBORegion2PMSAAES2 extends GLRegion {
/**
* <p>
* Since multiple {@link Region}s may share one
- * {@link ShaderProgram}, the uniform data must always be updated.
+ * {@link ShaderProgram} managed and owned by {@link RegionRendered}, the uniform data must always be updated.
* </p>
*
* @param gl
@@ -629,18 +630,6 @@ public final class VBORegion2PMSAAES2 extends GLRegion {
}
@Override
- protected void clearShaderImpl(final GL2ES2 gl) {
- if( null != spPass1 ) {
- spPass1.destroy(gl);
- spPass1 = null;
- }
- if( null != spPass2 ) {
- spPass2.destroy(gl);
- spPass2 = null;
- }
- }
-
- @Override
protected void destroyImpl(final GL2ES2 gl) {
if(DEBUG_INSTANCE) {
System.err.println("VBORegion2PES2 Destroy: " + this);
@@ -677,5 +666,7 @@ public final class VBORegion2PMSAAES2 extends GLRegion {
indicesFbo.destroy(gl);
indicesFbo = null;
}
+ spPass1 = null; // owned by RegionRenderer
+ spPass2 = null; // owned by RegionRenderer
}
}
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PVBAAES2.java b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PVBAAES2.java
index 96247c61a..21f454655 100644
--- a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PVBAAES2.java
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegion2PVBAAES2.java
@@ -128,7 +128,7 @@ public final class VBORegion2PVBAAES2 extends GLRegion {
/**
* <p>
* Since multiple {@link Region}s may share one
- * {@link ShaderProgram}, the uniform data must always be updated.
+ * {@link ShaderProgram} managed and owned by {@link RegionRendered}, the uniform data must always be updated.
* </p>
*
* @param gl
@@ -762,18 +762,6 @@ public final class VBORegion2PVBAAES2 extends GLRegion {
}
@Override
- protected void clearShaderImpl(final GL2ES2 gl) {
- if( null != spPass1 ) {
- spPass1.destroy(gl);
- spPass1 = null;
- }
- if( null != spPass2 ) {
- spPass2.destroy(gl);
- spPass2 = null;
- }
- }
-
- @Override
protected void destroyImpl(final GL2ES2 gl) {
if(DEBUG_INSTANCE) {
System.err.println("VBORegion2PES2 Destroy: " + this);
@@ -813,5 +801,7 @@ public final class VBORegion2PVBAAES2 extends GLRegion {
indicesFbo.destroy(gl);
indicesFbo = null;
}
+ spPass1 = null; // owned by RegionRenderer
+ spPass2 = null; // owned by RegionRenderer
}
}
diff --git a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java
index b8bdfbe37..0077186e6 100644
--- a/src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java
+++ b/src/jogl/classes/jogamp/graph/curve/opengl/VBORegionSPES2.java
@@ -265,7 +265,7 @@ public final class VBORegionSPES2 extends GLRegion {
/**
* <p>
* Since multiple {@link Region}s may share one
- * {@link ShaderProgram}, the uniform data must always be updated.
+ * {@link ShaderProgram} managed and owned by {@link RegionRendered}, the uniform data must always be updated.
* </p>
*
* @param gl
@@ -345,14 +345,6 @@ public final class VBORegionSPES2 extends GLRegion {
}
@Override
- protected void clearShaderImpl(final GL2ES2 gl) {
- if( null != spPass1 ) {
- spPass1.destroy(gl);
- spPass1 = null;
- }
- }
-
- @Override
protected void destroyImpl(final GL2ES2 gl) {
if(DEBUG_INSTANCE) {
System.err.println("VBORegionSPES2 Destroy: " + this);
@@ -373,5 +365,6 @@ public final class VBORegionSPES2 extends GLRegion {
indicesBuffer.destroy(gl);
indicesBuffer = null;
}
+ spPass1 = null; // owned by RegionRenderer
}
}