|
JOGL v2.6.0-rc-20250706
JOGL, High-Performance Graphics Binding for Java (public API).
|
The total number of bytes hold by the referenced buffer is: getComponentSize()* getComponentNumber() * getElementNumber() More...
Public Member Functions | |
| boolean | enabled () |
| boolean | isVBOWritten () |
| Is the buffer written to the VBO ? More... | |
| void | setVBOWritten (boolean written) |
| Marks the buffer written to the VBO. More... | |
| void | destroy (GL gl) |
| void | clear (GL gl) |
| Clears this buffer and resets states accordingly. More... | |
| void | seal (GL gl, boolean seal) |
Convenience method calling seal(boolean) and enableBuffer(GL, boolean). More... | |
| void | enableBuffer (GL gl, boolean enable) |
Enables the buffer if enable is true, and transfers the data if required. More... | |
| boolean | bindBuffer (GL gl, boolean bind) |
if bind is true and the data uses VBO, the latter will be bound and data written to the GPU if required. More... | |
| void | setEnableAlways (boolean always) |
| Affects the behavior of 'enableBuffer'. More... | |
| void | clear () |
| Clears this buffer and resets states accordingly. More... | |
| void | seal (boolean seal) |
| void | rewind () |
| Rewinds this buffer. More... | |
| void | padding (int doneInByteSize) |
| void | put (Buffer v) |
| void | putb (byte v) |
| void | put3b (byte v1, byte v2, byte v3) |
| void | put4b (byte v1, byte v2, byte v3, byte v4) |
| void | putb (byte[] src, int offset, int length) |
| void | puts (short v) |
| void | put3s (short v1, short v2, short v3) |
| void | put4s (short v1, short v2, short v3, short v4) |
| void | puts (short[] src, int offset, int length) |
| void | puti (int v) |
| void | put3i (int v1, int v2, int v3) |
| void | put4i (int v1, int v2, int v3, int v4) |
| void | puti (int[] src, int offset, int length) |
| void | putx (int v) |
| void | putf (float v) |
| void | put3f (float v1, float v2, float v3) |
| void | put4f (float v1, float v2, float v3, float v4) |
| void | putf (float[] src, int offset, int length) |
Public Member Functions inherited from com.jogamp.opengl.GLArrayData | |
| void | associate (Object obj, boolean enable) |
| Implementation and type dependent object association. More... | |
| boolean | isVertexAttribute () |
| Returns true if this data set is intended for a GLSL vertex shader attribute, otherwise false, ie intended for fixed function vertex pointer. More... | |
| int | getIndex () |
| The index of the predefined array index, see list below, or -1 in case of a shader attribute array. More... | |
| String | getName () |
| The name of the reflecting shader array attribute. More... | |
| void | setName (String newName) |
| Set a new name for this array. More... | |
| int | getLocation () |
| Returns the shader attribute location for this name, -1 if not yet determined. More... | |
| int | setLocation (int v) |
| Sets the given location of the shader attribute. More... | |
| int | setLocation (GL2ES2 gl, int program) |
| Retrieves the location of the shader attribute from the linked shader program. More... | |
| int | setLocation (GL2ES2 gl, int program, int location) |
| Binds the location of the shader attribute to the given location for the unlinked shader program. More... | |
| boolean | isVBO () |
| Determines whether the data is server side (VBO) and enabled, or a client side array (false). More... | |
| long | getVBOOffset () |
| The VBO buffer offset or 0 if not a VBO. More... | |
| int | getVBOName () |
| The VBO name or 0 if not a VBO. More... | |
| int | getVBOUsage () |
| The VBO usage or 0 if not a VBO. More... | |
| int | getVBOTarget () |
| The VBO target or 0 if not a VBO. More... | |
| Buffer | getBuffer () |
| The Buffer holding the data, may be null if a GPU buffer without client bound data. More... | |
| int | getCompsPerElem () |
| The number of components per element. More... | |
| int | getCompType () |
| The component's GL data type, ie. More... | |
| int | getBytesPerComp () |
| The component's size in bytes. More... | |
| boolean | sealed () |
Returns true if data has been sealed (flipped to read), otherwise false (writing mode). More... | |
| int | getElemCount () |
Returns the element position (written elements) if not sealed() or the element limit (available to read) after sealed() (flip). More... | |
| int | elemPosition () |
| Returns the element position. More... | |
| int | remainingElems () |
| The current number of remaining elements. More... | |
| int | getElemCapacity () |
| Return the element capacity. More... | |
| int | getByteCount () |
Returns the byte position (written elements) if not sealed() or the byte limit (available to read) after sealed() (flip). More... | |
| int | bytePosition () |
| Returns the bytes position. More... | |
| int | remainingBytes () |
| The current number of remaining bytes. More... | |
| int | getByteCapacity () |
| Return the capacity in bytes. More... | |
| String | fillStatsToString () |
| Returns a string with detailed buffer fill stats. More... | |
| String | elemStatsToString () |
| Returns a string with detailed buffer element stats, i.e. More... | |
| boolean | getNormalized () |
| True, if GL shall normalize fixed point data while converting them into float. More... | |
| int | getStride () |
| String | toString () |
| void | destroy (GL gl) |
The total number of bytes hold by the referenced buffer is: getComponentSize()* getComponentNumber() * getElementNumber()
Definition at line 41 of file GLArrayDataEditable.java.
| boolean com.jogamp.opengl.util.GLArrayDataEditable.bindBuffer | ( | GL | gl, |
| boolean | bind | ||
| ) |
if bind is true and the data uses VBO, the latter will be bound and data written to the GPU if required.
If bind is false and the data uses VBO, the latter will be unbound.
This method is exposed to allow data VBO arrays, i.e. GL#GL_ELEMENT_ARRAY_BUFFER, to be bounded and written while keeping the VBO bound. The latter is in contrast to enableBuffer(GL, boolean), which leaves the VBO unbound, since it's not required for vertex attributes or pointers.
| gl | current GL object |
| bind | true if VBO shall be bound and data written, otherwise clear VBO binding. |
Implemented in com.jogamp.opengl.util.GLArrayDataClient.
| void com.jogamp.opengl.util.GLArrayDataEditable.clear | ( | ) |
Clears this buffer and resets states accordingly.
The position is set to zero, the limit is set to the capacity, and the mark is discarded.
Invoke this method before using a sequence of get or put operations to fill this buffer.
This method does not actually erase the data in the buffer and will most often be used when erasing the underlying memory is suitable.
Implemented in com.jogamp.opengl.util.GLArrayDataClient.
| void com.jogamp.opengl.util.GLArrayDataEditable.clear | ( | GL | gl | ) |
Clears this buffer and resets states accordingly.
Implementation calls seal(gl, false) and clear(), i.e. turns-off the GL buffer and then clearing it.
The position is set to zero, the limit is set to the capacity, and the mark is discarded.
Invoke this method before using a sequence of get or put operations to fill this buffer.
This method does not actually erase the data in the buffer and will most often be used when erasing the underlying memory is suitable.
Implemented in com.jogamp.opengl.util.GLArrayDataClient.
| void com.jogamp.opengl.util.GLArrayDataEditable.destroy | ( | GL | gl | ) |
Implements com.jogamp.opengl.GLArrayData.
Implemented in com.jogamp.opengl.util.GLArrayDataClient, and com.jogamp.opengl.util.GLArrayDataServer.
| void com.jogamp.opengl.util.GLArrayDataEditable.enableBuffer | ( | GL | gl, |
| boolean | enable | ||
| ) |
Enables the buffer if enable is true, and transfers the data if required.
In case VBO is used, it is bound accordingly for the data transfer and association, i.e. it issued bindBuffer(GL, boolean). The VBO buffer is unbound when the method returns.
Disables the buffer if enable is false.
The action will only be executed, if the internal enable state differs, or 'setEnableAlways' was called with 'true'.
It is up to the user to enable/disable the array properly, ie in case of multiple data sets for the same vertex attribute (VA). Meaning in such case usage of one set while expecting another one to be used for the same VA implies decorating each usage with enable/disable.
Implemented in com.jogamp.opengl.util.GLArrayDataClient.
| boolean com.jogamp.opengl.util.GLArrayDataEditable.enabled | ( | ) |
Implemented in com.jogamp.opengl.util.GLArrayDataClient.
| boolean com.jogamp.opengl.util.GLArrayDataEditable.isVBOWritten | ( | ) |
Is the buffer written to the VBO ?
Implemented in com.jogamp.opengl.util.GLArrayDataClient.
| void com.jogamp.opengl.util.GLArrayDataEditable.padding | ( | int | doneInByteSize | ) |
Implemented in com.jogamp.opengl.util.GLArrayDataClient.
| void com.jogamp.opengl.util.GLArrayDataEditable.put | ( | Buffer | v | ) |
Implemented in com.jogamp.opengl.util.GLArrayDataClient.
| void com.jogamp.opengl.util.GLArrayDataEditable.put3b | ( | byte | v1, |
| byte | v2, | ||
| byte | v3 | ||
| ) |
Implemented in com.jogamp.opengl.util.GLArrayDataClient.
| void com.jogamp.opengl.util.GLArrayDataEditable.put3f | ( | float | v1, |
| float | v2, | ||
| float | v3 | ||
| ) |
Implemented in com.jogamp.opengl.util.GLArrayDataClient.
| void com.jogamp.opengl.util.GLArrayDataEditable.put3i | ( | int | v1, |
| int | v2, | ||
| int | v3 | ||
| ) |
Implemented in com.jogamp.opengl.util.GLArrayDataClient.
| void com.jogamp.opengl.util.GLArrayDataEditable.put3s | ( | short | v1, |
| short | v2, | ||
| short | v3 | ||
| ) |
Implemented in com.jogamp.opengl.util.GLArrayDataClient.
| void com.jogamp.opengl.util.GLArrayDataEditable.put4b | ( | byte | v1, |
| byte | v2, | ||
| byte | v3, | ||
| byte | v4 | ||
| ) |
Implemented in com.jogamp.opengl.util.GLArrayDataClient.
| void com.jogamp.opengl.util.GLArrayDataEditable.put4f | ( | float | v1, |
| float | v2, | ||
| float | v3, | ||
| float | v4 | ||
| ) |
Implemented in com.jogamp.opengl.util.GLArrayDataClient.
| void com.jogamp.opengl.util.GLArrayDataEditable.put4i | ( | int | v1, |
| int | v2, | ||
| int | v3, | ||
| int | v4 | ||
| ) |
Implemented in com.jogamp.opengl.util.GLArrayDataClient.
| void com.jogamp.opengl.util.GLArrayDataEditable.put4s | ( | short | v1, |
| short | v2, | ||
| short | v3, | ||
| short | v4 | ||
| ) |
Implemented in com.jogamp.opengl.util.GLArrayDataClient.
| void com.jogamp.opengl.util.GLArrayDataEditable.putb | ( | byte | v | ) |
Implemented in com.jogamp.opengl.util.GLArrayDataClient.
| void com.jogamp.opengl.util.GLArrayDataEditable.putb | ( | byte[] | src, |
| int | offset, | ||
| int | length | ||
| ) |
Implemented in com.jogamp.opengl.util.GLArrayDataClient.
| void com.jogamp.opengl.util.GLArrayDataEditable.putf | ( | float | v | ) |
Implemented in com.jogamp.opengl.util.GLArrayDataClient.
| void com.jogamp.opengl.util.GLArrayDataEditable.putf | ( | float[] | src, |
| int | offset, | ||
| int | length | ||
| ) |
Implemented in com.jogamp.opengl.util.GLArrayDataClient.
| void com.jogamp.opengl.util.GLArrayDataEditable.puti | ( | int | v | ) |
Implemented in com.jogamp.opengl.util.GLArrayDataClient.
| void com.jogamp.opengl.util.GLArrayDataEditable.puti | ( | int[] | src, |
| int | offset, | ||
| int | length | ||
| ) |
Implemented in com.jogamp.opengl.util.GLArrayDataClient.
| void com.jogamp.opengl.util.GLArrayDataEditable.puts | ( | short | v | ) |
Implemented in com.jogamp.opengl.util.GLArrayDataClient.
| void com.jogamp.opengl.util.GLArrayDataEditable.puts | ( | short[] | src, |
| int | offset, | ||
| int | length | ||
| ) |
Implemented in com.jogamp.opengl.util.GLArrayDataClient.
| void com.jogamp.opengl.util.GLArrayDataEditable.putx | ( | int | v | ) |
Implemented in com.jogamp.opengl.util.GLArrayDataClient.
| void com.jogamp.opengl.util.GLArrayDataEditable.rewind | ( | ) |
Rewinds this buffer.
The position is set to zero and the mark is discarded.
Invoke this method before a sequence of put or get operations.
Implemented in com.jogamp.opengl.util.GLArrayDataClient.
| void com.jogamp.opengl.util.GLArrayDataEditable.seal | ( | boolean | seal | ) |
If seal is true, it disables write operations to the buffer. Calls flip, ie limit:=position and position:=0.
If seal is false, it enable write operations continuing at the buffer position, where you left off at seal(true), ie position:=limit and limit:=capacity.
Implemented in com.jogamp.opengl.util.GLArrayDataClient.
| void com.jogamp.opengl.util.GLArrayDataEditable.seal | ( | GL | gl, |
| boolean | seal | ||
| ) |
Convenience method calling seal(boolean) and enableBuffer(GL, boolean).
Implemented in com.jogamp.opengl.util.GLArrayDataClient.
| void com.jogamp.opengl.util.GLArrayDataEditable.setEnableAlways | ( | boolean | always | ) |
Affects the behavior of 'enableBuffer'.
The default is 'false'
This is useful when you mix up GLArrayData usage with conventional GL array calls or in case of a buggy GL VBO implementation.
Implemented in com.jogamp.opengl.util.GLArrayDataClient.
| void com.jogamp.opengl.util.GLArrayDataEditable.setVBOWritten | ( | boolean | written | ) |
Marks the buffer written to the VBO.
Implemented in com.jogamp.opengl.util.GLArrayDataClient.