public class JoGLElementsBuffer extends JoGLDataBuffer implements ElementsBuffer
Modifier and Type | Field and Description |
---|---|
static int |
ELEMENT_SIZE
The current size of one element.
|
Modifier and Type | Method and Description |
---|---|
int |
bindAsColorsBuffer(GL2 gl) |
int |
bindAsNormalsBuffer(GL2 gl) |
int |
bindAsTextureCoordinatesBuffer(GL2 gl) |
int |
bindAsVertexBuffer(GL2 gl) |
void |
clear() |
protected java.nio.Buffer |
getByteBuffer()
Return the data as byte buffer.
|
int |
getByteSize()
Return the size of this buffer in byte.
|
java.nio.FloatBuffer |
getData()
Return the data.
|
int |
getElementsSize()
Return the number of coordinate for one element.
|
protected int |
getGLBindDestination()
Return the OpenGl bind destination.
|
int |
getSize()
Return the number of elements.
|
void |
setData(float[] newData,
int elementSize)
Set the data.
|
void |
setData(java.lang.Float[] newData,
int elementSize)
Set the data.
|
void |
setData(java.nio.FloatBuffer newData,
int elementsSize)
Set the data.
|
dispose, getGlName, isDataUploaded, reload, setDataUploaded, synchronize
public static final int ELEMENT_SIZE
public void setData(float[] newData, int elementSize)
ElementsBuffer
setData
in interface ElementsBuffer
newData
- the new data.elementSize
- the size of data elements.public void setData(java.lang.Float[] newData, int elementSize)
ElementsBuffer
setData
in interface ElementsBuffer
newData
- the new data.elementSize
- the size of data elements.public void setData(java.nio.FloatBuffer newData, int elementsSize)
ElementsBuffer
setData
in interface ElementsBuffer
newData
- the new data.elementsSize
- the size of data elements.public int getSize()
DataBuffer
getSize
in interface DataBuffer
public java.nio.FloatBuffer getData()
DataBuffer
getData
in interface DataBuffer
getData
in interface ElementsBuffer
public int getElementsSize()
ElementsBuffer
getElementsSize
in interface ElementsBuffer
public int getByteSize()
JoGLDataBuffer
getByteSize
in class JoGLDataBuffer
protected java.nio.Buffer getByteBuffer()
JoGLDataBuffer
getByteBuffer
in class JoGLDataBuffer
protected int getGLBindDestination()
JoGLDataBuffer
getGLBindDestination
in class JoGLDataBuffer
public int bindAsVertexBuffer(GL2 gl)
public int bindAsNormalsBuffer(GL2 gl)
public int bindAsColorsBuffer(GL2 gl)
public int bindAsTextureCoordinatesBuffer(GL2 gl)
public void clear()
clear
in interface DataBuffer
clear
in interface ElementsBuffer
clear
in class JoGLDataBuffer