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

Public Member Functions

GLArrayData addFixedSubArray (final int index, final int comps, final int vboTarget)
 Configure a segment of this fixed function interleaved array (see createFixedInterleaved(int, int, boolean, int, int)). More...
 
GLArrayDataWrapper addGLSLSubArray (final String name, final int comps, final int vboTarget)
 Configure a segment of this GLSL interleaved array (see createGLSLInterleaved(int, int, boolean, int, int)). More...
 
final void setInterleavedOffset (final int interleavedOffset)
 
final int getInterleavedOffset ()
 
void destroy (final GL gl)
 
void setVBOEnabled (final boolean vboUsage)
 Convenient way do disable the VBO behavior and switch to client side data one Only possible if buffer is defined. More...
 
GLBufferStorage mapStorage (final GL gl, final int access)
 
GLBufferStorage mapStorage (final GL gl, final long offset, final long length, final int access)
 
void unmapStorage (final GL gl)
 
String toString ()
 
 GLArrayDataServer (final GLArrayDataServer src)
 Copy Constructor. More...
 
- Public Member Functions inherited from com.jogamp.opengl.util.GLArrayDataClient
void associate (final Object obj, final boolean enable)
 Implementation and type dependent object association. More...
 
final boolean isVBOWritten ()
 Is the buffer written to the VBO ? More...
 
final boolean enabled ()
 
final void setVBOWritten (final boolean written)
 Marks the buffer written to the VBO. More...
 
void destroy (final GL gl)
 
void clear (final GL gl)
 Clears this buffer and resets states accordingly. More...
 
void seal (final GL gl, final boolean seal)
 Convenience method calling seal(boolean) and enableBuffer(GL, boolean). More...
 
void enableBuffer (final GL gl, final boolean enable)
 Enables the buffer if enable is true, and transfers the data if required. More...
 
boolean bindBuffer (final GL gl, final 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 (final boolean always)
 Affects the behavior of 'enableBuffer'. More...
 
void clear ()
 Clears this buffer and resets states accordingly. More...
 
void seal (final boolean seal)
 
void rewind ()
 Rewinds this buffer. More...
 
void padding (int doneInByteSize)
 
void put (final Buffer v)
 Generic buffer relative put method. More...
 
void putb (final byte v)
 
void put3b (final byte v1, final byte v2, final byte v3)
 
void put4b (final byte v1, final byte v2, final byte v3, final byte v4)
 
void putb (final byte[] src, final int offset, final int length)
 
void puts (final short v)
 
void put3s (final short v1, final short v2, final short v3)
 
void put4s (final short v1, final short v2, final short v3, final short v4)
 
void puts (final short[] src, final int offset, final int length)
 
void puti (final int v)
 
void put3i (final int v1, final int v2, final int v3)
 
void put4i (final int v1, final int v2, final int v3, final int v4)
 
void puti (final int[] src, final int offset, final int length)
 
void putx (final int v)
 
void putf (final float v)
 
void put3f (final float v1, final float v2, final float v3)
 
void put4f (final float v1, final float v2, final float v3, final float v4)
 
void putf (final float[] src, final int offset, final int length)
 
String toString ()
 
int compsToElemCount (final int componentCount)
 Returning element-count from given componentCount, rounding up to componentsPerElement. More...
 
final boolean growIfNeeded (final int spareComponents)
 Increase the capacity of the buffer if necessary to add given spareComponents components. More...
 
final boolean reserve (int elementCount)
 Increase the capacity of the buffer to given elementCount element size, i.e. More...
 
 GLArrayDataClient (final GLArrayDataClient src)
 Copy Constructor. More...
 
float getGrowthFactor ()
 Returns this buffer's growth factor. More...
 
void setGrowthFactor (final float v)
 Sets a new growth factor for this buffer. More...
 
- Public Member Functions inherited from com.jogamp.opengl.util.GLArrayDataWrapper
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)
 
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)
 

Static Public Member Functions

static GLArrayDataServer createFixed (final int index, final int compsPerElement, final int dataType, final boolean normalized, final int stride, final Buffer buffer, final int vboUsage) throws GLException
 Create a VBO, using a predefined fixed function array index and starting with a given Buffer object incl it's stride. More...
 
static GLArrayDataServer createFixed (final int index, final int compsPerElement, final int dataType, final boolean normalized, final int initialElementCount, final int vboUsage) throws GLException
 Create a VBO, using a predefined fixed function array index and starting with a new created Buffer object with initialElementCount size. More...
 
static GLArrayDataServer createGLSL (final String name, final int compsPerElement, final int dataType, final boolean normalized, final int initialElementCount, final int vboUsage) throws GLException
 Create a VBO, using a custom GLSL array attribute name and starting with a new created Buffer object with initialElementCount size. More...
 
static GLArrayDataServer createGLSLMapped (final String name, final int compsPerElement, final int dataType, final boolean normalized, final int mappedElementCount, final int vboUsage) throws GLException
 Create a VBO, using a custom GLSL array attribute name intended for GPU buffer storage mapping, see GLBufferStorage, via mapStorage(GL, int) and mapStorage(GL, long, long, int). More...
 
static GLArrayDataServer createGLSL (final String name, final int compsPerElement, final int dataType, final boolean normalized, final int stride, final Buffer buffer, final int vboUsage) throws GLException
 Create a VBO, using a custom GLSL array attribute name and starting with a given Buffer object incl it's stride. More...
 
static GLArrayDataServer createData (final int compsPerElement, final int dataType, final int stride, final Buffer buffer, final int vboUsage, final int vboTarget) throws GLException
 Create a VBO data object for any target w/o render pipeline association, ie GL#GL_ELEMENT_ARRAY_BUFFER. More...
 
static GLArrayDataServer createData (final int compsPerElement, final int dataType, final int initialElementCount, final int vboUsage, final int vboTarget) throws GLException
 Create a VBO data object for any target w/o render pipeline association, ie GL#GL_ELEMENT_ARRAY_BUFFER. More...
 
static GLArrayDataServer createDataMapped (final int compsPerElement, final int dataType, final int mappedElementCount, final int vboUsage, final int vboTarget) throws GLException
 Create a VBO data object for any target w/o render pipeline association, i.e. More...
 
static GLArrayDataServer createFixedInterleaved (final int compsPerElement, final int dataType, final boolean normalized, final int initialElementCount, final int vboUsage) throws GLException
 Create a VBO for fixed function interleaved array data starting with a new created Buffer object with initialElementCount size. More...
 
static GLArrayDataServer createFixedInterleavedMapped (final int compsPerElement, final int dataType, final boolean normalized, final int mappedElementCount, final int vboUsage) throws GLException
 Create a VBO for fixed function interleaved array data intended for GPU buffer storage mapping, see GLBufferStorage, via mapStorage(GL, int) and mapStorage(GL, long, long, int). More...
 
static GLArrayDataServer createFixedInterleaved (final int compsPerElement, final int dataType, final boolean normalized, final int stride, final Buffer buffer, final int vboUsage) throws GLException
 Create a VBO for fixed function interleaved array data starting with a given Buffer object incl it's stride. More...
 
static GLArrayDataServer createGLSLInterleaved (final int compsPerElement, final int dataType, final boolean normalized, final int initialElementCount, final int vboUsage) throws GLException
 Create a VBO for GLSL interleaved array data starting with a new created Buffer object with initialElementCount size. More...
 
static GLArrayDataServer createGLSLInterleavedMapped (final int compsPerElement, final int dataType, final boolean normalized, final int mappedElementCount, final int vboUsage) throws GLException
 Create a VBO for GLSL interleaved array data intended for GPU buffer storage mapping, see GLBufferStorage, via mapStorage(GL, int) and mapStorage(GL, long, long, int). More...
 
static GLArrayDataServer createGLSLInterleaved (final int compsPerElement, final int dataType, final boolean normalized, final int stride, final Buffer buffer, final int vboUsage) throws GLException
 Create a VBO for GLSL interleaved array data starting with a given Buffer object incl it's stride. More...
 
- Static Public Member Functions inherited from com.jogamp.opengl.util.GLArrayDataClient
static GLArrayDataClient createFixed (final int index, final int comps, final int dataType, final boolean normalized, final int initialElementCount) throws GLException
 Create a client side buffer object, using a predefined fixed function array index and starting with a new created Buffer object with initialElementCount size. More...
 
static GLArrayDataClient createFixed (final int index, final int comps, final int dataType, final boolean normalized, final int stride, final Buffer buffer) throws GLException
 Create a client side buffer object, using a predefined fixed function array index and starting with a given Buffer object incl it's stride. More...
 
static GLArrayDataClient createGLSL (final String name, final int comps, final int dataType, final boolean normalized, final int initialElementCount) throws GLException
 Create a client side buffer object, using a custom GLSL array attribute name and starting with a new created Buffer object with initialElementCount size. More...
 
static GLArrayDataClient createGLSL (final String name, final int comps, final int dataType, final boolean normalized, final int stride, final Buffer buffer) throws GLException
 Create a client side buffer object, using a custom GLSL array attribute name and starting with a given Buffer object incl it's stride. More...
 
- Static Public Member Functions inherited from com.jogamp.opengl.util.GLArrayDataWrapper
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)
 

Protected Member Functions

 GLArrayDataServer (final String name, final int index, final int comps, final int dataType, final boolean normalized, final int stride, final Buffer data, final int initialElementCount, final float growthFactor, final int mappedElementCount, final boolean isVertexAttribute, final Class<? extends GLArrayHandler > handlerClass, final int vboName, final long vboOffset, final int vboUsage, final int vboTarget, final boolean usesGLSL) throws GLException
 
void init_vbo (final GL gl)
 
- Protected Member Functions inherited from com.jogamp.opengl.util.GLArrayDataClient
final void checkSeal (final boolean test) throws GLException
 
 GLArrayDataClient (final String name, final int index, final int comps, final int dataType, final boolean normalized, final int stride, final Buffer data, final int initialElementCount, final float growthFactor, final int mappedElementCount, final boolean isVertexAttribute, final Class<? extends GLArrayHandler > handlerClass, final int vboName, final long vboOffset, final int vboUsage, final int vboTarget, final boolean usesGLSL) throws GLException
 
void init_vbo (final GL gl)
 
- Protected Member Functions inherited from 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
 

Additional Inherited Members

- Static Public Attributes inherited from com.jogamp.opengl.util.GLArrayDataClient
static final float DEFAULT_GROWTH_FACTOR = 1.618f
 Default growth factor using the golden ratio 1.618. More...
 
- Static Public Attributes inherited from com.jogamp.opengl.util.GLArrayDataWrapper
static final boolean DEBUG = Debug.debug("GLArrayData")
 
- Protected Attributes inherited from com.jogamp.opengl.util.GLArrayDataClient
final int initElemCount
 
final GLArrayHandler glArrayHandler
 
final boolean usesGLSL
 
float growthFactor
 
boolean bufferEnabled
 
boolean bufferWritten
 
boolean enableBufferAlways
 
ShaderState shaderState
 
- Protected Attributes inherited from com.jogamp.opengl.util.GLArrayDataWrapper
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 56 of file GLArrayDataServer.java.

Constructor & Destructor Documentation

◆ GLArrayDataServer() [1/2]

com.jogamp.opengl.util.GLArrayDataServer.GLArrayDataServer ( final String  name,
final int  index,
final int  comps,
final int  dataType,
final boolean  normalized,
final int  stride,
final Buffer  data,
final int  initialElementCount,
final float  growthFactor,
final int  mappedElementCount,
final boolean  isVertexAttribute,
final Class<? extends GLArrayHandler >  handlerClass,
final int  vboName,
final long  vboOffset,
final int  vboUsage,
final int  vboTarget,
final boolean  usesGLSL 
) throws GLException
protected

Definition at line 583 of file GLArrayDataServer.java.

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

◆ GLArrayDataServer() [2/2]

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

Copy Constructor.

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

All other values are simply copied.

Definition at line 617 of file GLArrayDataServer.java.

Member Function Documentation

◆ addFixedSubArray()

GLArrayData com.jogamp.opengl.util.GLArrayDataServer.addFixedSubArray ( final int  index,
final int  comps,
final int  vboTarget 
)

Configure a segment of this fixed function interleaved array (see createFixedInterleaved(int, int, boolean, int, int)).

This method may be called several times as long the sum of interleaved components does not exceed the total component count of the created interleaved array.

The memory of the the interleaved array is being used.

Must be called before using the array, eg: seal(boolean), putf(float), ..

Parameters
indexThe GL array index, maybe -1 if vboTarget is GL#GL_ELEMENT_ARRAY_BUFFER
compsThis interleaved array segment's component count per element
vboTargetGL#GL_ARRAY_BUFFER or GL#GL_ELEMENT_ARRAY_BUFFER

Definition at line 314 of file GLArrayDataServer.java.

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

◆ addGLSLSubArray()

GLArrayDataWrapper com.jogamp.opengl.util.GLArrayDataServer.addGLSLSubArray ( final String  name,
final int  comps,
final int  vboTarget 
)

Configure a segment of this GLSL interleaved array (see createGLSLInterleaved(int, int, boolean, int, int)).

This method may be called several times as long the sum of interleaved components does not exceed the total component count of the created interleaved array.

The memory of the the interleaved array is being used.

Must be called before using the array, eg: seal(boolean), putf(float), ..

Parameters
nameThe custom name for the GL attribute, maybe null if vboTarget is GL#GL_ELEMENT_ARRAY_BUFFER
compsThis interleaved array segment's component count per element
vboTargetGL#GL_ARRAY_BUFFER or GL#GL_ELEMENT_ARRAY_BUFFER

Definition at line 415 of file GLArrayDataServer.java.

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

◆ createData() [1/2]

static GLArrayDataServer com.jogamp.opengl.util.GLArrayDataServer.createData ( final int  compsPerElement,
final int  dataType,
final int  initialElementCount,
final int  vboUsage,
final int  vboTarget 
) throws GLException
static

Create a VBO data object for any target w/o render pipeline association, ie GL#GL_ELEMENT_ARRAY_BUFFER.

Hence no index, name for a fixed function pipeline nor vertex attribute is given.

Parameters
compsPerElementcomponent count per element
dataTypeThe component's OpenGL data type
initialElementCount
vboUsageGL2ES2#GL_STREAM_DRAW, GL#GL_STATIC_DRAW or GL#GL_DYNAMIC_DRAW
vboTargetGL#GL_ELEMENT_ARRAY_BUFFER, ..

Definition at line 211 of file GLArrayDataServer.java.

Here is the call graph for this function:

◆ createData() [2/2]

static GLArrayDataServer com.jogamp.opengl.util.GLArrayDataServer.createData ( final int  compsPerElement,
final int  dataType,
final int  stride,
final Buffer  buffer,
final int  vboUsage,
final int  vboTarget 
) throws GLException
static

Create a VBO data object for any target w/o render pipeline association, ie GL#GL_ELEMENT_ARRAY_BUFFER.

Hence no index, name for a fixed function pipeline nor vertex attribute is given.

Parameters
compsPerElementcomponent count per element
dataTypeThe component's OpenGL data type
stridein bytes from one element to the other. If zero, compsPerElement * compSizeInBytes
bufferthe user define data
vboUsageGL2ES2#GL_STREAM_DRAW, GL#GL_STATIC_DRAW or GL#GL_DYNAMIC_DRAW
vboTargetGL#GL_ELEMENT_ARRAY_BUFFER, .. GL#glGenBuffers(int, int[], int)

Definition at line 192 of file GLArrayDataServer.java.

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

◆ createDataMapped()

static GLArrayDataServer com.jogamp.opengl.util.GLArrayDataServer.createDataMapped ( final int  compsPerElement,
final int  dataType,
final int  mappedElementCount,
final int  vboUsage,
final int  vboTarget 
) throws GLException
static

Create a VBO data object for any target w/o render pipeline association, i.e.

GL#GL_ELEMENT_ARRAY_BUFFER, intended for GPU buffer storage mapping, see GLBufferStorage, via mapStorage(GL, int) and mapStorage(GL, long, long, int).

No index, name for a fixed function pipeline nor vertex attribute is given.

Parameters
compsPerElementcomponent count per element
dataTypeThe component's OpenGL data type
mappedElementCount
vboUsageGL2ES2#GL_STREAM_DRAW, GL#GL_STATIC_DRAW or GL#GL_DYNAMIC_DRAW
vboTargetGL#GL_ELEMENT_ARRAY_BUFFER, ..

Definition at line 232 of file GLArrayDataServer.java.

Here is the call graph for this function:

◆ createFixed() [1/2]

static GLArrayDataServer com.jogamp.opengl.util.GLArrayDataServer.createFixed ( final int  index,
final int  compsPerElement,
final int  dataType,
final boolean  normalized,
final int  initialElementCount,
final int  vboUsage 
) throws GLException
static

Create a VBO, using a predefined fixed function array index and starting with a new created Buffer object with initialElementCount size.

On profiles GL2 and ES1 the fixed function pipeline behavior is as expected. On profile ES2 the fixed function emulation will transform these calls to EnableVertexAttribArray and VertexAttribPointer calls, and a predefined vertex attribute variable name will be chosen.

The default name mapping will be used, see GLPointerFuncUtil#getPredefinedArrayIndexName(int).

Parameters
indexThe GL array index
compsPerElementcomponent count per element
dataTypeThe component's OpenGL data type
normalizedWhether the data shall be normalized
initialElementCount
vboUsageGL2ES2#GL_STREAM_DRAW, GL#GL_STATIC_DRAW or GL#GL_DYNAMIC_DRAW
See also
com.jogamp.opengl.GLContext::getPredefinedArrayIndexName(int)

Definition at line 113 of file GLArrayDataServer.java.

Here is the call graph for this function:

◆ createFixed() [2/2]

static GLArrayDataServer com.jogamp.opengl.util.GLArrayDataServer.createFixed ( final int  index,
final int  compsPerElement,
final int  dataType,
final boolean  normalized,
final int  stride,
final Buffer  buffer,
final int  vboUsage 
) throws GLException
static

Create a VBO, using a predefined fixed function array index and starting with a given Buffer object incl it's stride.

On profiles GL2 and ES1 the fixed function pipeline behavior is as expected. On profile ES2 the fixed function emulation will transform these calls to EnableVertexAttribArray and VertexAttribPointer calls, and a predefined vertex attribute variable name will be chosen.

The default name mapping will be used, see GLPointerFuncUtil#getPredefinedArrayIndexName(int).

Parameters
indexThe GL array index
compsPerElementcomponent count per element
dataTypeThe component's OpenGL data type
normalizedWhether the data shall be normalized
stridein bytes from one element to the other. If zero, compsPerElement * compSizeInBytes
bufferthe user define data
vboUsageGL2ES2#GL_STREAM_DRAW, GL#GL_STATIC_DRAW or GL#GL_DYNAMIC_DRAW
See also
com.jogamp.opengl.GLContext::getPredefinedArrayIndexName(int)

Definition at line 84 of file GLArrayDataServer.java.

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

◆ createFixedInterleaved() [1/2]

static GLArrayDataServer com.jogamp.opengl.util.GLArrayDataServer.createFixedInterleaved ( final int  compsPerElement,
final int  dataType,
final boolean  normalized,
final int  initialElementCount,
final int  vboUsage 
) throws GLException
static

Create a VBO for fixed function interleaved array data starting with a new created Buffer object with initialElementCount size.

User needs to configure the interleaved segments via addFixedSubArray(int, int, int).

Parameters
compsPerElementThe total number of all interleaved components per element.
dataTypeThe component's OpenGL data type
normalizedWhether the data shall be normalized
initialElementCountThe initial number of all interleaved elements
vboUsageGL2ES2#GL_STREAM_DRAW, GL#GL_STATIC_DRAW or GL#GL_DYNAMIC_DRAW

Definition at line 251 of file GLArrayDataServer.java.

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

◆ createFixedInterleaved() [2/2]

static GLArrayDataServer com.jogamp.opengl.util.GLArrayDataServer.createFixedInterleaved ( final int  compsPerElement,
final int  dataType,
final boolean  normalized,
final int  stride,
final Buffer  buffer,
final int  vboUsage 
) throws GLException
static

Create a VBO for fixed function interleaved array data starting with a given Buffer object incl it's stride.

User needs to configure the interleaved segments via addFixedSubArray(int, int, int).

Parameters
compsPerElementThe total number of all interleaved components per element.
dataTypeThe component's OpenGL data type
normalizedWhether the data shall be normalized
stridein bytes from one element of a sub-array to the other. If zero, compsPerElement * compSizeInBytes
bufferThe user define data of all interleaved elements
vboUsageGL2ES2#GL_STREAM_DRAW, GL#GL_STATIC_DRAW or GL#GL_DYNAMIC_DRAW

Definition at line 292 of file GLArrayDataServer.java.

Here is the call graph for this function:

◆ createFixedInterleavedMapped()

static GLArrayDataServer com.jogamp.opengl.util.GLArrayDataServer.createFixedInterleavedMapped ( final int  compsPerElement,
final int  dataType,
final boolean  normalized,
final int  mappedElementCount,
final int  vboUsage 
) throws GLException
static

Create a VBO for fixed function interleaved array data intended for GPU buffer storage mapping, see GLBufferStorage, via mapStorage(GL, int) and mapStorage(GL, long, long, int).

User needs to configure the interleaved segments via addFixedSubArray(int, int, int).

Parameters
compsPerElementThe total number of all interleaved components per element.
dataTypeThe component's OpenGL data type
normalizedWhether the data shall be normalized
mappedElementCountThe total number of all interleaved elements
vboUsageGL2ES2#GL_STREAM_DRAW, GL#GL_STATIC_DRAW or GL#GL_DYNAMIC_DRAW

Definition at line 270 of file GLArrayDataServer.java.

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

◆ createGLSL() [1/2]

static GLArrayDataServer com.jogamp.opengl.util.GLArrayDataServer.createGLSL ( final String  name,
final int  compsPerElement,
final int  dataType,
final boolean  normalized,
final int  initialElementCount,
final int  vboUsage 
) throws GLException
static

Create a VBO, using a custom GLSL array attribute name and starting with a new created Buffer object with initialElementCount size.

Parameters
nameThe custom name for the GL attribute
compsPerElementcomponent count per element
dataTypeThe component's OpenGL data type
normalizedWhether the data shall be normalized
initialElementCount
vboUsageGL2ES2#GL_STREAM_DRAW, GL#GL_STATIC_DRAW or GL#GL_DYNAMIC_DRAW

Definition at line 131 of file GLArrayDataServer.java.

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

◆ createGLSL() [2/2]

static GLArrayDataServer com.jogamp.opengl.util.GLArrayDataServer.createGLSL ( final String  name,
final int  compsPerElement,
final int  dataType,
final boolean  normalized,
final int  stride,
final Buffer  buffer,
final int  vboUsage 
) throws GLException
static

Create a VBO, using a custom GLSL array attribute name and starting with a given Buffer object incl it's stride.

Parameters
nameThe custom name for the GL attribute
compsPerElementcomponent count per element
dataTypeThe component's OpenGL data type
normalizedWhether the data shall be normalized
stridein bytes from one element to the other. If zero, compsPerElement * compSizeInBytes
bufferthe user define data
vboUsageGL2ES2#GL_STREAM_DRAW, GL#GL_STATIC_DRAW or GL#GL_DYNAMIC_DRAW

Definition at line 170 of file GLArrayDataServer.java.

Here is the call graph for this function:

◆ createGLSLInterleaved() [1/2]

static GLArrayDataServer com.jogamp.opengl.util.GLArrayDataServer.createGLSLInterleaved ( final int  compsPerElement,
final int  dataType,
final boolean  normalized,
final int  initialElementCount,
final int  vboUsage 
) throws GLException
static

Create a VBO for GLSL interleaved array data starting with a new created Buffer object with initialElementCount size.

User needs to configure the interleaved segments via addGLSLSubArray(int, int, int).

Parameters
compsPerElementThe total number of all interleaved components per element.
dataTypeThe component's OpenGL data type
normalizedWhether the data shall be normalized
initialElementCountThe initial number of all interleaved elements
vboUsageGL2ES2#GL_STREAM_DRAW, GL#GL_STATIC_DRAW or GL#GL_DYNAMIC_DRAW

Definition at line 354 of file GLArrayDataServer.java.

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

◆ createGLSLInterleaved() [2/2]

static GLArrayDataServer com.jogamp.opengl.util.GLArrayDataServer.createGLSLInterleaved ( final int  compsPerElement,
final int  dataType,
final boolean  normalized,
final int  stride,
final Buffer  buffer,
final int  vboUsage 
) throws GLException
static

Create a VBO for GLSL interleaved array data starting with a given Buffer object incl it's stride.

User needs to configure the interleaved segments via addGLSLSubArray(int, int, int).

Parameters
compsPerElementThe total number of all interleaved components per element.
dataTypeThe component's OpenGL data type
normalizedWhether the data shall be normalized
stridein bytes from one element of a sub-array to the other. If zero, compsPerElement * compSizeInBytes
bufferThe user define data of all interleaved elements
vboUsageGL2ES2#GL_STREAM_DRAW, GL#GL_STATIC_DRAW or GL#GL_DYNAMIC_DRAW

Definition at line 394 of file GLArrayDataServer.java.

Here is the call graph for this function:

◆ createGLSLInterleavedMapped()

static GLArrayDataServer com.jogamp.opengl.util.GLArrayDataServer.createGLSLInterleavedMapped ( final int  compsPerElement,
final int  dataType,
final boolean  normalized,
final int  mappedElementCount,
final int  vboUsage 
) throws GLException
static

Create a VBO for GLSL interleaved array data intended for GPU buffer storage mapping, see GLBufferStorage, via mapStorage(GL, int) and mapStorage(GL, long, long, int).

User needs to configure the interleaved segments via addGLSLSubArray(int, int, int).

Parameters
compsPerElementThe total number of all interleaved components per element.
dataTypeThe component's OpenGL data type
normalizedWhether the data shall be normalized
mappedElementCountThe total number of all interleaved elements
vboUsageGL2ES2#GL_STREAM_DRAW, GL#GL_STATIC_DRAW or GL#GL_DYNAMIC_DRAW

Definition at line 373 of file GLArrayDataServer.java.

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

◆ createGLSLMapped()

static GLArrayDataServer com.jogamp.opengl.util.GLArrayDataServer.createGLSLMapped ( final String  name,
final int  compsPerElement,
final int  dataType,
final boolean  normalized,
final int  mappedElementCount,
final int  vboUsage 
) throws GLException
static

Create a VBO, using a custom GLSL array attribute name intended for GPU buffer storage mapping, see GLBufferStorage, via mapStorage(GL, int) and mapStorage(GL, long, long, int).

Parameters
nameThe custom name for the GL attribute
compsPerElementcomponent count per element
dataTypeThe component's OpenGL data type
normalizedWhether the data shall be normalized
mappedElementCount
vboUsageGL2ES2#GL_STREAM_DRAW, GL#GL_STATIC_DRAW or GL#GL_DYNAMIC_DRAW

Definition at line 149 of file GLArrayDataServer.java.

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

◆ destroy()

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

Reimplemented from com.jogamp.opengl.util.GLArrayDataClient.

Definition at line 461 of file GLArrayDataServer.java.

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

◆ getInterleavedOffset()

final int com.jogamp.opengl.util.GLArrayDataServer.getInterleavedOffset ( )

Definition at line 448 of file GLArrayDataServer.java.

◆ init_vbo()

void com.jogamp.opengl.util.GLArrayDataServer.init_vbo ( final GL  gl)
protected

Reimplemented from com.jogamp.opengl.util.GLArrayDataClient.

Definition at line 596 of file GLArrayDataServer.java.

Here is the call graph for this function:

◆ mapStorage() [1/2]

GLBufferStorage com.jogamp.opengl.util.GLArrayDataServer.mapStorage ( final GL  gl,
final int  access 
)

Definition at line 489 of file GLArrayDataServer.java.

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

◆ mapStorage() [2/2]

GLBufferStorage com.jogamp.opengl.util.GLArrayDataServer.mapStorage ( final GL  gl,
final long  offset,
final long  length,
final int  access 
)

Definition at line 506 of file GLArrayDataServer.java.

Here is the call graph for this function:

◆ setInterleavedOffset()

final void com.jogamp.opengl.util.GLArrayDataServer.setInterleavedOffset ( final int  interleavedOffset)

Definition at line 444 of file GLArrayDataServer.java.

◆ setVBOEnabled()

void com.jogamp.opengl.util.GLArrayDataServer.setVBOEnabled ( final boolean  vboUsage)

Convenient way do disable the VBO behavior and switch to client side data one Only possible if buffer is defined.

Reimplemented from com.jogamp.opengl.util.GLArrayDataWrapper.

Definition at line 484 of file GLArrayDataServer.java.

Here is the call graph for this function:

◆ toString()

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

Reimplemented from com.jogamp.opengl.util.GLArrayDataClient.

Definition at line 552 of file GLArrayDataServer.java.

Here is the call graph for this function:

◆ unmapStorage()

void com.jogamp.opengl.util.GLArrayDataServer.unmapStorage ( final GL  gl)

Definition at line 539 of file GLArrayDataServer.java.

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

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