From 4ef53cf2ae509a625795bfa3a8982ce75e24e83a Mon Sep 17 00:00:00 2001
From: Sven Gothel <sgothel@jausoft.com>
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/javax/media/opengl/awt/GLCanvas.java | 2 +-
 src/jogl/classes/javax/media/opengl/awt/GLJPanel.java | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

(limited to 'src/jogl/classes/javax/media/opengl/awt')

diff --git a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java
index 1ab30547a..b7c8c42f9 100644
--- a/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java
+++ b/src/jogl/classes/javax/media/opengl/awt/GLCanvas.java
@@ -784,7 +784,7 @@ public class GLCanvas extends Canvas implements AWTGLAutoDrawable, WindowClosing
           }
           printAWTTiles.setIsGLOriented(printGLAD.isGLOriented());
           printAWTTiles.renderer.setTileSize(printGLAD.getWidth(), printGLAD.getHeight(), 0);
-          printAWTTiles.renderer.attachToAutoDrawable(printGLAD);
+          printAWTTiles.renderer.attachAutoDrawable(printGLAD);
           if( DEBUG ) {
               System.err.println("AWT print.setup "+printAWTTiles);
               System.err.println("AWT print.setup AA "+printNumSamples+", "+caps);
diff --git a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
index 61ff4997e..e52317041 100644
--- a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
+++ b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
@@ -559,7 +559,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
           }
           printAWTTiles.setIsGLOriented(printGLAD.isGLOriented());
           printAWTTiles.renderer.setTileSize(printGLAD.getWidth(), printGLAD.getHeight(), 0);
-          printAWTTiles.renderer.attachToAutoDrawable(printGLAD);
+          printAWTTiles.renderer.attachAutoDrawable(printGLAD);
           if( DEBUG ) {
               System.err.println("AWT print.setup "+printAWTTiles);
               System.err.println("AWT print.setup AA "+printNumSamples+", "+caps);
-- 
cgit v1.2.3