Class BufferRegion

java.lang.Object
com.jme3.shader.bufferobject.BufferRegion
All Implemented Interfaces:
Savable, Cloneable

public class BufferRegion extends Object implements Savable, Cloneable
A slice of a buffer
  • Field Details

    • start

      protected int start
    • end

      protected int end
    • dirty

      protected boolean dirty
    • fullBufferRegion

      protected boolean fullBufferRegion
    • bo

      protected BufferObject bo
    • slice

      protected ByteBuffer slice
    • source

      protected ByteBuffer source
  • Constructor Details

    • BufferRegion

      public BufferRegion(int start, int end)
    • BufferRegion

      public BufferRegion()
  • Method Details

    • getData

      public ByteBuffer getData()
      Rewind and get a ByteBuffer pointing to this region of the main buffer
      Returns:
      ByteBuffer
    • getStart

      public int getStart()
      Get beginning of the region
      Returns:
      position in the buffer
    • getEnd

      public int getEnd()
      Get end of the region
      Returns:
      position in the buffer
    • length

      public int length()
      Get the length of this region
      Returns:
      the length of this region
    • isDirty

      public boolean isDirty()
      Returns true of the region is dirty
      Returns:
    • markDirty

      public void markDirty()
      Mark this region for update
    • clearDirty

      public void clearDirty()
      Clear this region mark
    • isFullBufferRegion

      public boolean isFullBufferRegion()
      Returns true if this region includes the entire buffer. Can be used for optimization.
      Returns:
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • write

      public void write(JmeExporter ex) throws IOException
      Specified by:
      write in interface Savable
      Throws:
      IOException
    • read

      public void read(JmeImporter im) throws IOException
      Specified by:
      read in interface Savable
      Throws:
      IOException
    • clone

      public BufferRegion clone()
      Overrides:
      clone in class Object