|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.opengl.util.GLArrayDataWrapper
public class GLArrayDataWrapper
Field Summary | |
---|---|
protected Buffer |
buffer
|
protected long |
bufferOffset
|
protected Class |
clazz
|
protected int |
components
|
protected int |
dataType
|
protected int |
index
|
protected boolean |
isVertexAttribute
|
protected int |
location
|
protected String |
name
|
protected boolean |
normalized
|
protected int |
stride
|
protected int |
strideB
|
protected int |
strideL
|
protected int |
vboName
|
protected boolean |
vboUsage
|
Constructor Summary | |
---|---|
protected |
GLArrayDataWrapper()
|
Method Summary | |
---|---|
static GLArrayDataWrapper |
createFixed(GL gl,
int index,
int comps,
int dataType,
boolean normalized,
int stride,
Buffer buffer,
int vboName,
long bufferOffset)
|
static GLArrayDataWrapper |
createGLSL(GL gl,
String name,
int comps,
int dataType,
boolean normalized,
int stride,
Buffer buffer,
int vboName,
long bufferOffset)
|
void |
destroy(GL gl)
|
Buffer |
getBuffer()
The Buffer holding the data, may be null in case of VBO |
Class |
getBufferClass()
|
static Class |
getBufferClass(int dataType)
|
int |
getComponentNumber()
The number of components per element |
int |
getComponentSize()
The components size in bytes |
int |
getComponentType()
The component's GL data type, ie. |
int |
getElementNumber()
Return the number of elements. |
int |
getIndex()
The index of the predefined array index, see list below, or -1 in case of a shader attribute array. |
int |
getLocation()
Returns the shader attribute location for this name, -1 if not yet determined |
String |
getName()
The name of the reflecting shader array attribute. |
boolean |
getNormalized()
True, if GL shall normalize fixed point data while converting them into float |
long |
getOffset()
The offset, if it's an VBO, otherwise -1 |
int |
getStride()
The distance to the next payload, allowing interleaved arrays. |
int |
getVBOName()
The VBO name, if it's an VBO, otherwise -1 |
protected void |
init(String name,
int index,
int comps,
int dataType,
boolean normalized,
int stride,
Buffer data,
boolean isVertexAttribute,
int vboName,
long bufferOffset)
|
boolean |
isVBO()
Determines wheather the data is server side (VBO), or a client side array (false). |
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 |
void |
setLocation(int v)
Sets the determined location of the shader attribute This is usually done within ShaderState. |
void |
setName(String newName)
Set a new name for this array. |
void |
setVBOName(int vboName)
|
void |
setVBOUsage(boolean vboUsage)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected int index
protected int location
protected String name
protected int components
protected int dataType
protected boolean normalized
protected int stride
protected int strideB
protected int strideL
protected Class clazz
protected Buffer buffer
protected boolean isVertexAttribute
protected long bufferOffset
protected int vboName
protected boolean vboUsage
Constructor Detail |
---|
protected GLArrayDataWrapper()
Method Detail |
---|
public static GLArrayDataWrapper createFixed(GL gl, int index, int comps, int dataType, boolean normalized, int stride, Buffer buffer, int vboName, long bufferOffset) throws GLException
GLException
public static GLArrayDataWrapper createGLSL(GL gl, String name, int comps, int dataType, boolean normalized, int stride, Buffer buffer, int vboName, long bufferOffset) throws GLException
GLException
public final boolean isVertexAttribute()
GLArrayData
isVertexAttribute
in interface GLArrayData
public final int getIndex()
GLArrayData
getIndex
in interface GLArrayData
javax.media.opengl.GL#GL_VERTEX_ARRAY
,
javax.media.opengl.GL#GL_NORMAL_ARRAY
,
javax.media.opengl.GL#GL_COLOR_ARRAY
,
javax.media.opengl.GL#GL_TEXTURE_COORD_ARRAY
public final int getLocation()
GLArrayData
getLocation
in interface GLArrayData
public final void setLocation(int v)
GLArrayData
setLocation
in interface GLArrayData
javax.media.opengl.glsl.ShaderState#glVertexAttribPointer(GL2ES2, GLArrayData)
public final String getName()
GLArrayData
getName
in interface GLArrayData
public final long getOffset()
GLArrayData
getOffset
in interface GLArrayData
public final int getVBOName()
GLArrayData
getVBOName
in interface GLArrayData
public final boolean isVBO()
GLArrayData
isVBO
in interface GLArrayData
public final Buffer getBuffer()
GLArrayData
getBuffer
in interface GLArrayData
public final int getComponentNumber()
GLArrayData
getComponentNumber
in interface GLArrayData
public final int getComponentType()
GLArrayData
getComponentType
in interface GLArrayData
public final int getComponentSize()
GLArrayData
getComponentSize
in interface GLArrayData
public final int getElementNumber()
GLArrayData
getElementNumber
in interface GLArrayData
public final boolean getNormalized()
GLArrayData
getNormalized
in interface GLArrayData
public final int getStride()
GLArrayData
getStride
in interface GLArrayData
public final Class getBufferClass()
public void destroy(GL gl)
destroy
in interface GLArrayData
public String toString()
toString
in interface GLArrayData
toString
in class Object
public static final Class getBufferClass(int dataType)
public void setName(String newName)
GLArrayData
setName
in interface GLArrayData
public void setVBOUsage(boolean vboUsage)
public void setVBOName(int vboName)
protected void init(String name, int index, int comps, int dataType, boolean normalized, int stride, Buffer data, boolean isVertexAttribute, int vboName, long bufferOffset) throws GLException
GLException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |