com.jogamp.opengl.util

## Interface TileRendererBase.TileRendererListener

- Enclosing class:
    TileRendererBase

      public static interface TileRendererBase.TileRendererListener

  Listener for tile renderer events, intended to extend `GLEventListener` implementations, enabling tile rendering via `TileRendererBase.attachAutoDrawable(GLAutoDrawable)`.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addTileRendererNotify(TileRendererBase tr)` The owning `GLAutoDrawable` is `attached` to the given `TileRendererBase` instance.
    `void` | `endTileRendering(TileRendererBase tr)` Called by the `TileRenderer` during tile-rendering after `TileRendererBase.endTile(GL)` and `GLDrawable.swapBuffers()`.
    `void` | `removeTileRendererNotify(TileRendererBase tr)` The owning `GLAutoDrawable` is `detached` from the given `TileRendererBase` instance.
    `void` | `reshapeTile(TileRendererBase tr, int tileX, int tileY, int tileWidth, int tileHeight, int imageWidth, int imageHeight)` Called by the `TileRendererBase` during tile-rendering via an `attached` `GLAutoDrawable`'s `GLAutoDrawable.display()` call for each tile before `#display(GLAutoDrawable)`.
    `void` | `startTileRendering(TileRendererBase tr)` Called by the `TileRendererBase` during tile-rendering after `TileRendererBase.beginTile(GL)` and before `reshapeTile(..)`.

- - ### Method Detail

    - #### addTileRendererNotify

          void addTileRendererNotify(TileRendererBase tr)

      The owning `GLAutoDrawable` is `attached` to the given `TileRendererBase` instance.

      The `GLContext` of the `TileRendererBase`'s `attached` `GLAutoDrawable` is not current.

      Parameters:
        `tr` - the associated `TileRendererBase`
      See Also:
        `TileRendererBase.getAttachedDrawable()`

    - #### removeTileRendererNotify

          void removeTileRendererNotify(TileRendererBase tr)

      The owning `GLAutoDrawable` is `detached` from the given `TileRendererBase` instance.

      The `GLContext` of the `TileRendererBase`'s `attached` `GLAutoDrawable` is not current.

      Parameters:
        `tr` - the disassociated `TileRendererBase`
      See Also:
        `TileRendererBase.getAttachedDrawable()`

    - #### reshapeTile

          void reshapeTile(TileRendererBase tr,
                         int tileX,
                         int tileY,
                         int tileWidth,
                         int tileHeight,
                         int imageWidth,
                         int imageHeight)

      Called by the `TileRendererBase` during tile-rendering via an `attached` `GLAutoDrawable`'s `GLAutoDrawable.display()` call for each tile before `#display(GLAutoDrawable)`.

      The PMV Matrix shall be reshaped according to the given

      - current tile-position
      - current tile-size
      - final image-size
      The GL viewport is already set to origin 0/0 and the current tile-size.
      See details in `TileRendererBase.beginTile(GL)`.

      The `GLContext` of the `TileRendererBase`'s `attached` `GLAutoDrawable` is current.

      Parameters:
        `tr` - the issuing `TileRendererBase`
        `tileX` - the `current tile's x-pos`
        `tileY` - the `current tile's y-pos`
        `tileWidth` - the `current tile's width`
        `tileHeight` - the `current tile's height`
        `imageWidth` - the `final image width`
        `imageHeight` - the `final image height`
      See Also:
        `TileRendererBase.getAttachedDrawable()`

    - #### startTileRendering

          void startTileRendering(TileRendererBase tr)

      Called by the `TileRendererBase` during tile-rendering after `TileRendererBase.beginTile(GL)` and before `reshapeTile(..)`.

      If `TileRendererBase` is of type `TileRenderer`, method is called for the first tile of all tiles.
      Otherwise, i.e. `RandomTileRenderer`, method is called for each particular tile.

      The `GLContext` of the `TileRenderer`'s `attached` `GLAutoDrawable` is current.

      Parameters:
        `tr` - the issuing `TileRendererBase`

    - #### endTileRendering

          void endTileRendering(TileRendererBase tr)

      Called by the `TileRenderer` during tile-rendering after `TileRendererBase.endTile(GL)` and `GLDrawable.swapBuffers()`.

      If `TileRendererBase` is of type `TileRenderer`, method is called for the last tile of all tiles.
      Otherwise, i.e. `RandomTileRenderer`, method is called for each particular tile.

      The `GLContext` of the `TileRenderer`'s `attached` `GLAutoDrawable` is current.

      Parameters:
        `tr` - the issuing `TileRendererBase`

Copyright 2010 JogAmp Community.