From c3621221b9a563495b4f54fe60e18e8db8cc57fb Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 24 Feb 2014 13:32:34 +0100 Subject: 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. --- make/scripts/tests.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'make/scripts/tests.sh') diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh index 8b1b79771..ad7222bc5 100644 --- a/make/scripts/tests.sh +++ b/make/scripts/tests.sh @@ -229,6 +229,8 @@ function jrun() { #D_ARGS="-Dnativewindow.osx.calayer.bugfree" #D_ARGS="-Dnativewindow.debug.ToolkitLock" #D_ARGS="-Djogl.debug.graph.curve" + #D_ARGS="-Djogl.debug.graph.curve -Djogl.debug.graph.curve.instance" + #D_ARGS="-Djogl.debug.graph.curve.instance" #D_ARGS="-Djogl.debug.graph.curve -Djogl.debug.GLSLCode -Djogl.debug.TraceGL" #D_ARGS="-Djogl.debug.graph.curve -Djogl.debug.GLSLState" #D_ARGS="-Djogamp.debug.TempJarCache -Djogamp.debug.JarUtil -Djogamp.debug.IOUtil" @@ -728,8 +730,8 @@ function testawtswt() { # # Graph # -#testnoawt com.jogamp.opengl.test.junit.graph.TestTextRendererNEWT00 $* -testnoawt com.jogamp.opengl.test.junit.graph.TestRegionRendererNEWT01 $* +#testnoawt com.jogamp.opengl.test.junit.graph.TestRegionRendererNEWT01 $* +testnoawt com.jogamp.opengl.test.junit.graph.TestTextRendererNEWT00 $* #testnoawt com.jogamp.opengl.test.junit.graph.TestTextRendererNEWT01 $* #testnoawt com.jogamp.opengl.test.junit.graph.TestTextRendererNEWTPerf01 $* #testnoawt com.jogamp.opengl.test.junit.graph.TestTextRendererNEWT10 $* -- cgit v1.2.3