From 4ef53cf2ae509a625795bfa3a8982ce75e24e83a Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 27 Sep 2013 07:13:24 +0200 Subject: TileRenderer*: TileRendererNotify -> TileRendererListener w/ clarifying functionality (reshapeTile(..), ..); Only process GLEventListener impl. TileRendererListener; attachToAutoDrawable -> attachAutoDrawable, etc. -TileRendererNotify -> TileRendererListener - Added methods: - void reshapeTile(TileRendererBase tr,int tileX, int tileY, int tileWidth, int tileHeight, int imageWidth, int imageHeight); - void startTileRendering(TileRendererBase tr); - void endTileRendering(TileRendererBase tr); allowing to clarify user code and API specification, i.e. TR only processes GLEventListener which impl. TileRendererListener. This also allows simplifying the API doc, while having a more descriptive reshape method focusing solely on tile rendering. Further more, the start/end TR methods allow certain GL related actions while the context is current before and after iterating through the tiles. This is even used for RandomTileRenderer (one tile only), to allow to reuse same TileRendererListener for diff TRs. - Fix language, attach and detach usage was vice versa. We do attach an GLAutoDrawable to a TR - attachToAutoDrawable -> attachAutoDrawable - detachFromAutoDrawable -> detachAutoDrawable - Adapted unit tests. --- src/jogl/classes/jogamp/opengl/awt/AWTTilePainter.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/jogl/classes/jogamp/opengl/awt') diff --git a/src/jogl/classes/jogamp/opengl/awt/AWTTilePainter.java b/src/jogl/classes/jogamp/opengl/awt/AWTTilePainter.java index 0aab049a0..2b921f799 100644 --- a/src/jogl/classes/jogamp/opengl/awt/AWTTilePainter.java +++ b/src/jogl/classes/jogamp/opengl/awt/AWTTilePainter.java @@ -114,7 +114,7 @@ public class AWTTilePainter { /** * Assumes a configured {@link TileRenderer}, i.e. - * an {@link TileRenderer#attachToAutoDrawable(GLAutoDrawable) attached} + * an {@link TileRenderer#attachAutoDrawable(GLAutoDrawable) attached} * {@link GLAutoDrawable} with {@link TileRenderer#setTileSize(int, int, int) set tile size}. *

* Sets the renderer to {@link TileRenderer#TR_TOP_TO_BOTTOM} row order. @@ -241,11 +241,11 @@ public class AWTTilePainter { } /** - * Disposes resources and {@link TileRenderer#detachFromAutoDrawable() detaches} + * Disposes resources and {@link TileRenderer#detachAutoDrawable() detaches} * the {@link TileRenderer}'s {@link GLAutoDrawable}. */ public void dispose() { - renderer.detachFromAutoDrawable(); // tile-renderer -> printGLAD + renderer.detachAutoDrawable(); // tile-renderer -> printGLAD g2d = null; if( null != tBuffer ) { tBuffer.dispose(); -- cgit v1.2.3