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 TypeMethodDescriptionint
bindAsColorsBuffer
(com.jogamp.opengl.GL2 gl) int
bindAsNormalsBuffer
(com.jogamp.opengl.GL2 gl) int
bindAsTextureCoordinatesBuffer
(com.jogamp.opengl.GL2 gl) int
bindAsVertexBuffer
(com.jogamp.opengl.GL2 gl) void
clear()
protected Buffer
Return the data as byte buffer.int
Return the size of this buffer in byte.getData()
Return the data.int
Return the number of coordinate for one element.protected int
Return the OpenGl bind destination.int
getSize()
Return the number of elements.void
setData
(float[] newData, int elementSize) Set the data.void
Set the data.void
setData
(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:ElementsBuffer
Set the data.- Specified by:
setData
in interfaceElementsBuffer
- Parameters:
newData
- the new data.elementSize
- the size of data elements.
-
setData
Description copied from interface:ElementsBuffer
Set the data.- Specified by:
setData
in interfaceElementsBuffer
- Parameters:
newData
- the new data.elementSize
- the size of data elements.
-
setData
Description copied from interface:ElementsBuffer
Set the data.- Specified by:
setData
in interfaceElementsBuffer
- Parameters:
newData
- the new data.elementsSize
- the size of data elements.
-
getSize
public int getSize()Description copied from interface:DataBuffer
Return the number of elements.- Specified by:
getSize
in interfaceDataBuffer
- Returns:
- the number of elements.
-
getData
Description copied from interface:DataBuffer
Return the data.- Specified by:
getData
in interfaceDataBuffer
- Specified by:
getData
in interfaceElementsBuffer
- Returns:
- the data.
-
getElementsSize
public int getElementsSize()Description copied from interface:ElementsBuffer
Return the number of coordinate for one element.- Specified by:
getElementsSize
in interfaceElementsBuffer
- Returns:
- the number of coordinate for one element.
-
getByteSize
public int getByteSize()Description copied from class:JoGLDataBuffer
Return the size of this buffer in byte.- Specified by:
getByteSize
in classJoGLDataBuffer
- Returns:
- the size of this buffer in byte.
-
getByteBuffer
Description copied from class:JoGLDataBuffer
Return the data as byte buffer.- Specified by:
getByteBuffer
in classJoGLDataBuffer
- Returns:
- the data as byte buffer.
-
getGLBindDestination
protected int getGLBindDestination()Description copied from class:JoGLDataBuffer
Return the OpenGl bind destination.- Specified by:
getGLBindDestination
in 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:
clear
in interfaceDataBuffer
- Specified by:
clear
in interfaceElementsBuffer
- Specified by:
clear
in classJoGLDataBuffer
-