From 73f676f55b23e12c75b2e56f5484c4280fc68aef Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Sun, 7 Jan 2007 01:40:19 +0000 Subject: Added new FlyingText demo to illustrate more advanced usage of the TextRenderer class; displays dynamically rotated, translated and colored text. Changed how setSmoothing() is handled by the TextureRenderer and stopped disabling smoothing in the TextRenderer. For the time being, not exposing this flag in that class to keep the API simple. Changed TextRenderer to also push/pop the texture matrix. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1073 232f8b59-042b-4e1e-8c03-345bb8c30851 --- src/classes/com/sun/opengl/util/j2d/TextRenderer.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/classes/com/sun/opengl/util/j2d/TextRenderer.java') diff --git a/src/classes/com/sun/opengl/util/j2d/TextRenderer.java b/src/classes/com/sun/opengl/util/j2d/TextRenderer.java index e97c31173..027f857fe 100755 --- a/src/classes/com/sun/opengl/util/j2d/TextRenderer.java +++ b/src/classes/com/sun/opengl/util/j2d/TextRenderer.java @@ -365,6 +365,19 @@ public class TextRenderer { } } + /** Disposes of all resources this TextRenderer is using. It is not + valid to use the TextRenderer after this method is called. + + @throws GLException If an OpenGL context is not current when this method is called + */ + public void dispose() throws GLException { + packer.dispose(); + packer = null; + cachedBackingStore = null; + cachedGraphics = null; + cachedFontRenderContext = null; + } + //---------------------------------------------------------------------- // Internals only below this point // @@ -466,7 +479,6 @@ public class TextRenderer { // store (i.e., non-default Paint, foreground color, etc.), but // for now, let's just be more efficient TextureRenderer renderer = TextureRenderer.createAlphaOnlyRenderer(w, h); - renderer.setSmoothing(false); return renderer; } -- cgit v1.2.3