JOGL v2.6.0-rc-20250712
JOGL, High-Performance Graphics Binding for Java™ (public API).
com.jogamp.opengl.util.RandomTileRenderer Class Reference

Variation of TileRenderer w/o using fixed tiles but arbitrary rectangular regions. More...

Inheritance diagram for com.jogamp.opengl.util.RandomTileRenderer:
Collaboration diagram for com.jogamp.opengl.util.RandomTileRenderer:

Public Member Functions

 RandomTileRenderer ()
 Creates a new TileRenderer object. More...
 
final int getParam (final int pname)
 Gets the parameters of this TileRenderer object. More...
 
void setTileRect (final int tX, final int tY, final int tWidth, final int tHeight) throws IllegalStateException, IllegalArgumentException
 Set the tile rectangle for the subsequent rendering calls. More...
 
final boolean isSetup ()
 Returns true if this instance is setup properly, i.e. More...
 
final boolean eot ()
 Returns true if end of tiling has been reached, otherwise false.end of tiling criteria is implementation specific and may never be reached. User needs to reset() tiling after reaching end of tiling before calling beginTile(GL) again. More...
 
final void reset ()
 Method resets implementation's internal state to start of tiling as required for beginTile(GL) if end of tiling has been reached.Implementation is a nop where end of tiling is never reached. More...
 
final void beginTile (final GL gl) throws IllegalStateException, GLException
 Begins rendering a tile.This method modifies the viewport, see below. User shall reset the viewport when finishing all tile rendering, i.e. after very last call of endTile(GL)! The PMV Matrix must be reshaped after this call using:

Use shall render the scene afterwards, concluded with a call to this renderer endTile(GL). User has to comply with the GL profile requirement. If end of tiling has been reached, user needs to reset() tiling before calling this method.
Parameters
glThe gl context
Exceptions
IllegalStateExceptionif image-size is undefined, an implementation related setup has not be performed or {@ link eot()} has been reached. See implementing classes.
GLExceptionif image buffer is used but gl instance is < GL2ES3
See also
isSetup()
eot()
reset()
More...
 
void endTile (final GL gl) throws IllegalStateException, GLException
 Must be called after rendering the scene, see beginTile(GL). More...
 
void display (final int tX, final int tY, final int tWidth, final int tHeight) throws IllegalStateException
 Rendering one tile, by simply calling GLAutoDrawable#display(). More...
 
- Public Member Functions inherited from com.jogamp.opengl.util.TileRendererBase
StringBuilder toString (final StringBuilder sb)
 
String toString ()
 
abstract int getParam (int pname) throws IllegalArgumentException
 Gets the parameters of this TileRenderer object. More...
 
final void setTileBuffer (final GLPixelBuffer buffer)
 Specify a buffer the tiles to be copied to. More...
 
final GLPixelBuffer getTileBuffer ()
 
void setImageSize (final int width, final int height)
 Sets the desired size of the final image. More...
 
final DimensionImmutable getImageSize ()
 
final void setImageBuffer (final GLPixelBuffer buffer)
 Sets the buffer in which to store the final image. More...
 
final GLPixelBuffer getImageBuffer ()
 
abstract boolean isSetup ()
 Returns true if this instance is setup properly, i.e. More...
 
abstract boolean eot ()
 Returns true if end of tiling has been reached, otherwise false. More...
 
abstract void reset ()
 Method resets implementation's internal state to start of tiling as required for beginTile(GL) if end of tiling has been reached. More...
 
abstract void beginTile (GL gl) throws IllegalStateException, GLException
 Begins rendering a tile. More...
 
abstract void endTile (GL gl) throws IllegalStateException, GLException
 Must be called after rendering the scene, see beginTile(GL). More...
 
final boolean reqPreSwapBuffers (final GLCapabilitiesImmutable chosenCaps)
 Determines whether the chosen GLCapabilitiesImmutable requires a pre-swap-buffers before accessing the results, i.e. More...
 
final void attachAutoDrawable (final GLAutoDrawable glad) throws IllegalStateException
 Attaches the given GLAutoDrawable to this tile renderer. More...
 
final GLAutoDrawable getAttachedDrawable ()
 Returns a previously attached GLAutoDrawable, null if none is attached. More...
 
final void detachAutoDrawable ()
 Detaches the given GLAutoDrawable from this tile renderer. More...
 
final void setGLEventListener (final GLEventListener preTile, final GLEventListener postTile)
 Set GLEventListener for pre- and post operations when used w/ attachAutoDrawable(GLAutoDrawable) for each GLEventListener callback. More...
 
final void display () throws IllegalStateException
 Rendering one tile, by simply calling GLAutoDrawable#display(). More...
 

Additional Inherited Members

- Static Public Attributes inherited from com.jogamp.opengl.util.TileRendererBase
static final int TR_IMAGE_WIDTH = 1
 The width of the final image. More...
 
static final int TR_IMAGE_HEIGHT = 2
 The height of the final image. More...
 
static final int TR_CURRENT_TILE_X_POS = 3
 The x-pos of the current tile. More...
 
static final int TR_CURRENT_TILE_Y_POS = 4
 The y-pos of the current tile. More...
 
static final int TR_CURRENT_TILE_WIDTH = 5
 The width of the current tile. More...
 
static final int TR_CURRENT_TILE_HEIGHT = 6
 The height of the current tile. More...
 
- Protected Member Functions inherited from com.jogamp.opengl.util.TileRendererBase
StringBuilder tileDetails (final StringBuilder sb)
 
 TileRendererBase ()
 
- Protected Attributes inherited from com.jogamp.opengl.util.TileRendererBase
final Dimension imageSize = new Dimension(0, 0)
 
final GLPixelStorageModes psm = new GLPixelStorageModes()
 
GLPixelBuffer imageBuffer
 
GLPixelBuffer tileBuffer
 
boolean beginCalled = false
 
int currentTileXPos
 
int currentTileYPos
 
int currentTileWidth
 
int currentTileHeight
 
GLAutoDrawable glad
 
boolean gladRequiresPreSwap
 
boolean gladAutoSwapBufferMode = true
 
GLEventListener[] listeners
 
boolean[] listenersInit
 
GLEventListener glEventListenerPre = null
 
GLEventListener glEventListenerPost = null
 

Detailed Description

Variation of TileRenderer w/o using fixed tiles but arbitrary rectangular regions.

See TileRendererBase for details.

Definition at line 43 of file RandomTileRenderer.java.

Constructor & Destructor Documentation

◆ RandomTileRenderer()

com.jogamp.opengl.util.RandomTileRenderer.RandomTileRenderer ( )

Creates a new TileRenderer object.

Definition at line 49 of file RandomTileRenderer.java.

Member Function Documentation

◆ beginTile()

final void com.jogamp.opengl.util.RandomTileRenderer.beginTile ( final GL  gl) throws IllegalStateException, GLException

Begins rendering a tile.This method modifies the viewport, see below. User shall reset the viewport when finishing all tile rendering, i.e. after very last call of endTile(GL)! The PMV Matrix must be reshaped after this call using:

Use shall render the scene afterwards, concluded with a call to this renderer endTile(GL). User has to comply with the GL profile requirement. If end of tiling has been reached, user needs to reset() tiling before calling this method.
Parameters
glThe gl context
Exceptions
IllegalStateExceptionif image-size is undefined, an implementation related setup has not be performed or {@ link eot()} has been reached. See implementing classes.
GLExceptionif image buffer is used but gl instance is < GL2ES3
See also
isSetup()
eot()
reset()

Exceptions
IllegalStateExceptionif image-size has not been set or tile-rect has not been set.

Reimplemented from com.jogamp.opengl.util.TileRendererBase.

Definition at line 123 of file RandomTileRenderer.java.

Here is the call graph for this function:

◆ display()

void com.jogamp.opengl.util.RandomTileRenderer.display ( final int  tX,
final int  tY,
final int  tWidth,
final int  tHeight 
) throws IllegalStateException

Rendering one tile, by simply calling GLAutoDrawable#display().

Exceptions
IllegalStateExceptionif no GLAutoDrawable is attached or imageSize is not set

Definition at line 232 of file RandomTileRenderer.java.

Here is the call graph for this function:

◆ endTile()

void com.jogamp.opengl.util.RandomTileRenderer.endTile ( final GL  gl) throws IllegalStateException, GLException

Must be called after rendering the scene, see beginTile(GL).

Please consider reqPreSwapBuffers(GLCapabilitiesImmutable) to determine whether you need to perform swap-buffers before or after calling this method!

User has to comply with the GL profile requirement.

Parameters
glthe gl context
Exceptions
IllegalStateExceptionif beginTile(gl) has not been called
GLExceptionif image buffer is used but gl instance is < GL2ES3

Reimplemented from com.jogamp.opengl.util.TileRendererBase.

Definition at line 146 of file RandomTileRenderer.java.

Here is the call graph for this function:

◆ eot()

final boolean com.jogamp.opengl.util.RandomTileRenderer.eot ( )

Returns true if end of tiling has been reached, otherwise false.end of tiling criteria is implementation specific and may never be reached. User needs to reset() tiling after reaching end of tiling before calling beginTile(GL) again.

end of tiling is never reached w/ RandomRileRenderer, i.e. method always returns false.

Reimplemented from com.jogamp.opengl.util.TileRendererBase.

Definition at line 106 of file RandomTileRenderer.java.

◆ getParam()

final int com.jogamp.opengl.util.RandomTileRenderer.getParam ( final int  pname)

Gets the parameters of this TileRenderer object.

Parameters
pnameThe parameter name that is to be retrieved
Returns
the value of the parameter
Exceptions
IllegalArgumentExceptionif pname is not handled

Reimplemented from com.jogamp.opengl.util.TileRendererBase.

Definition at line 54 of file RandomTileRenderer.java.

Here is the call graph for this function:

◆ isSetup()

final boolean com.jogamp.opengl.util.RandomTileRenderer.isSetup ( )

Returns true if this instance is setup properly, i.e.

setImageSize(int, int) .., and ready for beginTile(GL). Otherwise returns false.

Reimplemented from com.jogamp.opengl.util.TileRendererBase.

Definition at line 93 of file RandomTileRenderer.java.

Here is the call graph for this function:

◆ reset()

final void com.jogamp.opengl.util.RandomTileRenderer.reset ( )

Method resets implementation's internal state to start of tiling as required for beginTile(GL) if end of tiling has been reached.Implementation is a nop where end of tiling is never reached.

Reset internal states of RandomTileRenderer are: none.

Reimplemented from com.jogamp.opengl.util.TileRendererBase.

Definition at line 114 of file RandomTileRenderer.java.

◆ setTileRect()

void com.jogamp.opengl.util.RandomTileRenderer.setTileRect ( final int  tX,
final int  tY,
final int  tWidth,
final int  tHeight 
) throws IllegalStateException, IllegalArgumentException

Set the tile rectangle for the subsequent rendering calls.

Exceptions
IllegalArgumentExceptionis tile x/y are < 0 or tile size is <= 0x0

Definition at line 78 of file RandomTileRenderer.java.

Here is the caller graph for this function:

The documentation for this class was generated from the following file: