|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.jogamp.opengl.util.GLArrayDataWrapper
com.jogamp.opengl.util.GLArrayDataClient
public class GLArrayDataClient
| Field Summary |
|---|
| Fields inherited from class com.jogamp.opengl.util.GLArrayDataWrapper |
|---|
DEBUG |
| Method Summary | |
|---|---|
static GLArrayDataClient |
createFixed(int index,
int comps,
int dataType,
boolean normalized,
int initialElementCount)
Create a client side buffer object, 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. |
static GLArrayDataClient |
createFixed(int index,
int comps,
int dataType,
boolean normalized,
int stride,
Buffer buffer)
Create a client side buffer object, 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. |
static GLArrayDataClient |
createGLSL(String name,
int comps,
int dataType,
boolean normalized,
int initialElementCount)
Create a client side buffer object, using a custom GLSL array attribute name and starting with a new created Buffer object with initialElementCount size |
static GLArrayDataClient |
createGLSL(String name,
int comps,
int dataType,
boolean normalized,
int stride,
Buffer buffer)
Create a client side buffer object, using a custom GLSL array attribute name and starting with a given Buffer object incl it's stride |
void |
destroy(GL gl)
|
void |
enableBuffer(GL gl,
boolean enable)
Enables/disables the buffer, sets the client state, binds the VBO if used and transfers the data if necessary. |
boolean |
enabled()
|
boolean |
isVBOWritten()
Is the buffer written to the VBO ? |
void |
padding(int doneInByteSize)
|
void |
put(Buffer v)
Generic buffer relative put method. |
void |
putb(byte v)
|
void |
putf(float v)
|
void |
puti(int v)
|
void |
puts(short v)
|
void |
putx(int v)
|
void |
reset()
|
void |
reset(GL gl)
|
void |
rewind()
|
void |
seal(boolean seal)
If seal is true, it disables write operations to the buffer. |
void |
seal(GL gl,
boolean seal)
Convenience method calling GLArrayDataEditable.seal(boolean) and GLArrayDataEditable.enableBuffer(GL, boolean). |
boolean |
sealed()
|
void |
setEnableAlways(boolean always)
Affects the behavior of 'enableBuffer'. |
void |
setVBOWritten(boolean written)
Marks the buffer written to the VBO |
String |
toString()
|
| Methods inherited from class com.jogamp.opengl.util.GLArrayDataWrapper |
|---|
createFixed, createGLSL, getBuffer, getBufferClass, getBufferClass, getComponentCount, getComponentSizeInBytes, getComponentType, getElementCount, getIndex, getLocation, getName, getNormalized, getSizeInBytes, getStride, getVBOName, getVBOOffset, getVBOTarget, getVBOUsage, isVBO, isVertexAttribute, setLocation, setName, setVBOEnabled, setVBOName, setVBOTarget, setVBOUsage, validate |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface javax.media.opengl.GLArrayData |
|---|
getBuffer, getComponentCount, getComponentSizeInBytes, getComponentType, getElementCount, getIndex, getLocation, getName, getNormalized, getSizeInBytes, getStride, getVBOName, getVBOOffset, getVBOTarget, getVBOUsage, isVBO, isVertexAttribute, setLocation, setName |
| Method Detail |
|---|
public static GLArrayDataClient createFixed(int index,
int comps,
int dataType,
boolean normalized,
int initialElementCount)
throws GLException
GLPointerFuncUtil.getPredefinedArrayIndexName(int).
index - The GL array indexcomps - The array component numberdataType - The array index GL data typenormalized - Whether the data shall be normalizedinitialElementCount -
GLExceptionjavax.media.opengl.GLContext#getPredefinedArrayIndexName(int)
public static GLArrayDataClient createFixed(int index,
int comps,
int dataType,
boolean normalized,
int stride,
Buffer buffer)
throws GLException
GLPointerFuncUtil.getPredefinedArrayIndexName(int).
index - The GL array indexcomps - The array component numberdataType - The array index GL data typenormalized - Whether the data shall be normalizedstride - buffer - the user define data
GLExceptionjavax.media.opengl.GLContext#getPredefinedArrayIndexName(int)
public static GLArrayDataClient createGLSL(String name,
int comps,
int dataType,
boolean normalized,
int initialElementCount)
throws GLException
name - The custom name for the GL attribute.comps - The array component numberdataType - The array index GL data typenormalized - Whether the data shall be normalizedinitialElementCount -
GLException
public static GLArrayDataClient createGLSL(String name,
int comps,
int dataType,
boolean normalized,
int stride,
Buffer buffer)
throws GLException
name - The custom name for the GL attribute.comps - The array component numberdataType - The array index GL data typenormalized - Whether the data shall be normalizedstride - buffer - the user define data
GLExceptionpublic final boolean isVBOWritten()
GLArrayDataEditable
isVBOWritten in interface GLArrayDataEditablepublic final boolean sealed()
sealed in interface GLArrayDataEditablepublic final boolean enabled()
enabled in interface GLArrayDataEditablepublic final void setVBOWritten(boolean written)
GLArrayDataEditable
setVBOWritten in interface GLArrayDataEditablepublic void destroy(GL gl)
destroy in interface GLArrayDataEditabledestroy in interface GLArrayDatadestroy in class GLArrayDataWrapperpublic void reset(GL gl)
reset in interface GLArrayDataEditable
public void seal(GL gl,
boolean seal)
GLArrayDataEditableGLArrayDataEditable.seal(boolean) and GLArrayDataEditable.enableBuffer(GL, boolean).
seal in interface GLArrayDataEditableGLArrayDataEditable.seal(boolean),
GLArrayDataEditable.enableBuffer(GL, boolean)
public void enableBuffer(GL gl,
boolean enable)
GLArrayDataEditableEnables/disables the buffer, sets the client state, binds the VBO if used and transfers the data if necessary.
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.
enableBuffer in interface GLArrayDataEditableGLArrayDataEditable.setEnableAlways(boolean)public void setEnableAlways(boolean always)
GLArrayDataEditable
setEnableAlways in interface GLArrayDataEditableGLArrayDataEditable.enableBuffer(GL, boolean)public void reset()
reset in interface GLArrayDataEditablepublic void seal(boolean seal)
GLArrayDataEditableIf 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.
seal in interface GLArrayDataEditableGLArrayDataEditable.seal(boolean)public void rewind()
rewind in interface GLArrayDataEditablepublic void padding(int doneInByteSize)
padding in interface GLArrayDataEditablepublic void put(Buffer v)
put in interface GLArrayDataEditablepublic void putb(byte v)
putb in interface GLArrayDataEditablepublic void puts(short v)
puts in interface GLArrayDataEditablepublic void puti(int v)
puti in interface GLArrayDataEditablepublic void putx(int v)
putx in interface GLArrayDataEditablepublic void putf(float v)
putf in interface GLArrayDataEditablepublic String toString()
toString in interface GLArrayDatatoString in class GLArrayDataWrapper
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||