Package com.jogamp.graph.curve.opengl
Class GLRegion
- java.lang.Object
-
- com.jogamp.graph.curve.Region
-
- com.jogamp.graph.curve.opengl.GLRegion
-
public abstract class GLRegion extends Region
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
-
Fields inherited from class com.jogamp.graph.curve.Region
COLORCHANNEL_RENDERING_BIT, COLORTEXTURE_RENDERING_BIT, DEBUG, DEBUG_INSTANCE, DEFAULT_TWO_PASS_TEXTURE_UNIT, MAX_QUALITY, MSAA_RENDERING_BIT, VARWEIGHT_RENDERING_BIT, VBAA_RENDERING_BIT
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear(GL2ES2 gl)
Clears all data, i.e.static GLRegion
create(int renderModes, TextureSequence colorTexSeq)
Create a GLRegion using the passed render modevoid
destroy(GL2ES2 gl)
Delete and clear the associated OGL objects.void
draw(GL2ES2 gl, RegionRenderer renderer, int[] sampleCount)
Renders the associated OGL objects specifying current width/hight of window for multi pass rendering of the region.-
Methods inherited from class com.jogamp.graph.curve.Region
addOutlineShape, addOutlineShapes, getBounds, getFrustum, getQuality, getRenderModes, getRenderModeString, hasColorChannel, hasColorChannel, hasColorTexture, hasColorTexture, hasVariableWeight, hasVariableWeight, isMSAA, isMSAA, isShapeDirty, isStateDirty, isTwoPass, isVBAA, isVBAA, markShapeDirty, markStateDirty, setFrustum, setQuality, toString
-
-
-
-
Method Detail
-
create
public static GLRegion create(int renderModes, TextureSequence colorTexSeq)
Create a GLRegion using the passed render modeIn case
Region.VBAA_RENDERING_BIT
is being requested the default texture unitRegion.DEFAULT_TWO_PASS_TEXTURE_UNIT
is being used.- Parameters:
renderModes
- bit-field of modes, e.g.Region.VARWEIGHT_RENDERING_BIT
,Region.VBAA_RENDERING_BIT
colorTexSeq
- optionalTextureSequence
forRegion.COLORTEXTURE_RENDERING_BIT
rendering mode.
-
clear
public void clear(GL2ES2 gl)
Clears all data, i.e. triangles, vertices etc.
-
destroy
public final void destroy(GL2ES2 gl)
Delete and clear the associated OGL objects.
-
draw
public final void draw(GL2ES2 gl, RegionRenderer renderer, 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 anddisabling
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.
blending
is enabled, theRegionRenderer
might need to becreated
with the appropriatecallbacks
.- Parameters:
matrix
- currentPMVMatrix
.renderer
- theRegionRenderer
to be usedsampleCount
- 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)
- If
-
-