Class JoGLElementsBuffer
java.lang.Object
org.scilab.forge.scirenderer.implementation.jogl.buffers.JoGLDataBuffer
org.scilab.forge.scirenderer.implementation.jogl.buffers.JoGLElementsBuffer
- All Implemented Interfaces:
DataBuffer,ElementsBuffer
- Author:
- Pierre Lando
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionintbindAsColorsBuffer(com.jogamp.opengl.GL2 gl) intbindAsNormalsBuffer(com.jogamp.opengl.GL2 gl) intbindAsTextureCoordinatesBuffer(com.jogamp.opengl.GL2 gl) intbindAsVertexBuffer(com.jogamp.opengl.GL2 gl) voidclear()protected BufferReturn the data as byte buffer.intReturn the size of this buffer in byte.getData()Return the data.intReturn the number of coordinate for one element.protected intReturn the OpenGl bind destination.intgetSize()Return the number of elements.voidsetData(float[] newData, int elementSize) Set the data.voidSet the data.voidsetData(FloatBuffer newData, int elementsSize) Set the data.Methods inherited from class org.scilab.forge.scirenderer.implementation.jogl.buffers.JoGLDataBuffer
dispose, disposeWithoutDelete, getGlName, isDataUploaded, reload, setDataUploaded, synchronize
-
Field Details
-
ELEMENT_SIZE
public static final int ELEMENT_SIZEThe current size of one element.- See Also:
-
-
Method Details
-
setData
public void setData(float[] newData, int elementSize) Description copied from interface:ElementsBufferSet the data.- Specified by:
setDatain interfaceElementsBuffer- Parameters:
newData- the new data.elementSize- the size of data elements.
-
setData
Description copied from interface:ElementsBufferSet the data.- Specified by:
setDatain interfaceElementsBuffer- Parameters:
newData- the new data.elementSize- the size of data elements.
-
setData
Description copied from interface:ElementsBufferSet the data.- Specified by:
setDatain interfaceElementsBuffer- Parameters:
newData- the new data.elementsSize- the size of data elements.
-
getSize
public int getSize()Description copied from interface:DataBufferReturn the number of elements.- Specified by:
getSizein interfaceDataBuffer- Returns:
- the number of elements.
-
getData
Description copied from interface:DataBufferReturn the data.- Specified by:
getDatain interfaceDataBuffer- Specified by:
getDatain interfaceElementsBuffer- Returns:
- the data.
-
getElementsSize
public int getElementsSize()Description copied from interface:ElementsBufferReturn the number of coordinate for one element.- Specified by:
getElementsSizein interfaceElementsBuffer- Returns:
- the number of coordinate for one element.
-
getByteSize
public int getByteSize()Description copied from class:JoGLDataBufferReturn the size of this buffer in byte.- Specified by:
getByteSizein classJoGLDataBuffer- Returns:
- the size of this buffer in byte.
-
getByteBuffer
Description copied from class:JoGLDataBufferReturn the data as byte buffer.- Specified by:
getByteBufferin classJoGLDataBuffer- Returns:
- the data as byte buffer.
-
getGLBindDestination
protected int getGLBindDestination()Description copied from class:JoGLDataBufferReturn the OpenGl bind destination.- Specified by:
getGLBindDestinationin classJoGLDataBuffer- Returns:
- the OpenGl bind destination.
-
bindAsVertexBuffer
public int bindAsVertexBuffer(com.jogamp.opengl.GL2 gl) -
bindAsNormalsBuffer
public int bindAsNormalsBuffer(com.jogamp.opengl.GL2 gl) -
bindAsColorsBuffer
public int bindAsColorsBuffer(com.jogamp.opengl.GL2 gl) -
bindAsTextureCoordinatesBuffer
public int bindAsTextureCoordinatesBuffer(com.jogamp.opengl.GL2 gl) -
clear
public void clear()- Specified by:
clearin interfaceDataBuffer- Specified by:
clearin interfaceElementsBuffer- Specified by:
clearin classJoGLDataBuffer
-