diff options
author | Kenneth Russel <[email protected]> | 2007-01-04 05:38:42 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2007-01-04 05:38:42 +0000 |
commit | 10c76681d1507fa527b59cb28bcde5d1c6a4fe18 (patch) | |
tree | 022d2a464953178f3d36b7249a9e40ba6f36be0e /src/classes | |
parent | 34f3b9eaf1e117c3a61fca577be58dc608b99dd9 (diff) |
Moved J2DTextureRenderer and J2DOverlay into their own sub-package and
dropped the prefixes on the suggestion of Chris Campbell. No other
changes to these classes. Added com.sun.opengl.util.j2d to the javadoc
generation. Updated demos.
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1066 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/classes')
-rwxr-xr-x | src/classes/com/sun/opengl/util/j2d/Overlay.java (renamed from src/classes/com/sun/opengl/util/J2DOverlay.java) | 16 | ||||
-rwxr-xr-x | src/classes/com/sun/opengl/util/j2d/TextureRenderer.java (renamed from src/classes/com/sun/opengl/util/J2DTextureRenderer.java) | 6 |
2 files changed, 11 insertions, 11 deletions
diff --git a/src/classes/com/sun/opengl/util/J2DOverlay.java b/src/classes/com/sun/opengl/util/j2d/Overlay.java index 3bb4de9ee..d427ab176 100755 --- a/src/classes/com/sun/opengl/util/J2DOverlay.java +++ b/src/classes/com/sun/opengl/util/j2d/Overlay.java @@ -37,7 +37,7 @@ * and developed by Kenneth Bradley Russell and Christopher John Kline. */ -package com.sun.opengl.util; +package com.sun.opengl.util.j2d; import java.awt.Graphics2D; @@ -48,17 +48,17 @@ import com.sun.opengl.util.texture.*; making it easier to do things like draw text and images on top of an OpenGL scene while still maintaining reasonably good efficiency. For correct operation, the drawable should be - allocated with alpha bits enabled, as the J2DOverlay uses alpha + allocated with alpha bits enabled, as the Overlay uses alpha blending to make portions of itself transparent. */ -public class J2DOverlay { +public class Overlay { private GLDrawable drawable; - private J2DTextureRenderer renderer; + private TextureRenderer renderer; private boolean contentsLost; /** Creates a new Java 2D overlay on top of the specified GLDrawable. */ - public J2DOverlay(GLDrawable drawable) { + public Overlay(GLDrawable drawable) { this.drawable = drawable; } @@ -198,9 +198,9 @@ public class J2DOverlay { private void validateRenderer() { if (renderer == null) { - renderer = new J2DTextureRenderer(drawable.getWidth(), - drawable.getHeight(), - true); + renderer = new TextureRenderer(drawable.getWidth(), + drawable.getHeight(), + true); contentsLost = true; } else if (renderer.getWidth() != drawable.getWidth() || renderer.getHeight() != drawable.getHeight()) { diff --git a/src/classes/com/sun/opengl/util/J2DTextureRenderer.java b/src/classes/com/sun/opengl/util/j2d/TextureRenderer.java index de4aee9b8..552a66a3d 100755 --- a/src/classes/com/sun/opengl/util/J2DTextureRenderer.java +++ b/src/classes/com/sun/opengl/util/j2d/TextureRenderer.java @@ -37,7 +37,7 @@ * and developed by Kenneth Bradley Russell and Christopher John Kline. */ -package com.sun.opengl.util; +package com.sun.opengl.util.j2d; import java.awt.Dimension; import java.awt.Graphics2D; @@ -55,7 +55,7 @@ import com.sun.opengl.util.texture.*; that image to an OpenGL texture on demand. The resulting OpenGL texture can then be mapped on to a polygon for display. */ -public class J2DTextureRenderer { +public class TextureRenderer { // For now, we supply only a BufferedImage back-end for this // renderer. In theory we could use the Java 2D/JOGL bridge to fully // accelerate the rendering paths, but there are restrictions on @@ -81,7 +81,7 @@ public class J2DTextureRenderer { @param height the height of the texture to render into @param alpha whether to allocate an alpha channel for the texture */ - public J2DTextureRenderer(int width, int height, boolean alpha) { + public TextureRenderer(int width, int height, boolean alpha) { this.alpha = alpha; init(width, height); } |