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, disposeWithoutDelete, getGlName, isDataUploaded, reload, setDataUploaded, synchronizepublic static final int ELEMENT_SIZE
public void setData(float[] newData,
int elementSize)
ElementsBuffersetData in interface ElementsBuffernewData - the new data.elementSize - the size of data elements.public void setData(java.lang.Float[] newData,
int elementSize)
ElementsBuffersetData in interface ElementsBuffernewData - the new data.elementSize - the size of data elements.public void setData(java.nio.FloatBuffer newData,
int elementsSize)
ElementsBuffersetData in interface ElementsBuffernewData - the new data.elementsSize - the size of data elements.public int getSize()
DataBuffergetSize in interface DataBufferpublic java.nio.FloatBuffer getData()
DataBuffergetData in interface DataBuffergetData in interface ElementsBufferpublic int getElementsSize()
ElementsBuffergetElementsSize in interface ElementsBufferpublic int getByteSize()
JoGLDataBuffergetByteSize in class JoGLDataBufferprotected java.nio.Buffer getByteBuffer()
JoGLDataBuffergetByteBuffer in class JoGLDataBufferprotected int getGLBindDestination()
JoGLDataBuffergetGLBindDestination in class JoGLDataBufferpublic 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 DataBufferclear in interface ElementsBufferclear in class JoGLDataBuffer