Class JoGLDataBuffer
java.lang.Object
org.scilab.forge.scirenderer.implementation.jogl.buffers.JoGLDataBuffer
- All Implemented Interfaces:
DataBuffer
- Direct Known Subclasses:
JoGLElementsBuffer
,JoGLIndicesBuffer
- Author:
- Pierre Lando
-
Method Summary
Modifier and TypeMethodDescriptionabstract void
clear()
void
dispose
(com.jogamp.opengl.GL gl) Called when it's time to kill this buffer.int
disposeWithoutDelete
(com.jogamp.opengl.GL gl) Called when it's time to kill this buffer.protected abstract Buffer
Return the data as byte buffer.abstract int
Return the size of this buffer in byte.protected abstract int
Return the OpenGl bind destination.protected Integer
getGlName
(com.jogamp.opengl.GL gl) Return the OpenGl name of this buffer.protected boolean
Return the data uploaded status.void
reload()
Called to reload a buffer.protected void
setDataUploaded
(boolean dataUploaded) Set the data uploaded status.protected void
synchronize
(com.jogamp.opengl.GL gl) Synchronize this buffer.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.scilab.forge.scirenderer.buffers.DataBuffer
getData, getSize
-
Method Details
-
reload
public void reload()Called to reload a buffer. -
dispose
public void dispose(com.jogamp.opengl.GL gl) Called when it's time to kill this buffer.- Parameters:
gl
- the OpenGl context.
-
disposeWithoutDelete
public int disposeWithoutDelete(com.jogamp.opengl.GL gl) Called when it's time to kill this buffer. The effective delete is done in JoGLBuffersManager::glSynchronize (to vectorize it).- Parameters:
gl
- the OpenGl context.
-
synchronize
protected void synchronize(com.jogamp.opengl.GL gl) Synchronize this buffer.- Parameters:
gl
- the OpenGl context where synchronization is done.
-
isDataUploaded
protected boolean isDataUploaded()Return the data uploaded status.- Returns:
- the data uploaded status.
-
setDataUploaded
protected void setDataUploaded(boolean dataUploaded) Set the data uploaded status.- Parameters:
dataUploaded
- the new data uploaded status.
-
getGlName
Return the OpenGl name of this buffer.- Parameters:
gl
- the OpenGl context.- Returns:
- the OpenGl name of this buffer.
-
getByteBuffer
Return the data as byte buffer.- Returns:
- the data as byte buffer.
-
getGLBindDestination
protected abstract int getGLBindDestination()Return the OpenGl bind destination.- Returns:
- the OpenGl bind destination.
-
getByteSize
public abstract int getByteSize()Return the size of this buffer in byte.- Returns:
- the size of this buffer in byte.
-
clear
public abstract void clear()- Specified by:
clear
in interfaceDataBuffer
-