Class GLBuffer

All Implemented Interfaces:
RefCounted

public final class GLBuffer extends Buffer
  • Method Details

    • make

      @Nullable @SharedPtr public static @SharedPtr GLBuffer make(Context context, long size, int usage)
    • getBufferStorageFlags

      public static int getBufferStorageFlags(int usage)
    • getMutableBufferUsage

      public static int getMutableBufferUsage(int usage)
    • getHandle

      public int getHandle()
    • getClientUploadBuffer

      public long getClientUploadBuffer()
    • getTarget

      public int getTarget()
      Returns a default target for this buffer.
    • getBindingTarget

      public int getBindingTarget()
    • onSetLabel

      protected void onSetLabel(@Nullable String label)
      Description copied from class: Resource
      Subclass should override this method to set object label in the backend API.
      Overrides:
      onSetLabel in class Resource
    • onRelease

      protected void onRelease()
      Description copied from class: Resource
      Subclass should override this method to free GPU resources in the backend API.
      Specified by:
      onRelease in class Resource
    • getDevice

      protected GLDevice getDevice()
      Overrides:
      getDevice in class Resource
      Returns:
      the device or null if destroyed
    • onMap

      protected long onMap(int mode, long offset, long size)
      Specified by:
      onMap in class Buffer
    • onUnmap

      protected void onUnmap(int mode, long offset, long size)
      Specified by:
      onUnmap in class Buffer
    • doUploadData

      public static void doUploadData(GLDevice device, int buffer, int target, long data, long offset, long totalSize)