diff options
author | Kenneth Russel <[email protected]> | 2007-01-07 01:40:19 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2007-01-07 01:40:19 +0000 |
commit | 73f676f55b23e12c75b2e56f5484c4280fc68aef (patch) | |
tree | 2906309a1e300efac1a54c0748c388ffbed996ad /src/classes/com/sun/opengl/util/j2d/TextRenderer.java | |
parent | a4b0f29682539a6e3211d38bed5a17d12941f9b2 (diff) |
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
Diffstat (limited to 'src/classes/com/sun/opengl/util/j2d/TextRenderer.java')
-rwxr-xr-x | src/classes/com/sun/opengl/util/j2d/TextRenderer.java | 14 |
1 files changed, 13 insertions, 1 deletions
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; } |