Top Description Fields Constructors Methods
com.jogamp.opengl.util

public Class RandomTileRenderer

extends TileRendererBase
Class Inheritance
Imports
com.jogamp.opengl.GL, .GL2ES3, .GLAutoDrawable, .GLException, com.jogamp.opengl.util.GLPixelBuffer.GLPixelAttributes

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

See TileRendererBase for details.

Field Summary

Modifier and TypeField and Description
private boolean
Inherited from com.jogamp.opengl.util.TileRendererBase:
beginCalledcurrentTileHeightcurrentTileWidthcurrentTileXPoscurrentTileYPosDEBUGgladgladAutoSwapBufferModegladRequiresPreSwapglEventListenerPostglEventListenerPreimageBufferimageSizelistenerslistenersInitpsmtileBufferTR_CURRENT_TILE_HEIGHTTR_CURRENT_TILE_WIDTHTR_CURRENT_TILE_X_POSTR_CURRENT_TILE_Y_POSTR_IMAGE_HEIGHTTR_IMAGE_WIDTH

Constructor Summary

AccessConstructor and Description
public
RandomTileRenderer()

Creates a new TileRenderer object

Method Summary

Modifier and TypeMethod and Description
public final void
beginTile(final GL
The gl context
gl
)

Implements abstract com.jogamp.opengl.util.TileRendererBase.beginTile.

Begins rendering a tile.
public void
display(final int tX, final int tY, final int tWidth, final int tHeight)

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

public void
endTile(final GL
the gl context
gl
)

Implements abstract com.jogamp.opengl.util.TileRendererBase.endTile.

Must be called after rendering the scene, see beginTile(GL).
public final boolean
eot()

Implements abstract com.jogamp.opengl.util.TileRendererBase.eot.

Returns true if end of tiling has been reached, otherwise false.
public final int
getParam(final int
The parameter name that is to be retrieved
pname
)

Implements abstract com.jogamp.opengl.util.TileRendererBase.getParam.

Gets the parameters of this TileRenderer object
public final boolean
isSetup()

Implements abstract com.jogamp.opengl.util.TileRendererBase.isSetup.

Returns true if this instance is setup properly, i.e. setImageSize(int, int) .., and ready for beginTile(GL).
public final void
reset()

Implements abstract com.jogamp.opengl.util.TileRendererBase.reset.

Method resets implementation's internal state to start of tiling as required for beginTile(GL) if end of tiling has been reached.
public void
setTileRect(final int tX, final int tY, final int tWidth, final int tHeight)

Set the tile rectangle for the subsequent rendering calls.

Inherited from com.jogamp.opengl.util.TileRendererBase:
attachAutoDrawabledetachAutoDrawabledisplaygetAttachedDrawablegetImageBuffergetImageSizegetTileBufferreqPreSwapBufferssetGLEventListenersetImageBuffersetImageSizesetTileBuffertileDetailstoStringtoStringvalidateGL

Field Detail

tileRectSetback to summary
private boolean tileRectSet

Constructor Detail

RandomTileRendererback to summary
public RandomTileRenderer()

Creates a new TileRenderer object

Method Detail

beginTileback to summary
public final void beginTile(final GL gl) throws IllegalStateException, GLException

Implements abstract com.jogamp.opengl.util.TileRendererBase.beginTile.

Doc from com.jogamp.opengl.util.TileRendererBase.beginTile.

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
gl:GL

The gl context

Annotations
@Override
Exceptions
IllegalStateException:
if image-size has not been set or tile-rect has not been set.
GLException:
if image buffer is used but gl instance is < GL2ES3
displayback to summary
public void display(final int tX, final int tY, final int tWidth, final int tHeight) throws IllegalStateException

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

Exceptions
IllegalStateException:
if no GLAutoDrawable is attached or imageSize is not set
endTileback to summary
public void endTile(final GL gl) throws IllegalStateException, GLException

Implements abstract com.jogamp.opengl.util.TileRendererBase.endTile.

Doc from com.jogamp.opengl.util.TileRendererBase.endTile.

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
gl:GL

the gl context

Annotations
@Override
Exceptions
IllegalStateException:
if beginTile(gl) has not been called
GLException:
if image buffer is used but gl instance is < GL2ES3
eotback to summary
public final boolean eot()

Implements abstract com.jogamp.opengl.util.TileRendererBase.eot.

Doc from com.jogamp.opengl.util.TileRendererBase.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.

Annotations
@Override
getParamback to summary
public final int getParam(final int pname)

Implements abstract com.jogamp.opengl.util.TileRendererBase.getParam.

Doc from com.jogamp.opengl.util.TileRendererBase.getParam.

Gets the parameters of this TileRenderer object

Parameters
pname:int

The parameter name that is to be retrieved

Returns:int

the value of the parameter

Annotations
@Override
isSetupback to summary
public final boolean isSetup()

Implements abstract com.jogamp.opengl.util.TileRendererBase.isSetup.

Doc from com.jogamp.opengl.util.TileRendererBase.isSetup.

Returns true if this instance is setup properly, i.e. setImageSize(int, int) .., and ready for beginTile(GL). Otherwise returns false.

Annotations
@Override
resetback to summary
public final void reset()

Implements abstract com.jogamp.opengl.util.TileRendererBase.reset.

Doc from com.jogamp.opengl.util.TileRendererBase.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.
Annotations
@Override
setTileRectback to summary
public 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.

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