|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sun.opengl.util.GLArrayDataWrapper
com.sun.opengl.util.GLArrayDataClient
public class GLArrayDataClient
| Field Summary | |
|---|---|
protected boolean |
bufferEnabled
|
protected boolean |
bufferWritten
|
protected boolean |
enableBufferAlways
|
protected GLArrayHandler |
glArrayHandler
|
static boolean |
hasVBOBug
The OpenGL ES emulation on the PC probably has a buggy VBO implementation, where we have to 'refresh' the VertexPointer or VertexAttribArray after each BindBuffer ! This should not be necessary on proper native implementations. |
protected int |
initialSize
|
protected boolean |
sealed
|
protected boolean |
sealedGL
|
| Fields inherited from class com.sun.opengl.util.GLArrayDataWrapper |
|---|
buffer, bufferOffset, clazz, components, dataType, index, isVertexAttribute, location, name, normalized, stride, strideB, strideL, vboName, vboUsage |
| Constructor Summary | |
|---|---|
protected |
GLArrayDataClient()
|
| Method Summary | |
|---|---|
protected void |
checkSeal(boolean test)
|
static GLArrayDataClient |
createFixed(GL gl,
int index,
String name,
int comps,
int dataType,
boolean normalized,
int initialSize)
|
static GLArrayDataClient |
createFixed(GL gl,
int index,
String name,
int comps,
int dataType,
boolean normalized,
int stride,
Buffer buffer)
|
static GLArrayDataClient |
createGLSL(GL gl,
String name,
int comps,
int dataType,
boolean normalized,
int initialSize)
|
static GLArrayDataClient |
createGLSL(GL gl,
String name,
int comps,
int dataType,
boolean normalized,
int stride,
Buffer buffer)
|
void |
destroy(GL gl)
|
void |
enableBuffer(GL gl,
boolean enable)
Enables/disables the buffer, which implies the client state, binding the VBO and transfering the data if not done yet. |
int |
getBufferUsage()
The VBO buffer usage, if it's an VBO, otherwise -1 |
protected void |
growBuffer(int additional)
|
protected boolean |
growBufferIfNecessary(int spare)
|
protected void |
init_vbo(GL gl)
|
protected void |
init(String name,
int index,
int comps,
int dataType,
boolean normalized,
int stride,
Buffer data,
int initialSize,
boolean isVertexAttribute,
GLArrayHandler handler,
int vboName,
long bufferOffset)
|
boolean |
isBufferWritten()
Is the buffer written to the GPU ? |
void |
padding(int done)
|
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 disable write operations to the buffer. |
void |
seal(GL gl,
boolean seal)
If seal is true, it disable write operations to the buffer. |
boolean |
sealed()
|
void |
setBufferWritten(boolean written)
Marks the buffer written to the GPU |
void |
setEnableAlways(boolean always)
Affects the behavior of 'enableBuffer'. |
String |
toString()
|
| Methods inherited from class com.sun.opengl.util.GLArrayDataWrapper |
|---|
createFixed, createGLSL, getBuffer, getBufferClass, getBufferClass, getComponentNumber, getComponentSize, getComponentType, getElementNumber, getIndex, getLocation, getName, getNormalized, getOffset, getStride, getVBOName, init, isVBO, isVertexAttribute, setLocation, setName, setVBOName, setVBOUsage |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface javax.media.opengl.GLArrayData |
|---|
getBuffer, getComponentNumber, getComponentSize, getComponentType, getElementNumber, getIndex, getLocation, getName, getNormalized, getOffset, getStride, getVBOName, isVBO, isVertexAttribute, setLocation, setName |
| Field Detail |
|---|
public static final boolean hasVBOBug
protected boolean sealed
protected boolean sealedGL
protected boolean bufferEnabled
protected boolean bufferWritten
protected boolean enableBufferAlways
protected int initialSize
protected GLArrayHandler glArrayHandler
| Constructor Detail |
|---|
protected GLArrayDataClient()
| Method Detail |
|---|
public static GLArrayDataClient createFixed(GL gl,
int index,
String name,
int comps,
int dataType,
boolean normalized,
int initialSize)
throws GLException
index - The GL array indexname - The optional custom name for the GL array index, maybe null.
If null, the default name mapping will be used, see 'getPredefinedArrayIndexName(int)'.
This name might be used as the shader attribute name.comps - The array component numberdataType - The array index GL data typenormalized - Wheather the data shall be normalized
GLExceptionjavax.media.opengl.GLContext#getPredefinedArrayIndexName(int)
public static GLArrayDataClient createFixed(GL gl,
int index,
String name,
int comps,
int dataType,
boolean normalized,
int stride,
Buffer buffer)
throws GLException
GLException
public static GLArrayDataClient createGLSL(GL gl,
String name,
int comps,
int dataType,
boolean normalized,
int initialSize)
throws GLException
GLException
public static GLArrayDataClient createGLSL(GL gl,
String name,
int comps,
int dataType,
boolean normalized,
int stride,
Buffer buffer)
throws GLException
GLExceptionpublic final boolean isBufferWritten()
GLArrayDataEditable
isBufferWritten in interface GLArrayDataEditablepublic final boolean sealed()
sealed in interface GLArrayDataEditablepublic int getBufferUsage()
GLArrayDataEditable
getBufferUsage in interface GLArrayDataEditablepublic final void setBufferWritten(boolean written)
GLArrayDataEditable
setBufferWritten 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)
GLArrayDataEditable
seal in interface GLArrayDataEditableGLArrayDataEditable.seal(boolean)
public void enableBuffer(GL gl,
boolean enable)
GLArrayDataEditable
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)
GLArrayDataEditable
seal in interface GLArrayDataEditablepublic void rewind()
rewind in interface GLArrayDataEditablepublic void padding(int done)
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 GLArrayDataWrapperprotected final boolean growBufferIfNecessary(int spare)
protected final void growBuffer(int additional)
protected final void checkSeal(boolean test)
throws GLException
GLException
protected void init(String name,
int index,
int comps,
int dataType,
boolean normalized,
int stride,
Buffer data,
int initialSize,
boolean isVertexAttribute,
GLArrayHandler handler,
int vboName,
long bufferOffset)
throws GLException
GLExceptionprotected void init_vbo(GL gl)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||