JOGL v2.6.0-rc-20250706
JOGL, High-Performance Graphics Binding for Java™ (public API).
com.jogamp.opengl.util.GLArrayDataWrapper Class Reference
Inheritance diagram for com.jogamp.opengl.util.GLArrayDataWrapper:
Collaboration diagram for com.jogamp.opengl.util.GLArrayDataWrapper:

Public Member Functions

final boolean validate (final GLProfile glp, final boolean throwException)
 Validates this instance's parameter. More...
 
void associate (final Object obj, final boolean enable)
 Implementation and type dependent object association. More...
 
final 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...
 
final int getIndex ()
 The index of the predefined array index, see list below, or -1 in case of a shader attribute array. More...
 
final int getLocation ()
 Returns the shader attribute location for this name, -1 if not yet determined. More...
 
final int setLocation (final int v)
 Sets the given location of the shader attribute. More...
 
final int setLocation (final GL2ES2 gl, final int program)
 Retrieves the location of the shader attribute from the linked shader program. More...
 
final int setLocation (final GL2ES2 gl, final int program, final int location)
 Binds the location of the shader attribute to the given location for the unlinked shader program. More...
 
final String getName ()
 The name of the reflecting shader array attribute. More...
 
final long getVBOOffset ()
 The VBO buffer offset or 0 if not a VBO. More...
 
final int getVBOName ()
 The VBO name or 0 if not a VBO. More...
 
final boolean isVBO ()
 Determines whether the data is server side (VBO) and enabled, or a client side array (false). More...
 
final int getVBOUsage ()
 The VBO usage or 0 if not a VBO. More...
 
final 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...
 
final int getCompsPerElem ()
 The number of components per element. More...
 
final int getCompType ()
 The component's GL data type, ie. More...
 
final int getBytesPerComp ()
 The component's size in bytes. More...
 
final boolean sealed ()
 Returns true if data has been sealed (flipped to read), otherwise false (writing mode). More...
 
final int getElemCount ()
 Returns the element position (written elements) if not sealed() or the element limit (available to read) after sealed() (flip). More...
 
final int elemPosition ()
 Returns the element position. More...
 
int remainingElems ()
 The current number of remaining elements. More...
 
int getElemCapacity ()
 Return the element capacity. More...
 
final int getByteCount ()
 Returns the byte position (written elements) if not sealed() or the byte limit (available to read) after sealed() (flip). More...
 
final 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...
 
final boolean getNormalized ()
 True, if GL shall normalize fixed point data while converting them into float. More...
 
final int getStride ()
 
final Class<?> getBufferClass ()
 
void destroy (final GL gl)
 
String toString ()
 
void setName (final String newName)
 Set a new name for this array. More...
 
void setVBOEnabled (final boolean vboEnabled)
 Enable or disable use of VBO. More...
 
void setVBOName (final int vboName)
 Set the VBO buffer name, if valid (!= 0) enable use of VBO, otherwise (==0) disable VBO usage. More...
 
void setVBOUsage (final int vboUsage)
 
void setVBOTarget (final int vboTarget)
 
 GLArrayDataWrapper (final GLArrayDataWrapper src)
 Copy Constructor. More...
 
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)
 

Static Public Member Functions

static GLArrayDataWrapper createFixed (final int index, final int comps, final int dataType, final boolean normalized, final int stride, final Buffer buffer, final int vboName, final long vboOffset, final int vboUsage, final int vboTarget) throws GLException
 Create a VBO, using a predefined fixed function array index, wrapping the given data. More...
 
static GLArrayDataWrapper createFixed (final int index, final int comps, final int dataType, final boolean normalized, final int stride, final int mappedElementCount, final int vboName, final long vboOffset, final int vboUsage, final int vboTarget) throws GLException
 Create a VBO, using a predefined fixed function array index, wrapping the mapped data characteristics. More...
 
static GLArrayDataWrapper createGLSL (final String name, final int comps, final int dataType, final boolean normalized, final int stride, final Buffer buffer, final int vboName, final long vboOffset, final int vboUsage, final int vboTarget) throws GLException
 Create a VBO, using a custom GLSL array attribute name, wrapping the given data. More...
 
static GLArrayDataWrapper createGLSL (final String name, final int comps, final int dataType, final boolean normalized, final int stride, final int mappedElementCount, final int vboName, final long vboOffset, final int vboUsage, final int vboTarget) throws GLException
 Create a VBO, using a custom GLSL array attribute name, wrapping the mapped data characteristics. More...
 
static final Class<?> getBufferClass (final int dataType)
 

Static Public Attributes

static final boolean DEBUG = Debug.debug("GLArrayData")
 

Protected Member Functions

 GLArrayDataWrapper (final String name, final int index, final int componentsPerElement, final int componentType, final boolean normalized, final int stride, final Buffer data, final int mappedElementCount, final boolean isVertexAttribute, final int vboName, final long vboOffset, final int vboUsage, final int vboTarget) throws GLException
 

Protected Attributes

final int compType
 
final Class<?> compClazz
 
final int bytesPerComp
 
final int compsPerElement
 
final int strideB
 stride in bytes; strideB >= compsPerElement * bytesPerComp More...
 
final int strideL
 stride in logical components More...
 
final boolean normalized
 
final int mappedElemCount
 
final boolean isVertexAttr
 
boolean alive
 
int index
 
int location
 
String name
 
Buffer buffer
 
int vboName
 
long vboOffset
 
boolean vboEnabled
 
int vboUsage
 
int vboTarget
 
boolean sealed
 

Detailed Description

Definition at line 48 of file GLArrayDataWrapper.java.

Constructor & Destructor Documentation

◆ GLArrayDataWrapper() [1/2]

com.jogamp.opengl.util.GLArrayDataWrapper.GLArrayDataWrapper ( final String  name,
final int  index,
final int  componentsPerElement,
final int  componentType,
final boolean  normalized,
final int  stride,
final Buffer  data,
final int  mappedElementCount,
final boolean  isVertexAttribute,
final int  vboName,
final long  vboOffset,
final int  vboUsage,
final int  vboTarget 
) throws GLException
protected

Definition at line 452 of file GLArrayDataWrapper.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GLArrayDataWrapper() [2/2]

com.jogamp.opengl.util.GLArrayDataWrapper.GLArrayDataWrapper ( final GLArrayDataWrapper  src)

Copy Constructor.

Buffer is sliced, i.e. sharing content but using own state.

All other values are simply copied.

Definition at line 543 of file GLArrayDataWrapper.java.

Member Function Documentation

◆ associate()

void com.jogamp.opengl.util.GLArrayDataWrapper.associate ( final Object  obj,
final 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.

Implements com.jogamp.opengl.GLArrayData.

Reimplemented in com.jogamp.opengl.util.GLArrayDataClient.

Definition at line 184 of file GLArrayDataWrapper.java.

◆ bytePosition()

final int com.jogamp.opengl.util.GLArrayDataWrapper.bytePosition ( )

Returns the bytes position.

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

Implements com.jogamp.opengl.GLArrayData.

Definition at line 310 of file GLArrayDataWrapper.java.

◆ createFixed() [1/2]

static GLArrayDataWrapper com.jogamp.opengl.util.GLArrayDataWrapper.createFixed ( final int  index,
final int  comps,
final int  dataType,
final boolean  normalized,
final int  stride,
final Buffer  buffer,
final int  vboName,
final long  vboOffset,
final int  vboUsage,
final int  vboTarget 
) throws GLException
static

Create a VBO, using a predefined fixed function array index, wrapping the given data.

This buffer is always sealed().

Parameters
indexThe GL array index
compsThe array component number
dataTypeThe array index GL data type
normalizedWhether the data shall be normalized
stride
bufferthe user define data
vboName
vboOffset
vboUsageGL2ES2#GL_STREAM_DRAW, GL#GL_STATIC_DRAW or GL#GL_DYNAMIC_DRAW
vboTargetGL#GL_ARRAY_BUFFER or GL#GL_ELEMENT_ARRAY_BUFFER
Returns
the new create instance
Exceptions
GLException

Definition at line 70 of file GLArrayDataWrapper.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ createFixed() [2/2]

static GLArrayDataWrapper com.jogamp.opengl.util.GLArrayDataWrapper.createFixed ( final int  index,
final int  comps,
final int  dataType,
final boolean  normalized,
final int  stride,
final int  mappedElementCount,
final int  vboName,
final long  vboOffset,
final int  vboUsage,
final int  vboTarget 
) throws GLException
static

Create a VBO, using a predefined fixed function array index, wrapping the mapped data characteristics.

This buffer is always sealed().

Parameters
indexThe GL array index
compsThe array component number
dataTypeThe array index GL data type
normalizedWhether the data shall be normalized
stride
mappedElementCount
vboName
vboOffset
vboUsageGL2ES2#GL_STREAM_DRAW, GL#GL_STATIC_DRAW or GL#GL_DYNAMIC_DRAW
vboTargetGL#GL_ARRAY_BUFFER or GL#GL_ELEMENT_ARRAY_BUFFER
Returns
the new create instance
Exceptions
GLException

Definition at line 97 of file GLArrayDataWrapper.java.

Here is the call graph for this function:

◆ createGLSL() [1/2]

static GLArrayDataWrapper com.jogamp.opengl.util.GLArrayDataWrapper.createGLSL ( final String  name,
final int  comps,
final int  dataType,
final boolean  normalized,
final int  stride,
final Buffer  buffer,
final int  vboName,
final long  vboOffset,
final int  vboUsage,
final int  vboTarget 
) throws GLException
static

Create a VBO, using a custom GLSL array attribute name, wrapping the given data.

This buffer is always sealed().

Parameters
nameThe custom name for the GL attribute, maybe null if gpuBufferTarget is GL#GL_ELEMENT_ARRAY_BUFFER
compsThe array component number
dataTypeThe array index GL data type
normalizedWhether the data shall be normalized
stride
bufferthe user define data
vboName
vboOffset
vboUsageGL2ES2#GL_STREAM_DRAW, GL#GL_STATIC_DRAW or GL#GL_DYNAMIC_DRAW
vboTargetGL#GL_ARRAY_BUFFER or GL#GL_ELEMENT_ARRAY_BUFFER
Returns
the new create instance
Exceptions
GLException

Definition at line 123 of file GLArrayDataWrapper.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ createGLSL() [2/2]

static GLArrayDataWrapper com.jogamp.opengl.util.GLArrayDataWrapper.createGLSL ( final String  name,
final int  comps,
final int  dataType,
final boolean  normalized,
final int  stride,
final int  mappedElementCount,
final int  vboName,
final long  vboOffset,
final int  vboUsage,
final int  vboTarget 
) throws GLException
static

Create a VBO, using a custom GLSL array attribute name, wrapping the mapped data characteristics.

This buffer is always sealed().

Parameters
nameThe custom name for the GL attribute, maybe null if gpuBufferTarget is GL#GL_ELEMENT_ARRAY_BUFFER
compsThe array component number
dataTypeThe array index GL data type
normalizedWhether the data shall be normalized
stride
mappedElementCount
vboName
vboOffset
vboUsageGL2ES2#GL_STREAM_DRAW, GL#GL_STATIC_DRAW or GL#GL_DYNAMIC_DRAW
vboTargetGL#GL_ARRAY_BUFFER or GL#GL_ELEMENT_ARRAY_BUFFER
Returns
the new create instance
Exceptions
GLException

Definition at line 149 of file GLArrayDataWrapper.java.

Here is the call graph for this function:

◆ destroy()

void com.jogamp.opengl.util.GLArrayDataWrapper.destroy ( final GL  gl)

Implements com.jogamp.opengl.GLArrayData.

Reimplemented in com.jogamp.opengl.util.GLArrayDataClient, and com.jogamp.opengl.util.GLArrayDataServer.

Definition at line 363 of file GLArrayDataWrapper.java.

Here is the caller graph for this function:

◆ elemPosition()

final int com.jogamp.opengl.util.GLArrayDataWrapper.elemPosition ( )

Returns the element position.

On element consist out of getCompsPerElem() components.

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

Implements com.jogamp.opengl.GLArrayData.

Definition at line 266 of file GLArrayDataWrapper.java.

Here is the caller graph for this function:

◆ elemStatsToString()

String com.jogamp.opengl.util.GLArrayDataWrapper.elemStatsToString ( )

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

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

Implements com.jogamp.opengl.GLArrayData.

Definition at line 348 of file GLArrayDataWrapper.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fillStatsToString()

String com.jogamp.opengl.util.GLArrayDataWrapper.fillStatsToString ( )

Returns a string with detailed buffer fill stats.

Implements com.jogamp.opengl.GLArrayData.

Definition at line 339 of file GLArrayDataWrapper.java.

Here is the call graph for this function:

◆ getBuffer()

Buffer com.jogamp.opengl.util.GLArrayDataWrapper.getBuffer ( )

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

Implements com.jogamp.opengl.GLArrayData.

Definition at line 236 of file GLArrayDataWrapper.java.

Here is the caller graph for this function:

◆ getBufferClass() [1/2]

final Class<?> com.jogamp.opengl.util.GLArrayDataWrapper.getBufferClass ( )

Definition at line 360 of file GLArrayDataWrapper.java.

Here is the caller graph for this function:

◆ getBufferClass() [2/2]

static final Class<?> com.jogamp.opengl.util.GLArrayDataWrapper.getBufferClass ( final int  dataType)
static

Definition at line 393 of file GLArrayDataWrapper.java.

◆ getByteCapacity()

int com.jogamp.opengl.util.GLArrayDataWrapper.getByteCapacity ( )

Return the capacity in bytes.

See also
getElemCapacity()
getByteCount()
bytePosition()
remainingBytes()

Implements com.jogamp.opengl.GLArrayData.

Definition at line 330 of file GLArrayDataWrapper.java.

Here is the caller graph for this function:

◆ getByteCount()

final int com.jogamp.opengl.util.GLArrayDataWrapper.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()

Implements com.jogamp.opengl.GLArrayData.

Definition at line 295 of file GLArrayDataWrapper.java.

Here is the caller graph for this function:

◆ getBytesPerComp()

final int com.jogamp.opengl.util.GLArrayDataWrapper.getBytesPerComp ( )

The component's size in bytes.

Implements com.jogamp.opengl.GLArrayData.

Definition at line 245 of file GLArrayDataWrapper.java.

◆ getCompsPerElem()

final int com.jogamp.opengl.util.GLArrayDataWrapper.getCompsPerElem ( )

The number of components per element.

Implements com.jogamp.opengl.GLArrayData.

Definition at line 239 of file GLArrayDataWrapper.java.

Here is the caller graph for this function:

◆ getCompType()

final int com.jogamp.opengl.util.GLArrayDataWrapper.getCompType ( )

The component's GL data type, ie.

GL_FLOAT

Implements com.jogamp.opengl.GLArrayData.

Definition at line 242 of file GLArrayDataWrapper.java.

◆ getElemCapacity()

int com.jogamp.opengl.util.GLArrayDataWrapper.getElemCapacity ( )

Return the element capacity.

On element consist out of getCompsPerElem() components.

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

Implements com.jogamp.opengl.GLArrayData.

Definition at line 286 of file GLArrayDataWrapper.java.

Here is the caller graph for this function:

◆ getElemCount()

final int com.jogamp.opengl.util.GLArrayDataWrapper.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()

Implements com.jogamp.opengl.GLArrayData.

Definition at line 251 of file GLArrayDataWrapper.java.

Here is the caller graph for this function:

◆ getIndex()

final int com.jogamp.opengl.util.GLArrayDataWrapper.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

Implements com.jogamp.opengl.GLArrayData.

Definition at line 196 of file GLArrayDataWrapper.java.

◆ getLocation()

final int com.jogamp.opengl.util.GLArrayDataWrapper.getLocation ( )

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

Implements com.jogamp.opengl.GLArrayData.

Definition at line 199 of file GLArrayDataWrapper.java.

Here is the caller graph for this function:

◆ getName()

final String com.jogamp.opengl.util.GLArrayDataWrapper.getName ( )

The name of the reflecting shader array attribute.

Implements com.jogamp.opengl.GLArrayData.

Definition at line 218 of file GLArrayDataWrapper.java.

Here is the caller graph for this function:

◆ getNormalized()

final boolean com.jogamp.opengl.util.GLArrayDataWrapper.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.

Implements com.jogamp.opengl.GLArrayData.

Definition at line 355 of file GLArrayDataWrapper.java.

◆ getStride()

final int com.jogamp.opengl.util.GLArrayDataWrapper.getStride ( )
Returns
the byte offset between consecutive components

Implements com.jogamp.opengl.GLArrayData.

Definition at line 358 of file GLArrayDataWrapper.java.

◆ getVBOName()

final int com.jogamp.opengl.util.GLArrayDataWrapper.getVBOName ( )

The VBO name or 0 if not a VBO.

Implements com.jogamp.opengl.GLArrayData.

Definition at line 224 of file GLArrayDataWrapper.java.

Here is the caller graph for this function:

◆ getVBOOffset()

final long com.jogamp.opengl.util.GLArrayDataWrapper.getVBOOffset ( )

The VBO buffer offset or 0 if not a VBO.

Implements com.jogamp.opengl.GLArrayData.

Definition at line 221 of file GLArrayDataWrapper.java.

◆ getVBOTarget()

final int com.jogamp.opengl.util.GLArrayDataWrapper.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

Implements com.jogamp.opengl.GLArrayData.

Definition at line 233 of file GLArrayDataWrapper.java.

◆ getVBOUsage()

final int com.jogamp.opengl.util.GLArrayDataWrapper.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

Implements com.jogamp.opengl.GLArrayData.

Definition at line 230 of file GLArrayDataWrapper.java.

◆ isVBO()

final boolean com.jogamp.opengl.util.GLArrayDataWrapper.isVBO ( )

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

Implements com.jogamp.opengl.GLArrayData.

Definition at line 227 of file GLArrayDataWrapper.java.

Here is the caller graph for this function:

◆ isVertexAttribute()

final boolean com.jogamp.opengl.util.GLArrayDataWrapper.isVertexAttribute ( )

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

Implements com.jogamp.opengl.GLArrayData.

Definition at line 193 of file GLArrayDataWrapper.java.

Here is the caller graph for this function:

◆ remainingBytes()

int com.jogamp.opengl.util.GLArrayDataWrapper.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()

Implements com.jogamp.opengl.GLArrayData.

Definition at line 321 of file GLArrayDataWrapper.java.

◆ remainingElems()

int com.jogamp.opengl.util.GLArrayDataWrapper.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()

Implements com.jogamp.opengl.GLArrayData.

Definition at line 277 of file GLArrayDataWrapper.java.

Here is the caller graph for this function:

◆ sealed()

final boolean com.jogamp.opengl.util.GLArrayDataWrapper.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)

Implements com.jogamp.opengl.GLArrayData.

Definition at line 248 of file GLArrayDataWrapper.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setLocation() [1/3]

final int com.jogamp.opengl.util.GLArrayDataWrapper.setLocation ( final GL2ES2  gl,
final 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.

Implements com.jogamp.opengl.GLArrayData.

Definition at line 205 of file GLArrayDataWrapper.java.

Here is the call graph for this function:

◆ setLocation() [2/3]

final int com.jogamp.opengl.util.GLArrayDataWrapper.setLocation ( final GL2ES2  gl,
final int  program,
final 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

Implements com.jogamp.opengl.GLArrayData.

Definition at line 211 of file GLArrayDataWrapper.java.

Here is the call graph for this function:

◆ setLocation() [3/3]

final int com.jogamp.opengl.util.GLArrayDataWrapper.setLocation ( final 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)

Implements com.jogamp.opengl.GLArrayData.

Definition at line 202 of file GLArrayDataWrapper.java.

Here is the caller graph for this function:

◆ setName()

void com.jogamp.opengl.util.GLArrayDataWrapper.setName ( final 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)

Implements com.jogamp.opengl.GLArrayData.

Definition at line 413 of file GLArrayDataWrapper.java.

◆ setVBOEnabled()

void com.jogamp.opengl.util.GLArrayDataWrapper.setVBOEnabled ( final boolean  vboEnabled)

Enable or disable use of VBO.

Only possible if a VBO buffer name is defined.

See also
setVBOName(int)

Reimplemented in com.jogamp.opengl.util.GLArrayDataServer.

Definition at line 423 of file GLArrayDataWrapper.java.

Here is the caller graph for this function:

◆ setVBOName()

void com.jogamp.opengl.util.GLArrayDataWrapper.setVBOName ( final int  vboName)

Set the VBO buffer name, if valid (!= 0) enable use of VBO, otherwise (==0) disable VBO usage.

See also
setVBOEnabled(boolean)

Definition at line 433 of file GLArrayDataWrapper.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setVBOTarget()

void com.jogamp.opengl.util.GLArrayDataWrapper.setVBOTarget ( final int  vboTarget)
Parameters
vboTargeteither GL#GL_ARRAY_BUFFER or GL#GL_ELEMENT_ARRAY_BUFFER

Definition at line 448 of file GLArrayDataWrapper.java.

◆ setVBOUsage()

void com.jogamp.opengl.util.GLArrayDataWrapper.setVBOUsage ( final int  vboUsage)
Parameters
vboUsageGL2ES2#GL_STREAM_DRAW, GL#GL_STATIC_DRAW or GL#GL_DYNAMIC_DRAW

Definition at line 441 of file GLArrayDataWrapper.java.

◆ toString()

String com.jogamp.opengl.util.GLArrayDataWrapper.toString ( )

Implements com.jogamp.opengl.GLArrayData.

Reimplemented in com.jogamp.opengl.util.GLArrayDataClient, and com.jogamp.opengl.util.GLArrayDataServer.

Definition at line 372 of file GLArrayDataWrapper.java.

Here is the call graph for this function:

◆ validate()

final boolean com.jogamp.opengl.util.GLArrayDataWrapper.validate ( final GLProfile  glp,
final boolean  throwException 
)

Validates this instance's parameter.

Called automatically by GLArrayDataClient and GLArrayDataServer. GLArrayDataWrapper does not validate it's instance by itself.

Parameters
glpthe GLProfile to use
throwExceptionwhether to throw an exception if this instance has invalid parameter or not
Returns
true if this instance has invalid parameter, otherwise false

Definition at line 165 of file GLArrayDataWrapper.java.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ alive

boolean com.jogamp.opengl.util.GLArrayDataWrapper.alive
protected

Definition at line 590 of file GLArrayDataWrapper.java.

◆ buffer

Buffer com.jogamp.opengl.util.GLArrayDataWrapper.buffer
protected

Definition at line 594 of file GLArrayDataWrapper.java.

◆ bytesPerComp

final int com.jogamp.opengl.util.GLArrayDataWrapper.bytesPerComp
protected

Definition at line 579 of file GLArrayDataWrapper.java.

◆ compClazz

final Class<?> com.jogamp.opengl.util.GLArrayDataWrapper.compClazz
protected

Definition at line 578 of file GLArrayDataWrapper.java.

◆ compsPerElement

final int com.jogamp.opengl.util.GLArrayDataWrapper.compsPerElement
protected

Definition at line 580 of file GLArrayDataWrapper.java.

◆ compType

final int com.jogamp.opengl.util.GLArrayDataWrapper.compType
protected

Definition at line 577 of file GLArrayDataWrapper.java.

◆ DEBUG

final boolean com.jogamp.opengl.util.GLArrayDataWrapper.DEBUG = Debug.debug("GLArrayData")
static

Definition at line 49 of file GLArrayDataWrapper.java.

◆ index

int com.jogamp.opengl.util.GLArrayDataWrapper.index
protected

Definition at line 591 of file GLArrayDataWrapper.java.

◆ isVertexAttr

final boolean com.jogamp.opengl.util.GLArrayDataWrapper.isVertexAttr
protected

Definition at line 587 of file GLArrayDataWrapper.java.

◆ location

int com.jogamp.opengl.util.GLArrayDataWrapper.location
protected

Definition at line 592 of file GLArrayDataWrapper.java.

◆ mappedElemCount

final int com.jogamp.opengl.util.GLArrayDataWrapper.mappedElemCount
protected

Definition at line 586 of file GLArrayDataWrapper.java.

◆ name

String com.jogamp.opengl.util.GLArrayDataWrapper.name
protected

Definition at line 593 of file GLArrayDataWrapper.java.

◆ normalized

final boolean com.jogamp.opengl.util.GLArrayDataWrapper.normalized
protected

Definition at line 585 of file GLArrayDataWrapper.java.

◆ sealed

boolean com.jogamp.opengl.util.GLArrayDataWrapper.sealed
protected

Definition at line 600 of file GLArrayDataWrapper.java.

◆ strideB

final int com.jogamp.opengl.util.GLArrayDataWrapper.strideB
protected

stride in bytes; strideB >= compsPerElement * bytesPerComp

Definition at line 582 of file GLArrayDataWrapper.java.

◆ strideL

final int com.jogamp.opengl.util.GLArrayDataWrapper.strideL
protected

stride in logical components

Definition at line 584 of file GLArrayDataWrapper.java.

◆ vboEnabled

boolean com.jogamp.opengl.util.GLArrayDataWrapper.vboEnabled
protected

Definition at line 597 of file GLArrayDataWrapper.java.

◆ vboName

int com.jogamp.opengl.util.GLArrayDataWrapper.vboName
protected

Definition at line 595 of file GLArrayDataWrapper.java.

◆ vboOffset

long com.jogamp.opengl.util.GLArrayDataWrapper.vboOffset
protected

Definition at line 596 of file GLArrayDataWrapper.java.

◆ vboTarget

int com.jogamp.opengl.util.GLArrayDataWrapper.vboTarget
protected

Definition at line 599 of file GLArrayDataWrapper.java.

◆ vboUsage

int com.jogamp.opengl.util.GLArrayDataWrapper.vboUsage
protected

Definition at line 598 of file GLArrayDataWrapper.java.


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