summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-05-09 14:25:59 +0200
committerSven Gothel <[email protected]>2011-05-09 14:25:59 +0200
commit1303328b476570d94e56c9d2fc061e3b09cf538a (patch)
tree4781aab739a4c321fefc92e872d3817b44b787b9 /src/jogl/classes/com/jogamp
parent4ccf5ed0cc14743a3a97d7b0dcc61e839d263a1a (diff)
Loop: Fix invert; GlyphString/createRegion: Remove unnecessary on-the-fly object creation
Diffstat (limited to 'src/jogl/classes/com/jogamp')
-rw-r--r--src/jogl/classes/com/jogamp/graph/curve/Region.java25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/jogl/classes/com/jogamp/graph/curve/Region.java b/src/jogl/classes/com/jogamp/graph/curve/Region.java
index 320483d8d..46bdedee4 100644
--- a/src/jogl/classes/com/jogamp/graph/curve/Region.java
+++ b/src/jogl/classes/com/jogamp/graph/curve/Region.java
@@ -83,6 +83,18 @@ public abstract class Region {
return numVertices;
}
+ /** Adds a {@link Triangle} object to the Region
+ * This triangle will be bound to OGL objects
+ * on the next call to {@code update}
+ * @param tri a triangle object
+ *
+ * @see update(GL2ES2)
+ */
+ public void addTriangle(Triangle tri) {
+ triangles.add(tri);
+ setDirty(true);
+ }
+
/** Adds a list of {@link Triangle} objects to the Region
* These triangles are to be binded to OGL objects
* on the next call to {@code update}
@@ -95,6 +107,19 @@ public abstract class Region {
setDirty(true);
}
+ /** Adds a {@link Vertex} object to the Region
+ * This vertex will be bound to OGL objects
+ * on the next call to {@code update}
+ * @param vert a vertex objects
+ *
+ * @see update(GL2ES2)
+ */
+ public void addVertex(Vertex vert) {
+ vertices.add(vert);
+ numVertices++;
+ setDirty(true);
+ }
+
/** Adds a list of {@link Vertex} objects to the Region
* These vertices are to be binded to OGL objects
* on the next call to {@code update}