Package com.jogamp.graph.curve.opengl
Class GLRegion
java.lang.Object
com.jogamp.graph.curve.Region
com.jogamp.graph.curve.opengl.GLRegion
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:
-
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
Modifier and TypeMethodDescriptionvoidClears all data, i.e.static GLRegioncreate(int renderModes, TextureSequence colorTexSeq) Create a GLRegion using the passed render modefinal voidDelete and clear the associated OGL objects.final 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 Details
-
create
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
Clears all data, i.e. triangles, vertices etc. -
destroy
Delete and clear the associated OGL objects. -
draw
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:
- If
-