org.scilab.forge.scirenderer.implementation.jogl.buffers
Class JoGLDataBuffer

java.lang.Object
  extended by org.scilab.forge.scirenderer.implementation.jogl.buffers.JoGLDataBuffer
All Implemented Interfaces:
DataBuffer
Direct Known Subclasses:
JoGLElementsBuffer, JoGLIndicesBuffer

public abstract class JoGLDataBuffer
extends java.lang.Object
implements DataBuffer

Author:
Pierre Lando

Method Summary
abstract  void clear()
           
 void dispose(GL gl)
          Called when it's time to kill this buffer.
 int disposeWithoutDelete(GL gl)
          Called when it's time to kill this buffer.
protected abstract  java.nio.Buffer getByteBuffer()
          Return the data as byte buffer.
abstract  int getByteSize()
          Return the size of this buffer in byte.
protected abstract  int getGLBindDestination()
          Return the OpenGl bind destination.
protected  java.lang.Integer getGlName(GL gl)
          Return the OpenGl name of this buffer.
protected  boolean isDataUploaded()
          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(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 Detail

reload

public void reload()
Called to reload a buffer.


dispose

public void dispose(GL gl)
Called when it's time to kill this buffer.

Parameters:
gl - the OpenGl context.

disposeWithoutDelete

public int disposeWithoutDelete(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(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

protected java.lang.Integer getGlName(GL gl)
Return the OpenGl name of this buffer.

Parameters:
gl - the OpenGl context.
Returns:
the OpenGl name of this buffer.

getByteBuffer

protected abstract java.nio.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 interface DataBuffer