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 voidclear(GL2ES2 gl)Clears all data, i.e.static GLRegioncreate(int renderModes, TextureSequence colorTexSeq)Create a GLRegion using the passed render modevoiddestroy(GL2ES2 gl)Delete and clear the associated OGL objects.voiddraw(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_BITis being requested the default texture unitRegion.DEFAULT_TWO_PASS_TEXTURE_UNITis being used.- Parameters:
renderModes- bit-field of modes, e.g.Region.VARWEIGHT_RENDERING_BIT,Region.VBAA_RENDERING_BITcolorTexSeq- optionalTextureSequenceforRegion.COLORTEXTURE_RENDERING_BITrendering 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
enablingthe renderer beforehand anddisablingit afterwards when used in conjunction with other renderer.Users shall also consider setting the
clear-colorappropriately:- If
blendingis enabled, RGB shall be set to text color, otherwise blending will reduce the alpha seam's contrast and the font will appear thinner. - If
blendingis disabled, RGB shall be set to the actual desired background.
blendingis enabled, theRegionRenderermight need to becreatedwith the appropriatecallbacks.- Parameters:
matrix- currentPMVMatrix.renderer- theRegionRendererto 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
-
-