|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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
GLException
javax.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
GLException
public final boolean isBufferWritten()
GLArrayDataEditable
isBufferWritten
in interface GLArrayDataEditable
public final boolean sealed()
sealed
in interface GLArrayDataEditable
public int getBufferUsage()
GLArrayDataEditable
getBufferUsage
in interface GLArrayDataEditable
public final void setBufferWritten(boolean written)
GLArrayDataEditable
setBufferWritten
in interface GLArrayDataEditable
public void destroy(GL gl)
destroy
in interface GLArrayDataEditable
destroy
in interface GLArrayData
destroy
in class GLArrayDataWrapper
public void reset(GL gl)
reset
in interface GLArrayDataEditable
public void seal(GL gl, boolean seal)
GLArrayDataEditable
seal
in interface GLArrayDataEditable
GLArrayDataEditable.seal(boolean)
public void enableBuffer(GL gl, boolean enable)
GLArrayDataEditable
enableBuffer
in interface GLArrayDataEditable
GLArrayDataEditable.setEnableAlways(boolean)
public void setEnableAlways(boolean always)
GLArrayDataEditable
setEnableAlways
in interface GLArrayDataEditable
GLArrayDataEditable.enableBuffer(GL, boolean)
public void reset()
reset
in interface GLArrayDataEditable
public void seal(boolean seal)
GLArrayDataEditable
seal
in interface GLArrayDataEditable
public void rewind()
rewind
in interface GLArrayDataEditable
public void padding(int done)
padding
in interface GLArrayDataEditable
public void put(Buffer v)
put
in interface GLArrayDataEditable
public void putb(byte v)
putb
in interface GLArrayDataEditable
public void puts(short v)
puts
in interface GLArrayDataEditable
public void puti(int v)
puti
in interface GLArrayDataEditable
public void putx(int v)
putx
in interface GLArrayDataEditable
public void putf(float v)
putf
in interface GLArrayDataEditable
public String toString()
toString
in interface GLArrayData
toString
in class GLArrayDataWrapper
protected 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
GLException
protected void init_vbo(GL gl)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |