aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/graph/curve/opengl/GLRegion.java
diff options
context:
space:
mode:
authorSven Gothel <sgothel@jausoft.com>2014-02-27 10:53:06 +0100
committerSven Gothel <sgothel@jausoft.com>2014-02-27 10:53:06 +0100
commit2cafc01f08f9ab05748be6eeb82c417de38b31f7 (patch)
tree8fd55b032fa2585f75517287506604ca739bfed9 /src/jogl/classes/com/jogamp/graph/curve/opengl/GLRegion.java
parent073ac5ab63af792d8468d8bf074b982f7c44ef33 (diff)
Bug 801: Graph TextRenderer Cleanup Part-3: Region.addOutlineShape(..) Push GL data directly incl. all index validations
Region: - Remove redundant methods to make OutlineShape the unique source. - addVertex(..) - addTriangles(..) - Perform all index validations in addOutlineShape(..) - Push OutlineShape's vertex data and it's triangle indices directly to VBO. GLRegion: Add clear(..) method, allowing to clear the region for new data, i.e. OutlineShapes
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.java13
1 files changed, 10 insertions, 3 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 78c8660fa..7bf2ee6e1 100644
--- a/src/jogl/classes/com/jogamp/graph/curve/opengl/GLRegion.java
+++ b/src/jogl/classes/com/jogamp/graph/curve/opengl/GLRegion.java
@@ -27,12 +27,9 @@
*/
package com.jogamp.graph.curve.opengl;
-import java.util.List;
-
import javax.media.opengl.GL2ES2;
import com.jogamp.opengl.util.PMVMatrix;
-import com.jogamp.graph.curve.OutlineShape;
import com.jogamp.graph.curve.Region;
/** A GLRegion is the OGL binding of one or more OutlineShapes
@@ -77,6 +74,16 @@ public abstract class GLRegion extends Region {
*/
public abstract void destroy(GL2ES2 gl, RegionRenderer renderer);
+ protected abstract void clearImpl(final GL2ES2 gl, final RegionRenderer renderer);
+
+ /**
+ * Clears all data, i.e. triangles, vertices etc.
+ */
+ public void clear(final GL2ES2 gl, final RegionRenderer renderer) {
+ clearImpl(gl, renderer);
+ clearImpl();
+ }
+
/**
* Renders the associated OGL objects specifying
* current width/hight of window for multi pass rendering