Top Description Fields Constructors Methods
com.jogamp.graph.curve.opengl

public abstract Class GLRegion

extends Region
Class Inheritance
Known Direct Subclasses
jogamp.graph.curve.opengl.VBORegion2PMSAAES2, jogamp.graph.curve.opengl.VBORegion2PVBAAES2, jogamp.graph.curve.opengl.VBORegionSPES2
Imports
com.jogamp.opengl.GL, .GL2ES2, jogamp.graph.curve.opengl.VBORegion2PMSAAES2, .VBORegion2PVBAAES2, .VBORegionSPES2, com.jogamp.opengl.util.PMVMatrix, com.jogamp.opengl.util.texture.TextureSequence, com.jogamp.graph.curve.Region, .OutlineShape

A GLRegion is the OGL binding of one or more OutlineShapes Defined by its vertices and generated triangles. The Region defines the final shape of the OutlineShape(s), which shall produced a shaded region on the screen. Implementations of the GLRegion shall take care of the OGL binding of the depending on its context, profile.
See Also
Region, OutlineShape

Field Summary

Modifier and TypeField and Description
protected final TextureSequence
Inherited from com.jogamp.graph.curve.Region:
boxCOLORCHANNEL_RENDERING_BITCOLORTEXTURE_RENDERING_BITDEBUGDEBUG_INSTANCEDEFAULT_TWO_PASS_TEXTURE_UNITDIRTY_SHAPEDIRTY_STATEfrustumMAX_QUALITYMSAA_RENDERING_BITVARWEIGHT_RENDERING_BITVBAA_RENDERING_BIT

Constructor Summary

AccessConstructor and Description
protected
GLRegion(final int renderModes, final TextureSequence colorTexSeq)

Method Summary

Modifier and TypeMethod and Description
public void
clear(final GL2ES2 gl)

Clears all data, i.e. triangles, vertices etc.

protected abstract void
clearImpl(final GL2ES2 gl)

public static GLRegion
create(int renderModes, final TextureSequence colorTexSeq)

Create a GLRegion using the passed render mode

In case Region#VBAA_RENDERING_BIT is being requested the default texture unit Region#DEFAULT_TWO_PASS_TEXTURE_UNIT is being used.

public final void
destroy(final GL2ES2 gl)

Delete and clear the associated OGL objects.

protected abstract void
destroyImpl(final GL2ES2 gl)

public final void
draw(final GL2ES2
current PMVMatrix.
gl
,
final RegionRenderer
the RegionRenderer to be used
renderer
,
final int[]
desired multisampling sample count for msaa-rendering. The actual used scample-count is written back when msaa-rendering is enabled, otherwise the store is untouched.
sampleCount
)

Renders the associated OGL objects specifying current width/hight of window for multi pass rendering of the region.

protected abstract void
drawImpl(final GL2ES2 gl, final RegionRenderer renderer, final int[] sampleCount)

protected abstract void
updateImpl(final GL2ES2 gl)

Updates a graph region by updating the ogl related objects for use in rendering if isShapeDirty().

Inherited from com.jogamp.graph.curve.Region:
addOutlineShapeaddOutlineShapesclearDirtyBitsclearImplgetBoundsgetDirtyBitsgetFrustumgetQualitygetRenderModesgetRenderModeStringhasColorChannelhasColorChannelhasColorTexturehasColorTexturehasVariableWeighthasVariableWeightisMSAAisMSAAisShapeDirtyisStateDirtyisTwoPassisVBAAisVBAAmarkShapeDirtymarkStateDirtypushIndexpushVertexsetFrustumsetQualitytoString

Field Detail

colorTexSeqback to summary
protected final TextureSequence colorTexSeq

Constructor Detail

GLRegionback to summary
protected GLRegion(final int renderModes, final TextureSequence colorTexSeq)

Method Detail

clearback to summary
public void clear(final GL2ES2 gl)

Clears all data, i.e. triangles, vertices etc.

clearImplback to summary
protected abstract void clearImpl(final GL2ES2 gl)
createback to summary
public static GLRegion create(int renderModes, final TextureSequence colorTexSeq)

Create a GLRegion using the passed render mode

In case Region#VBAA_RENDERING_BIT is being requested the default texture unit Region#DEFAULT_TWO_PASS_TEXTURE_UNIT is being used.

Parameters
renderModes:int

bit-field of modes, e.g. Region#VARWEIGHT_RENDERING_BIT, Region#VBAA_RENDERING_BIT

colorTexSeq:TextureSequence

optional TextureSequence for Region#COLORTEXTURE_RENDERING_BIT rendering mode.

destroyback to summary
public final void destroy(final GL2ES2 gl)

Delete and clear the associated OGL objects.

destroyImplback to summary
protected abstract void destroyImpl(final GL2ES2 gl)
drawback to summary
public final void draw(final GL2ES2 gl, final RegionRenderer renderer, final int[] sampleCount)

Renders the associated OGL objects specifying current width/hight of window for multi pass rendering of the region.

User shall consider enabling the renderer beforehand and disabling it afterwards when used in conjunction with other renderer.

Users shall also consider setting the clear-color appropriately:

  • If blending is enabled, RGB shall be set to text color, otherwise blending will reduce the alpha seam's contrast and the font will appear thinner.
  • If blending is disabled, RGB shall be set to the actual desired background.
The alpha component shall be set to zero.

Note

If blending is enabled, the RegionRenderer might need to be created with the appropriate callbacks.

Parameters
gl:GL2ES2

current PMVMatrix.

renderer:RegionRenderer

the RegionRenderer to be used

sampleCount:int[]

desired multisampling sample count for msaa-rendering. The actual used scample-count is written back when msaa-rendering is enabled, otherwise the store is untouched.

See Also
RegionRenderer#enable(GL2ES2, boolean)
drawImplback to summary
protected abstract void drawImpl(final GL2ES2 gl, final RegionRenderer renderer, final int[] sampleCount)
updateImplback to summary
protected abstract void updateImpl(final GL2ES2 gl)

Updates a graph region by updating the ogl related objects for use in rendering if isShapeDirty().

Allocates the ogl related data and initializes it the 1st time.

Called by draw(GL2ES2, RenderState, int, int, int).