Class MappedBuffer

java.lang.Object
com.jozufozu.flywheel.backend.gl.buffer.VecBuffer
com.jozufozu.flywheel.backend.gl.buffer.MappedBuffer
All Implemented Interfaces:
AutoCloseable

public class MappedBuffer extends VecBuffer implements AutoCloseable
  • Field Details

    • offset

      protected final long offset
    • length

      protected final long length
    • owner

      protected final Mappable owner
  • Constructor Details

    • MappedBuffer

      public MappedBuffer(Mappable owner, ByteBuffer internal, long offset, long length)
  • Method Details

    • flush

      public void flush()
      Make the changes in client memory available to the GPU.
    • position

      public MappedBuffer position(int p)
      Description copied from class: VecBuffer
      Position this buffer relative to the 0-index in GPU memory.
      Overrides:
      position in class VecBuffer
      Returns:
      This buffer.
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable