JOGL v2.6.0-rc-20250712
JOGL, High-Performance Graphics Binding for Java™ (public API).
com.jogamp.opengl.GLArrayData Interface Reference

The total number of bytes hold by the referenced buffer is: getComponentSize()* getComponentNumber() * getElementNumber() More...

Inheritance diagram for com.jogamp.opengl.GLArrayData:
Collaboration diagram for com.jogamp.opengl.GLArrayData:

Public Member Functions

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)
 

Detailed Description

The total number of bytes hold by the referenced buffer is: getComponentSize()* getComponentNumber() * getElementNumber()

Definition at line 41 of file GLArrayData.java.

Member Function Documentation

◆ associate()

void com.jogamp.opengl.GLArrayData.associate ( Object  obj,
boolean  enable 
)

Implementation and type dependent object association.

One currently known use case is to associate a ShaderState to an GLSL aware vertex attribute object, allowing to use the ShaderState to handle it's data persistence, location and state change.
This is implicitly done via shaderState.ownAttribute(GLArrayData, boolean).

Parameters
objimplementation and type dependent association
enablepass true to enable the association and false to disable it.

Implemented in com.jogamp.opengl.util.GLArrayDataClient, and com.jogamp.opengl.util.GLArrayDataWrapper.

Here is the caller graph for this function:

◆ bytePosition()

int com.jogamp.opengl.GLArrayData.bytePosition ( )

◆ destroy()

◆ elemPosition()

int com.jogamp.opengl.GLArrayData.elemPosition ( )

Returns the element position.

On element consist out of getCompsPerElem() components.

See also
bytePosition()
getElemCount()
remainingElems()
getElemCapacity()

Implemented in com.jogamp.opengl.util.GLArrayDataWrapper.

◆ elemStatsToString()

String com.jogamp.opengl.GLArrayData.elemStatsToString ( )

Returns a string with detailed buffer element stats, i.e.

sealed, count, position, remaining, limit and capacity.

Implemented in com.jogamp.opengl.util.GLArrayDataWrapper.

Here is the caller graph for this function:

◆ fillStatsToString()

String com.jogamp.opengl.GLArrayData.fillStatsToString ( )

Returns a string with detailed buffer fill stats.

Implemented in com.jogamp.opengl.util.GLArrayDataWrapper.

◆ getBuffer()

Buffer com.jogamp.opengl.GLArrayData.getBuffer ( )

The Buffer holding the data, may be null if a GPU buffer without client bound data.

Implemented in com.jogamp.opengl.util.GLArrayDataWrapper.

Here is the caller graph for this function:

◆ getByteCapacity()

int com.jogamp.opengl.GLArrayData.getByteCapacity ( )

◆ getByteCount()

int com.jogamp.opengl.GLArrayData.getByteCount ( )

Returns the byte position (written elements) if not sealed() or the byte limit (available to read) after sealed() (flip).

See also
sealed()
getElemCount()
bytePosition()
remainingBytes()
getByteCapacity()

Implemented in com.jogamp.opengl.util.GLArrayDataWrapper.

Here is the caller graph for this function:

◆ getBytesPerComp()

int com.jogamp.opengl.GLArrayData.getBytesPerComp ( )

The component's size in bytes.

Implemented in com.jogamp.opengl.util.GLArrayDataWrapper.

Here is the caller graph for this function:

◆ getCompsPerElem()

int com.jogamp.opengl.GLArrayData.getCompsPerElem ( )

The number of components per element.

Implemented in com.jogamp.opengl.util.GLArrayDataWrapper.

Here is the caller graph for this function:

◆ getCompType()

int com.jogamp.opengl.GLArrayData.getCompType ( )

The component's GL data type, ie.

GL_FLOAT

Implemented in com.jogamp.opengl.util.GLArrayDataWrapper.

Here is the caller graph for this function:

◆ getElemCapacity()

int com.jogamp.opengl.GLArrayData.getElemCapacity ( )

Return the element capacity.

On element consist out of getCompsPerElem() components.

See also
getByteCapacity()
getElemCount()
elemPosition()
remainingElems()

Implemented in com.jogamp.opengl.util.GLArrayDataWrapper.

◆ getElemCount()

int com.jogamp.opengl.GLArrayData.getElemCount ( )

Returns the element position (written elements) if not sealed() or the element limit (available to read) after sealed() (flip).

On element consist out of getCompsPerElem() components.

See also
sealed()
getByteCount()
elemPosition()
remainingElems()
getElemCapacity()

Implemented in com.jogamp.opengl.util.GLArrayDataWrapper.

◆ getIndex()

int com.jogamp.opengl.GLArrayData.getIndex ( )

The index of the predefined array index, see list below, or -1 in case of a shader attribute array.

See also
GLPointerFunc::GL_VERTEX_ARRAY
GLPointerFunc::GL_NORMAL_ARRAY
GLPointerFunc::GL_COLOR_ARRAY
GLPointerFunc::GL_TEXTURE_COORD_ARRAY

Implemented in com.jogamp.opengl.util.GLArrayDataWrapper.

◆ getLocation()

int com.jogamp.opengl.GLArrayData.getLocation ( )

Returns the shader attribute location for this name, -1 if not yet determined.

Implemented in com.jogamp.opengl.util.GLArrayDataWrapper.

Here is the caller graph for this function:

◆ getName()

String com.jogamp.opengl.GLArrayData.getName ( )

The name of the reflecting shader array attribute.

Implemented in com.jogamp.opengl.util.GLArrayDataWrapper.

Here is the caller graph for this function:

◆ getNormalized()

boolean com.jogamp.opengl.GLArrayData.getNormalized ( )

True, if GL shall normalize fixed point data while converting them into float.

Default behavior (of the fixed function pipeline) is true for fixed point data type and false for floating point data types.

Implemented in com.jogamp.opengl.util.GLArrayDataWrapper.

Here is the caller graph for this function:

◆ getStride()

int com.jogamp.opengl.GLArrayData.getStride ( )
Returns
the byte offset between consecutive components

Implemented in com.jogamp.opengl.util.GLArrayDataWrapper.

Here is the caller graph for this function:

◆ getVBOName()

int com.jogamp.opengl.GLArrayData.getVBOName ( )

The VBO name or 0 if not a VBO.

Implemented in com.jogamp.opengl.util.GLArrayDataWrapper.

Here is the caller graph for this function:

◆ getVBOOffset()

long com.jogamp.opengl.GLArrayData.getVBOOffset ( )

The VBO buffer offset or 0 if not a VBO.

Implemented in com.jogamp.opengl.util.GLArrayDataWrapper.

◆ getVBOTarget()

int com.jogamp.opengl.GLArrayData.getVBOTarget ( )

The VBO target or 0 if not a VBO.

Returns
0 if not a GPU buffer, otherwise GL#GL_ARRAY_BUFFER or GL#GL_ELEMENT_ARRAY_BUFFER

Implemented in com.jogamp.opengl.util.GLArrayDataWrapper.

Here is the caller graph for this function:

◆ getVBOUsage()

int com.jogamp.opengl.GLArrayData.getVBOUsage ( )

The VBO usage or 0 if not a VBO.

Returns
0 if not a GPU buffer, otherwise GL2ES2#GL_STREAM_DRAW, GL#GL_STATIC_DRAW or GL#GL_DYNAMIC_DRAW

Implemented in com.jogamp.opengl.util.GLArrayDataWrapper.

Here is the caller graph for this function:

◆ isVBO()

boolean com.jogamp.opengl.GLArrayData.isVBO ( )

Determines whether the data is server side (VBO) and enabled, or a client side array (false).

Implemented in com.jogamp.opengl.util.GLArrayDataWrapper.

Here is the caller graph for this function:

◆ isVertexAttribute()

boolean com.jogamp.opengl.GLArrayData.isVertexAttribute ( )

Returns true if this data set is intended for a GLSL vertex shader attribute, otherwise false, ie intended for fixed function vertex pointer.

Implemented in com.jogamp.opengl.util.GLArrayDataWrapper.

Here is the caller graph for this function:

◆ remainingBytes()

int com.jogamp.opengl.GLArrayData.remainingBytes ( )

The current number of remaining bytes.

Returns the number of bytes between the current position and the limit, i.e. remaining bytes to write in this buffer.

See also
remainingElems()
getByteCount()
bytePosition()
getByteCapacity()

Implemented in com.jogamp.opengl.util.GLArrayDataWrapper.

◆ remainingElems()

int com.jogamp.opengl.GLArrayData.remainingElems ( )

The current number of remaining elements.

On element consist out of getCompsPerElem() components.

Returns the number of elements between the current position and the limit, i.e. remaining elements to write in this buffer.

See also
remainingBytes()
getElemCount()
elemPosition()
getElemCapacity()

Implemented in com.jogamp.opengl.util.GLArrayDataWrapper.

◆ sealed()

boolean com.jogamp.opengl.GLArrayData.sealed ( )

Returns true if data has been sealed (flipped to read), otherwise false (writing mode).

See also
com.jogamp.opengl.util.GLArrayDataEditable::seal(boolean)
com.jogamp.opengl.util.GLArrayDataEditable::seal(GL, boolean)

Implemented in com.jogamp.opengl.util.GLArrayDataWrapper.

◆ setLocation() [1/3]

int com.jogamp.opengl.GLArrayData.setLocation ( GL2ES2  gl,
int  program 
)

Retrieves the location of the shader attribute from the linked shader program.

No validation is performed within the implementation.

Parameters
gl
program
Returns
≥0 denotes a valid attribute location as found and used in the given shader program. <0 denotes an invalid location, i.e. not found or used in the given shader program.

Implemented in com.jogamp.opengl.util.GLArrayDataWrapper.

◆ setLocation() [2/3]

int com.jogamp.opengl.GLArrayData.setLocation ( GL2ES2  gl,
int  program,
int  location 
)

Binds the location of the shader attribute to the given location for the unlinked shader program.

No validation is performed within the implementation.

Parameters
gl
program
Returns
the given location

Implemented in com.jogamp.opengl.util.GLArrayDataWrapper.

◆ setLocation() [3/3]

int com.jogamp.opengl.GLArrayData.setLocation ( int  v)

Sets the given location of the shader attribute.

Returns
the given location
See also
com.jogamp.opengl.util.glsl.ShaderState::vertexAttribPointer(GL2ES2, GLArrayData)

Implemented in com.jogamp.opengl.util.GLArrayDataWrapper.

Here is the caller graph for this function:

◆ setName()

void com.jogamp.opengl.GLArrayData.setName ( String  newName)

Set a new name for this array.

This clears the location, i.e. sets it to -1.

See also
setLocation(int)
setLocation(GL2ES2, int)

Implemented in com.jogamp.opengl.util.GLArrayDataWrapper.

◆ toString()


The documentation for this interface was generated from the following file: