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

public abstract class JoGLDataBuffer extends Object implements DataBuffer
Author:
Pierre Lando
  • 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

      protected Integer getGlName(com.jogamp.opengl.GL gl)
      Return the OpenGl name of this buffer.
      Parameters:
      gl - the OpenGl context.
      Returns:
      the OpenGl name of this buffer.
    • getByteBuffer

      protected abstract 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