From 307ba4ea320a91d5731274ed3191bea840d1fe70 Mon Sep 17 00:00:00 2001 From: Rami Santina Date: Mon, 2 May 2011 19:28:47 +0300 Subject: Added nonuniform weight impl; misc enhancements/cleanups Seperate texcoords from shaprness Added NonUniform weight shader impl for region impl only (not text) Refactor p1y --> weight (equiv to nurbs weight) cleanup shader uniforms (rename/remove unneeded) Enhanced blending of text GPURegionNewtDemo01 - added weight W/Q to manipulate weight refactor r2t --> vbaa (matching algorithm name) --- .../jogamp/graph/curve/text/GlyphString.java | 23 +++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'src/jogl/classes/jogamp/graph/curve/text/GlyphString.java') diff --git a/src/jogl/classes/jogamp/graph/curve/text/GlyphString.java b/src/jogl/classes/jogamp/graph/curve/text/GlyphString.java index 1faee87ff..a904c2b48 100644 --- a/src/jogl/classes/jogamp/graph/curve/text/GlyphString.java +++ b/src/jogl/classes/jogamp/graph/curve/text/GlyphString.java @@ -73,18 +73,18 @@ public class GlyphString { } /** Creates the Curve based Glyphs from a Font - * @param pointFactory TODO + * @param vertexFactory vertex impl factory {@link Factory} * @param paths a list of FontPath2D objects that define the outline * @param affineTransform a global affine transformation applied to the paths. */ - public void createfromFontPath(Factory pointFactory, Path2D[] paths, AffineTransform affineTransform) { + public void createfromFontPath(Factory vertexFactory, Path2D[] paths, AffineTransform affineTransform) { final int numGlyps = paths.length; for (int index=0;index initializeTriangles(float sharpness){ + private ArrayList initializeTriangles(){ ArrayList triangles = new ArrayList(); for(GlyphShape glyph:glyphs){ - ArrayList tris = glyph.triangulate(sharpness); + ArrayList tris = glyph.triangulate(); triangles.addAll(tris); } return triangles; } - + /** Generate a OGL Region to represent this Object. - * @param context the GLContext which the region is defined by. - * @param shaprness the curvature sharpness of the object. - * @param st shader state + * @param gl the current gl object + * @param rs the current attached RenderState + * @param type either {@link com.jogamp.graph.curve.Region#SINGLE_PASS} + * or {@link com.jogamp.graph.curve.Region#TWO_PASS} */ public void generateRegion(GL2ES2 gl, RenderState rs, int type){ region = RegionFactory.create(rs, type); region.setFlipped(true); - ArrayList tris = initializeTriangles(rs.getSharpness().floatValue()); + ArrayList tris = initializeTriangles(); region.addTriangles(tris); int numVertices = region.getNumVertices(); @@ -155,7 +156,7 @@ public class GlyphString { } /** Destroy the associated OGL objects - * @param rs TODO + * @param rs the current attached RenderState */ public void destroy(GL2ES2 gl, RenderState rs){ region.destroy(gl, rs); -- cgit v1.2.3