Class TileRendererBase

java.lang.Object
com.jogamp.opengl.util.TileRendererBase
Direct Known Subclasses:
RandomTileRenderer, TileRenderer

public abstract class TileRendererBase extends Object
A fairly direct port of Brian Paul's tile rendering library, found at http://www.mesa3d.org/brianp/TR.html . I've java-fied it, but the functionality is the same.

Original code Copyright (C) 1997-2005 Brian Paul. Licensed under BSD-compatible terms with permission of the author. See LICENSE.txt for license information.

Enhanced for GL and GL2ES3, abstracted to suit TileRenderer and RandomTileRenderer.

PMV Matrix Considerations

The PMV matrix needs to be reshaped in user code after calling beginTile(GL), See beginTile(GL).

If attaching to an GLAutoDrawable, the TileRendererBase.TileRendererListener.reshapeTile(TileRendererBase, int, int, int, int, int, int) method is being called after beginTile(GL) for each rendered tile. It's implementation shall reshape the PMV matrix according to beginTile(GL).

GL Profile Requirement

Note that image buffer can only be used in conjunction w/ a GL instance ≥ GL2ES3 passed to beginTile(GL) and endTile(GL).
This is due to setting up the pack row length for an image width != tile-width, which usually is the case.
Hence a GLException is thrown in both methods, if using an image buffer and passing a GL instance < GL2ES3.

Further more, reading back of MSAA buffers is only supported since GL2ES3 since it requires to set the read-buffer.

Author:
ryanm, sgothel