summaryrefslogtreecommitdiffstats
path: root/src/demos/j2d/TestTextRenderer.java
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2007-01-06 00:43:17 +0000
committerKenneth Russel <[email protected]>2007-01-06 00:43:17 +0000
commit2b34526dd5c5274d14862f23b81f79dc7fbbe469 (patch)
tree4d1122217ee0b7e4ae1828b2bf0f2f2e58236d82 /src/demos/j2d/TestTextRenderer.java
parenta4d2028b3827d9fe6041caf9cdf8e30fccdd87c2 (diff)
With help from Chris Campbell, fixed incredibly stupid bug on my part
where the new Java 2D TextureRenderer was destroying and re-creating the OpenGL texture every frame. This was why the Java 2D Overlay class was so expensive, and why the TextRenderer wasn't as fast as it seemed it should be. Fixed bugs in all of the Java 2D demos which were covered up by this implicit sync, as well as in the TextRenderer class itself where it was missing a key sync operation. Added code to the Texture.updateSubImage() implementation to clip the incoming rectangle to the bounds of the input data and texture, to keep OpenGL from dropping almost-valid updates on the floor. Ran all of the Java 2D integration demos to verify these fixes. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/trunk@198 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
Diffstat (limited to 'src/demos/j2d/TestTextRenderer.java')
-rwxr-xr-xsrc/demos/j2d/TestTextRenderer.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/demos/j2d/TestTextRenderer.java b/src/demos/j2d/TestTextRenderer.java
index 853009c..0356606 100755
--- a/src/demos/j2d/TestTextRenderer.java
+++ b/src/demos/j2d/TestTextRenderer.java
@@ -134,7 +134,7 @@ public class TestTextRenderer implements GLEventListener {
fpsText = "FPS: " + format.format(fps);
if (fpsWidth == 0) {
// Place it at a fixed offset wrt the lower right corner
- fpsWidth = (int) renderer.getBounds("FPS: 1000.00").getWidth();
+ fpsWidth = (int) renderer.getBounds("FPS: 10000.00").getWidth();
}
}