Class Buffer

java.lang.Object
dev.pfaff.altargui.render.Buffer
All Implemented Interfaces:
Closeable, AutoCloseable

public final class Buffer extends Object implements Closeable
  • Field Details

  • Constructor Details

  • Method Details

    • reset

      public void reset(int capacity, int vao)
      Parameters:
      capacity - the required capacity in instances.
      vao - the shader of the VAO to bind if the buffer is recreated, or -1 if binding is not necessary.
    • beginUploading

      public void beginUploading()
      Begins uploading to the buffer. Attempts to upload more than capacity might result in a BufferOverflowException being thrown.

      The buffer's contents are undefined after this operation.

    • finishUploading

      public void finishUploading()
    • uploadAt

      public void uploadAt(long offset, Uploadable uploadable)
    • upload

      public void upload(Uploadable uploadable)
    • instanceCount

      public int instanceCount()
    • instanceCapacity

      public int instanceCapacity()
    • toString

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

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