aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/graph/geom/Vertex.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-02-24 13:32:34 +0100
committerSven Gothel <[email protected]>2014-02-24 13:32:34 +0100
commitc3621221b9a563495b4f54fe60e18e8db8cc57fb (patch)
tree00aded20f3582e517372c12f58e19d3524582099 /src/jogl/classes/com/jogamp/graph/geom/Vertex.java
parentf69df875d0b9f969a816d143ed589b25e50cd9e7 (diff)
Bug 802: Graph TextRenderer Performance Part-1 (incomplete, rendering artifacts)
Strategy Change: - Font.Glyph itself holds it's OutlineShape with it's default scaling. Triangulation is done only once per glyph! - A CharSequence produces a Region by translating and scaling each Glyphs's OutlineShape. This removes the need for re-triangulate - see above. See: TextRendererUtil - The indices of re-added Triangles are offset to the new vertices (FIXME, seems not be be accurate yet). - OutlineShape's vertices and triangles are reused if 'clean'. - Simplified code - Reduced copies API Changes: - OutlineShape, Region, ...: See above - Removed TextRenderer, GlyphShape and GlyphString: Redundant - Added TextRendererUtil to produce the Region from CharSequence Result: - Over 600 fps while changing text for each frame. Previously only ~60fps max. TODO: - Region shall not hold the triangles itself, but the indices instead. This will remove the need to swizzle w/ vertices in the Region Renderer impl and easies reusage of OutlineShapes.
Diffstat (limited to 'src/jogl/classes/com/jogamp/graph/geom/Vertex.java')
-rw-r--r--src/jogl/classes/com/jogamp/graph/geom/Vertex.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/jogl/classes/com/jogamp/graph/geom/Vertex.java b/src/jogl/classes/com/jogamp/graph/geom/Vertex.java
index 994253f71..fc9590ae7 100644
--- a/src/jogl/classes/com/jogamp/graph/geom/Vertex.java
+++ b/src/jogl/classes/com/jogamp/graph/geom/Vertex.java
@@ -37,6 +37,10 @@ public interface Vertex extends Vert3fImmutable, Cloneable {
public static interface Factory <T extends Vertex> {
T create();
+ T create(Vertex src);
+
+ T create(int id, boolean onCurve, float[] texCoordsBuffer);
+
T create(float x, float y, float z, boolean onCurve);
T create(float[] coordsBuffer, int offset, int length, boolean onCurve);