From f82d0109c09ad885c1a7cdaed5b99e69188a30ed Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Tue, 27 Mar 2007 05:38:51 +0000 Subject: Added a markDirty() method to TextureRenderer and removed the sync() method. markDirty() may be called at an arbitrary point (in particular, when no OpenGL context is current) and the union of the dirty regions is automatically synced with the underlying texture during the next getTexture() operation, at which point the dirty region is cleared. Adjusted Overlay and TextRenderer classes. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/trunk@210 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4 --- src/demos/j2d/TestTextureRenderer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/demos/j2d/TestTextureRenderer.java') diff --git a/src/demos/j2d/TestTextureRenderer.java b/src/demos/j2d/TestTextureRenderer.java index 596115e..5702743 100755 --- a/src/demos/j2d/TestTextureRenderer.java +++ b/src/demos/j2d/TestTextureRenderer.java @@ -126,7 +126,7 @@ public class TestTextureRenderer implements GLEventListener { g2d.setColor(Color.WHITE); g2d.drawString(TEST_STRING, 10, 50); textBounds = gv.getPixelBounds(frc, 10, 50); - renderer.sync(textBounds.x, textBounds.y, textBounds.width, textBounds.height); + renderer.markDirty(textBounds.x, textBounds.y, textBounds.width, textBounds.height); } public void display(GLAutoDrawable drawable) { @@ -151,7 +151,7 @@ public class TestTextureRenderer implements GLEventListener { g2d.fillRect(fpsBounds.x, fpsBounds.y, fpsBounds.width, fpsBounds.height); g2d.setColor(Color.WHITE); g2d.drawString(fpsString, 10, 100); - renderer.sync(fpsBounds.x, fpsBounds.y, fpsBounds.width, fpsBounds.height); + renderer.markDirty(fpsBounds.x, fpsBounds.y, fpsBounds.width, fpsBounds.height); } time.update(); -- cgit v1.2.3