From f51933f0ebe9ae030c26c066e59a728ce08b8559 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sun, 23 Feb 2014 06:11:11 +0100 Subject: Bug 801: Graph TextRenderer Cleanup Part-1a (unclean) Remark: This commit is unclean and requires 'Part-1b' due to merging this commit after more than 2 years! Graph: - Use List instead of array allowing more flexible memory managment. - GLRegion -> Region promotion: - Region create(List outlineShapes, int renderModes) - Region create(OutlineShape outlineShape, int renderModes) - Region additions - void addOutlineShape(OutlineShape shape) - void addOutlineShapes(List shapes) - RegionRenderer - draw(..) remove 'position', redundant - - Deprecate 'TextRenderer' and 'GlyphString' Use Region.create(Font.getOutlineShapes(...)) + RegionRenderer instead. - FontInt -> Font promotion (make public) - getOutlineShape and getOutlineShapes - Font.Glyph additions - 'getID(), hashCode()' - 'float getScale(float pixelSize)' - GlyphShape - Add reference to Glyph allowing GlyphString to access the font metrics for translation and scaling - Experimental pre-scale/translation in GlyphString using default font size and it's metrics --- src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java') diff --git a/src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java b/src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java index 2f078d7bb..4b7c12fea 100644 --- a/src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java +++ b/src/jogl/classes/com/jogamp/graph/curve/opengl/RegionRenderer.java @@ -53,12 +53,11 @@ public abstract class RegionRenderer extends Renderer { /** Render an {@link OutlineShape} in 3D space at the position provided * the triangles of the shapes will be generated, if not yet generated * @param region the OutlineShape to Render. - * @param position the initial translation of the outlineShape. * @param texWidth desired texture width for multipass-rendering. * The actual used texture-width is written back when mp rendering is enabled, otherwise the store is untouched. * @throws Exception if HwRegionRenderer not initialized */ - public final void draw(GL2ES2 gl, Region region, float[] position, int[/*1*/] texWidth) { + public final void draw(GL2ES2 gl, Region region, int[/*1*/] texWidth) { if(!isInitialized()) { throw new GLException("RegionRenderer: not initialized!"); } @@ -66,14 +65,14 @@ public abstract class RegionRenderer extends Renderer { throw new GLException("Incompatible render modes, : region modes "+region.getRenderModes()+ " doesn't contain renderer modes "+this.getRenderModes()); } - drawImpl(gl, region, position, texWidth); + drawImpl(gl, region, texWidth); } /** * Usually just dispatched the draw call to the Region's draw implementation, * e.g. {@link com.jogamp.graph.curve.opengl.GLRegion#draw(GL2ES2, RenderState, int, int, int[]) GLRegion#draw(GL2ES2, RenderState, int, int, int[])}. */ - protected abstract void drawImpl(GL2ES2 gl, Region region, float[] position, int[] texWidth); + protected abstract void drawImpl(GL2ES2 gl, Region region, int[] texWidth); @Override protected void destroyImpl(GL2ES2 gl) { -- cgit v1.2.3