|
JOGL v2.6.0-rc-20250712
JOGL, High-Performance Graphics Binding for Java (public API).
|
A GLRegion is the OGL binding of one or more OutlineShapes Defined by its vertices and generated triangles. More...
Public Member Functions | |
| GLArrayDataServer | createInterleaved (final boolean useMappedBuffers, final int comps, final int dataType, final boolean normalized, final int initialSize, final int vboUsage) |
| void | addInterleavedVertexAndNormalArrays (final GLArrayDataServer array, final int components) |
| final boolean | growBuffer (final int verticesCount, final int indicesCount) |
| Increase the renderer buffers if necessary to add given counts of vertices- and index elements. More... | |
| final boolean | setBufferCapacity (final int verticesCount, final int indicesCount) |
| Set the renderer buffers pre-emptively for given vertices- and index counts. More... | |
| final void | printBufferStats (final PrintStream out) |
| Print implementation buffer stats like detailed and total size and capacity in bytes etc. More... | |
| abstract void | setTextureUnit (final int pass2TexUnit) |
| Set the 2nd pass texture unit. More... | |
| final GLRegion | clear (final GL2ES2 gl) |
| Clears all buffers, i.e. More... | |
| final void | destroy (final GL2ES2 gl) |
| Delete and clear the associated OGL objects. More... | |
| final void | draw (final GL2ES2 gl, final RegionRenderer renderer) |
| Renders the associated OGL objects specifying current width/hight of window for optional multi pass rendering of the region. More... | |
| final void | drawToSelect (final GL2ES2 gl, final RegionRenderer renderer) |
| Perform glSelect false color rendering: pass1 w/o any color texture nor channel, use static select color only. More... | |
Public Member Functions inherited from com.jogamp.graph.curve.Region | |
| abstract void | printBufferStats (PrintStream out) |
| Print implementation buffer stats like detailed and total size and capacity in bytes etc. More... | |
| final boolean | usesI32Idx () |
Returns true if implementation uses int32_t sized indices implying at least a GLProfile#isGL2ES3() alike context. More... | |
| abstract boolean | growBuffer (int verticesCount, int indicesCount) |
| Increase the renderer buffers if necessary to add given counts of vertices- and index elements. More... | |
| abstract boolean | setBufferCapacity (int verticesCount, int indicesCount) |
| Set the renderer buffers pre-emptively for given vertices- and index counts. More... | |
| final int | getRenderModes () |
Returns bit-field of render modes, see create(..). More... | |
| final boolean | isRenderModeSet (final int mask) |
| final boolean | isVBAA () |
| Returns true if capable of two pass rendering - VBAA, otherwise false. More... | |
| final boolean | isMSAA () |
| Returns true if capable of two pass rendering - MSAA, otherwise false. More... | |
| final boolean | hasVariableWeight () |
| Returns true if capable of variable weights, otherwise false. More... | |
| final boolean | hasColorChannel () |
Returns true if getRenderModes() has a color channel, i.e. More... | |
| final boolean | hasColorTexture () |
| Returns true if render mode has a color texture, i.e. More... | |
| final Frustum | getFrustum () |
See setFrustum(Frustum). More... | |
| final void | setFrustum (final Frustum frustum) |
Set Frustum culling for addOutlineShape(OutlineShape, AffineTransform, float[]). More... | |
| PerfCounterCtrl | perfCounter () |
| final void | addOutlineShape (final OutlineShape shape, final AffineTransform t, final Vec4f rgbaColor) |
Add the given OutlineShape to this region with the given optional AffineTransform. More... | |
| final void | addOutlineShapes (final List< OutlineShape > shapes, final AffineTransform transform, final Vec4f rgbaColor) |
Add the given list of OutlineShapes to this region with the given optional AffineTransform. More... | |
| final AABBox | getBounds () |
| final void | markShapeDirty () |
| Mark this region's shape dirty, i.e. More... | |
| final boolean | isShapeDirty () |
Returns true if this region's shape are dirty, see markShapeDirty(). More... | |
| final void | markStateDirty () |
| Mark this region's render-state dirty, i.e. More... | |
| final boolean | isStateDirty () |
Returns true if this region's state is dirty, see markStateDirty(). More... | |
| String | toString () |
Static Public Member Functions | |
| static GLRegion | create (final GLProfile glp, int renderModes, final TextureSequence colorTexSeq, final int pass2TexUnit, final int initialVerticesCount, final int initialIndicesCount) |
| Create a GLRegion using the passed render mode. More... | |
| static GLRegion | create (final GLProfile glp, final int renderModes, final TextureSequence colorTexSeq, final int initialVerticesCount, final int initialIndicesCount) |
| Create a GLRegion using the passed render mode. More... | |
| static GLRegion | create (final GLProfile glp, final int renderModes, final TextureSequence colorTexSeq) |
Create a GLRegion using the passed render mode and default initial buffer sizes defaultVerticesCount and defaultIndicesCount. More... | |
| static GLRegion | create (final GLProfile glp, final int renderModes, final TextureSequence colorTexSeq, final OutlineShape shape) |
Create a GLRegion using the passed render mode and pre-calculating its buffer sizes using Region#countOutlineShape(OutlineShape, int[]). More... | |
| static GLRegion | create (final GLProfile glp, final int renderModes, final TextureSequence colorTexSeq, final Font font, final CharSequence str) |
Create a GLRegion using the passed render mode and pre-calculating its buffer sizes using given font's Font#processString(com.jogamp.graph.font.Font.GlyphVisitor2, CharSequence) to countOutlineShape(OutlineShape, int[]). More... | |
Static Public Member Functions inherited from com.jogamp.graph.curve.Region | |
| static final int | clipAAQuality (final int v) |
Returns clipped AA quality value to [Region#MIN_AA_QUALITY..Region#MAX_AA_QUALITY]. More... | |
| static final int | clipAASampleCount (final int v) |
Returns clipped AA sample-count to [Region#MIN_AA_SAMPLE_COUNT..Region#MAX_AA_SAMPLE_COUNT]. More... | |
| static final boolean | isRenderModeSet (final int renderModes, final int mask) |
| static final int | setRenderMode (int renderModes, final int mask, final boolean v) |
| static boolean | isVBAA (final int renderModes) |
Returns true if given renderModes has Region#VBAA_RENDERING_BIT set. More... | |
| static boolean | isMSAA (final int renderModes) |
Returns true if given renderModes has Region#MSAA_RENDERING_BIT set. More... | |
| static boolean | isGraphAA (final int renderModes) |
Returns true if given renderModes has any of Region#AA_RENDERING_MASK set. More... | |
| static boolean | isTwoPass (final int renderModes) |
Returns true if given renderModes has any of Region#AA_RENDERING_MASK set. More... | |
| static boolean | hasVariableWeight (final int renderModes) |
| Returns true if render mode capable of variable weights, i.e. More... | |
| static boolean | hasColorChannel (final int renderModes) |
| Returns true if render mode has a color channel, i.e. More... | |
| static boolean | hasColorTexture (final int renderModes) |
| Returns true if render mode has a color texture, i.e. More... | |
| static String | getRenderModeString (final int renderModes) |
| Returns a unique technical description string for renderModes as follows: More... | |
| static String | getRenderModeString (final int renderModes, final int graphAAQuality, final int graphSampleCount, final int fsaaSampleCount) |
| Return a unique technical description string for renderModes and sample counts as follows: More... | |
| static final int[] | countOutlineShape (final OutlineShape shape, final int[] vertIndexCount) |
Count required number of vertices and indices adding to given int[2] vertIndexCount array. More... | |
| static final int[] | countOutlineShapes (final List< OutlineShape > shapes, final int[] vertIndexCount) |
Count required number of vertices and indices adding to given int[2] vertIndexCount array. More... | |
Static Public Attributes | |
| static final int | defaultVerticesCount = 64 |
| Heuristics with TestTextRendererNEWT00 text_1 + text_2 = 1334 chars. More... | |
| static final int | defaultIndicesCount = 64 |
| Default initial indices count {@value}, assuming small sized shapes. More... | |
Static Public Attributes inherited from com.jogamp.graph.curve.Region | |
| static final boolean | DEBUG_ALL_EVENT = Debug.debugExplicit("graph.curve.AllEvent") |
| static final boolean | DEBUG_INSTANCE = Debug.debugExplicit("graph.curve.Instance") |
| static final boolean | DEBUG = DEBUG_ALL_EVENT || Debug.debug("graph.curve") |
| Debug flag for [com. More... | |
| static final int | NORM_RENDERING_BIT = 0 |
Rendering-Mode bit for Region. More... | |
| static final int | MSAA_RENDERING_BIT = 1 << 0 |
Rendering-Mode bit for Region. More... | |
| static final int | VBAA_RENDERING_BIT = 1 << 1 |
Rendering-Mode bit for Region. More... | |
| static final int | AA_RENDERING_MASK = MSAA_RENDERING_BIT | VBAA_RENDERING_BIT |
2-pass rendering bit-mask including MSAA_RENDERING_BIT and VBAA_RENDERING_BIT. More... | |
| static final int | VARWEIGHT_RENDERING_BIT = 1 << 8 |
Rendering-Mode bit for Region. More... | |
| static final int | COLORCHANNEL_RENDERING_BIT = 1 << 9 |
Rendering-Mode bit for Region to optionally enable a color-channel per vertex. More... | |
| static final int | COLORTEXTURE_RENDERING_BIT = 1 << 10 |
Rendering-Mode bit for Region. More... | |
| static final int | MIN_AA_QUALITY = 0 |
Minimum pass2 AA-quality rendering {@value} for Graph Region AA render-modes: VBAA_RENDERING_BIT. More... | |
| static final int | MAX_AA_QUALITY = 1 |
Maximum pass2 AA-quality rendering {@value} for Graph Region AA render-modes: VBAA_RENDERING_BIT. More... | |
| static final int | DEFAULT_AA_QUALITY = MAX_AA_QUALITY |
Default pass2 AA-quality rendering {@value} for Graph Region AA render-modes: VBAA_RENDERING_BIT. More... | |
| static final int | MIN_AA_SAMPLE_COUNT = 1 |
Minimum pass2 AA sample count {@value} for Graph Region AA render-modes: Region#VBAA_RENDERING_BIT or Region#MSAA_RENDERING_BIT. More... | |
| static final int | MAX_AA_SAMPLE_COUNT = 8 |
Maximum pass2 AA sample count {@value} for Graph Region AA render-modes: Region#VBAA_RENDERING_BIT or Region#MSAA_RENDERING_BIT. More... | |
| static final int | DEFAULT_AA_SAMPLE_COUNT = 4 |
Default pass2 AA sample count {@value} for Graph Region AA render-modes: VBAA_RENDERING_BIT or Region#MSAA_RENDERING_BIT. More... | |
| static final int | DEFAULT_TWO_PASS_TEXTURE_UNIT = 0 |
Protected Member Functions | |
| GLRegion (final GLProfile glp, final int renderModes, final TextureSequence colorTexSeq) | |
| final int | glIdxType () |
| final void | initBuffer (final int verticeCount, final int indexCount) |
| final void | pushVertex (final Vec3f coords, final Vec3f texParams, final Vec4f rgba) |
| final void | pushVertices (final Vec3f coords1, final Vec3f coords2, final Vec3f coords3, final Vec3f texParams1, final Vec3f texParams2, final Vec3f texParams3, final Vec4f rgba) |
| final void | pushIndex (final int idx) |
| final void | pushIndices (final int idx1, final int idx2, final int idx3) |
| abstract void | clearImpl (final GL2ES2 gl) |
| abstract void | destroyImpl (final GL2ES2 gl) |
| abstract void | updateImpl (final GL2ES2 gl, final RegionRenderer renderer, final int curRenderModes) |
Updates a graph region by updating the ogl related objects for use in rendering if isShapeDirty(). More... | |
| abstract void | drawImpl (final GL2ES2 gl, final RegionRenderer renderer, final int curRenderModes) |
Protected Member Functions inherited from com.jogamp.graph.curve.Region | |
| Region (final int regionRenderModes, final boolean use_int32_idx) | |
| abstract void | pushVertex (final Vec3f coords, final Vec3f texParams, Vec4f rgba) |
| abstract void | pushVertices (final Vec3f coords1, final Vec3f coords2, final Vec3f coords3, final Vec3f texParams1, final Vec3f texParams2, final Vec3f texParams3, Vec4f rgba) |
| abstract void | pushIndex (int idx) |
| abstract void | pushIndices (int idx1, int idx2, int idx3) |
| final void | clearImpl () |
| final void | clearDirtyBits (final int v) |
See markShapeDirty() and markStateDirty(). More... | |
| final int | getDirtyBits () |
Protected Attributes | |
| final TextureSequence | colorTexSeq |
| int | curVerticesCap = 0 |
| int | curIndicesCap = 0 |
| int | growCount = 0 |
| GLArrayDataServer | vpc_ileave = null |
| Interleaved buffer for GLSL attributes: vectices, curveParams and optionally colors. More... | |
| GLArrayDataWrapper | gca_VerticesAttr = null |
| GLArrayDataWrapper | gca_CurveParamsAttr = null |
| GLArrayDataWrapper | gca_ColorsAttr = null |
| GLArrayDataServer | indicesBuffer = null |
Protected Attributes inherited from com.jogamp.graph.curve.Region | |
| final AABBox | box = new AABBox() |
| Frustum | frustum = null |
Static Protected Attributes | |
| static final float | growthFactor = GLArrayDataClient.DEFAULT_GROWTH_FACTOR |
Static Protected Attributes inherited from com.jogamp.graph.curve.Region | |
| static final int | DIRTY_SHAPE = 1 << 0 |
| static final int | DIRTY_STATE = 1 << 1 |
| static final int | GL_UINT16_MAX = 0xffff |
| static final int | GL_INT32_MAX = 0x7fffffff |
Additional Inherited Members | |
Static Protected Member Functions inherited from com.jogamp.graph.curve.Region | |
| static void | put3i (final IntBuffer b, final int v1, final int v2, final int v3) |
| static void | put3s (final ShortBuffer b, final short v1, final short v2, final short v3) |
| static void | put3f (final FloatBuffer b, final Vec3f v) |
| static void | put4f (final FloatBuffer b, final float v1, final float v2, final float v3, final float v4) |
| static void | put4f (final FloatBuffer b, final Vec4f v) |
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.
Definition at line 70 of file GLRegion.java.
|
protected |
| void com.jogamp.graph.curve.opengl.GLRegion.addInterleavedVertexAndNormalArrays | ( | final GLArrayDataServer | array, |
| final int | components | ||
| ) |
Clears all buffers, i.e.
triangles, vertices etc and and resets states accordingly, see GLArrayDataEditable#clear(GL).
This method does not actually erase the data in the buffer and will most often be used when erasing the underlying memory is suitable.
| gl | the current GL2ES2 object |
GLRegion for chaining. Definition at line 436 of file GLRegion.java.
|
abstractprotected |
|
static |
Create a GLRegion using the passed render mode and default initial buffer sizes defaultVerticesCount and defaultIndicesCount.
In case Region#VBAA_RENDERING_BIT is being requested the default texture unit Region#DEFAULT_TWO_PASS_TEXTURE_UNIT is being used.
| glp | intended GLProfile to use. Instance may use higher OpenGL features if indicated by GLProfile. |
| renderModes | bit-field of modes, e.g. Region#VARWEIGHT_RENDERING_BIT, Region#VBAA_RENDERING_BIT |
| colorTexSeq | optional TextureSequence for Region#COLORTEXTURE_RENDERING_BIT rendering mode. |
Definition at line 152 of file GLRegion.java.
|
static |
Create a GLRegion using the passed render mode and pre-calculating its buffer sizes using given font's Font#processString(com.jogamp.graph.font.Font.GlyphVisitor2, CharSequence) to countOutlineShape(OutlineShape, int[]).
In case Region#VBAA_RENDERING_BIT is being requested the default texture unit Region#DEFAULT_TWO_PASS_TEXTURE_UNIT is being used.
| glp | intended GLProfile to use. Instance may use higher OpenGL features if indicated by GLProfile. |
| renderModes | bit-field of modes, e.g. Region#VARWEIGHT_RENDERING_BIT, Region#VBAA_RENDERING_BIT |
| colorTexSeq | optional TextureSequence for Region#COLORTEXTURE_RENDERING_BIT rendering mode. |
| font | Font used to Font#processString(com.jogamp.graph.curve.OutlineShape.Visitor2, CharSequence) to to count initial number of vertices and indices |
| str | the string used to to to count initial number of vertices and indices |
Definition at line 185 of file GLRegion.java.
|
static |
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.
| glp | intended GLProfile to use. Instance may use higher OpenGL features if indicated by GLProfile. |
| renderModes | bit-field of modes, e.g. Region#VARWEIGHT_RENDERING_BIT, Region#VBAA_RENDERING_BIT |
| colorTexSeq | optional TextureSequence for Region#COLORTEXTURE_RENDERING_BIT rendering mode. |
| initialVerticesCount | initial number of vertices in the render-buffer |
| initialIndicesCount | initial number of indices in the render-buffer |
Definition at line 137 of file GLRegion.java.
|
static |
Create a GLRegion using the passed render mode and pre-calculating its buffer sizes using Region#countOutlineShape(OutlineShape, int[]).
In case Region#VBAA_RENDERING_BIT is being requested the default texture unit Region#DEFAULT_TWO_PASS_TEXTURE_UNIT is being used.
| glp | intended GLProfile to use. Instance may use higher OpenGL features if indicated by GLProfile. |
| renderModes | bit-field of modes, e.g. Region#VARWEIGHT_RENDERING_BIT, Region#VBAA_RENDERING_BIT |
| colorTexSeq | optional TextureSequence for Region#COLORTEXTURE_RENDERING_BIT rendering mode. |
| shape | the OutlineShape used to determine GLRegion's buffer sizes via Region#countOutlineShape(OutlineShape, int[]) |
Definition at line 167 of file GLRegion.java.
|
static |
Create a GLRegion using the passed render mode.
| glp | intended GLProfile to use. Instance may use higher OpenGL features if indicated by GLProfile. |
| renderModes | bit-field of modes, e.g. Region#VARWEIGHT_RENDERING_BIT, Region#VBAA_RENDERING_BIT |
| colorTexSeq | optional TextureSequence for Region#COLORTEXTURE_RENDERING_BIT rendering mode. |
| pass2TexUnit | texture unit for 2nd pass rendering (Region#VBAA_RENDERING_BIT), default is Region#DEFAULT_TWO_PASS_TEXTURE_UNIT. |
| initialVerticesCount | initial number of vertices in the render-buffer |
| initialIndicesCount | initial number of indices in the render-buffer |
Definition at line 109 of file GLRegion.java.
| GLArrayDataServer com.jogamp.graph.curve.opengl.GLRegion.createInterleaved | ( | final boolean | useMappedBuffers, |
| final int | comps, | ||
| final int | dataType, | ||
| final boolean | normalized, | ||
| final int | initialSize, | ||
| final int | vboUsage | ||
| ) |
| final void com.jogamp.graph.curve.opengl.GLRegion.destroy | ( | final GL2ES2 | gl | ) |
Delete and clear the associated OGL objects.
The ShaderPrograms references are nullified but not destroyed as they are owned by RegionRenderer.
Definition at line 460 of file GLRegion.java.
|
abstractprotected |
| final void com.jogamp.graph.curve.opengl.GLRegion.draw | ( | final GL2ES2 | gl, |
| final RegionRenderer | renderer | ||
| ) |
Renders the associated OGL objects specifying current width/hight of window for optional 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:
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. 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.
| gl | current GL2ES2. |
| renderer | the RegionRenderer to be used |
Definition at line 518 of file GLRegion.java.
|
abstractprotected |
| final void com.jogamp.graph.curve.opengl.GLRegion.drawToSelect | ( | final GL2ES2 | gl, |
| final RegionRenderer | renderer | ||
| ) |
Perform glSelect false color rendering: pass1 w/o any color texture nor channel, use static select color only.
Definition at line 553 of file GLRegion.java.
|
protected |
| final boolean com.jogamp.graph.curve.opengl.GLRegion.growBuffer | ( | final int | verticesCount, |
| final int | indicesCount | ||
| ) |
Increase the renderer buffers if necessary to add given counts of vertices- and index elements.
Buffers will not change if remaining free slots, capacity less position, satisfy count elements.
| verticesCount | number of vertex elements to add if necessary |
| indicesCount | number of index elements to add if necessary |
Reimplemented from com.jogamp.graph.curve.Region.
Definition at line 254 of file GLRegion.java.
|
protected |
| final void com.jogamp.graph.curve.opengl.GLRegion.printBufferStats | ( | final PrintStream | out | ) |
Print implementation buffer stats like detailed and total size and capacity in bytes etc.
Reimplemented from com.jogamp.graph.curve.Region.
Definition at line 317 of file GLRegion.java.
|
protected |
Reimplemented from com.jogamp.graph.curve.Region.
Definition at line 407 of file GLRegion.java.
|
protected |
Reimplemented from com.jogamp.graph.curve.Region.
Definition at line 416 of file GLRegion.java.
|
protected |
Reimplemented from com.jogamp.graph.curve.Region.
Definition at line 364 of file GLRegion.java.
|
protected |
Reimplemented from com.jogamp.graph.curve.Region.
Definition at line 382 of file GLRegion.java.
| final boolean com.jogamp.graph.curve.opengl.GLRegion.setBufferCapacity | ( | final int | verticesCount, |
| final int | indicesCount | ||
| ) |
Set the renderer buffers pre-emptively for given vertices- and index counts.
Buffers will not change if given count elements is lower or equal current capacity.
| verticesCount | number of vertices to hold |
| indicesCount | number of indices to hold |
Reimplemented from com.jogamp.graph.curve.Region.
Definition at line 301 of file GLRegion.java.
|
abstract |
Set the 2nd pass texture unit.
|
abstractprotected |
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).
|
protected |
Definition at line 199 of file GLRegion.java.
|
protected |
Definition at line 203 of file GLRegion.java.
|
protected |
Definition at line 202 of file GLRegion.java.
|
static |
Default initial indices count {@value}, assuming small sized shapes.
Definition at line 92 of file GLRegion.java.
|
static |
Heuristics with TestTextRendererNEWT00 text_1 + text_2 = 1334 chars.
However, proper initial size is pre-calculated via ..
GLRegion#create(GLProfile, int, TextureSequence, Font, CharSequence)TextRegionUtil#countStringRegion(Font, CharSequence, int[]) Default initial vertices count {@value}, assuming small sized shapes. Definition at line 87 of file GLRegion.java.
|
protected |
Definition at line 210 of file GLRegion.java.
|
protected |
Definition at line 209 of file GLRegion.java.
|
protected |
Definition at line 208 of file GLRegion.java.
|
protected |
Definition at line 204 of file GLRegion.java.
|
staticprotected |
Definition at line 95 of file GLRegion.java.
|
protected |
Definition at line 211 of file GLRegion.java.
|
protected |
Interleaved buffer for GLSL attributes: vectices, curveParams and optionally colors.
Definition at line 207 of file GLRegion.java.