diff options
Diffstat (limited to 'src/jogl/classes/com/jogamp/graph/curve/opengl/GLRegion.java')
-rw-r--r-- | src/jogl/classes/com/jogamp/graph/curve/opengl/GLRegion.java | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/jogl/classes/com/jogamp/graph/curve/opengl/GLRegion.java b/src/jogl/classes/com/jogamp/graph/curve/opengl/GLRegion.java index 7bf2ee6e1..6d0e5e538 100644 --- a/src/jogl/classes/com/jogamp/graph/curve/opengl/GLRegion.java +++ b/src/jogl/classes/com/jogamp/graph/curve/opengl/GLRegion.java @@ -61,18 +61,15 @@ public abstract class GLRegion extends Region { super(renderModes);
}
- /** Updates a graph region by updating the ogl related
- * objects for use in rendering if {@link #isDirty()}.
- * <p>Allocates the ogl related data and initializes it the 1st time.<p>
- * <p>Called by {@link #draw(GL2ES2, RenderState, int, int, int)}.</p>
- * @param rs TODO
+ /**
+ * Updates a graph region by updating the ogl related
+ * objects for use in rendering if {@link #isDirty()}.
+ * <p>Allocates the ogl related data and initializes it the 1st time.<p>
+ * <p>Called by {@link #draw(GL2ES2, RenderState, int, int, int)}.</p>
*/
protected abstract void update(GL2ES2 gl, RegionRenderer renderer);
- /** Delete and clean the associated OGL
- * objects
- */
- public abstract void destroy(GL2ES2 gl, RegionRenderer renderer);
+ protected abstract void destroyImpl(GL2ES2 gl, RegionRenderer renderer);
protected abstract void clearImpl(final GL2ES2 gl, final RegionRenderer renderer);
@@ -85,6 +82,14 @@ public abstract class GLRegion extends Region { }
/**
+ * Delete and clear the associated OGL objects.
+ */
+ public final void destroy(GL2ES2 gl, RegionRenderer renderer) {
+ clear(gl, renderer);
+ destroyImpl(gl, renderer);
+ }
+
+ /**
* Renders the associated OGL objects specifying
* current width/hight of window for multi pass rendering
* of the region.
|