Package icyllis.arc3d.engine

# Interface Engine.BufferUsageFlags

Enclosing interface:
  `Engine`

public static interface Engine.BufferUsageFlags
Describes the intended usage (type + access) a GPU buffer. This will affect memory allocation and pipeline commands.

Note that the special type flag `kUpload` and `kReadback` cannot be combined with other type flags, and must be `kHostVisible`.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `kAccessMask`
  `static final int`
  `kDeviceLocal`
  Data store will be written to once by CPU.
  `static final int`
  `kDrawIndirect`
  Indirect buffer, also known as argument buffer.
  `static final int`
  `kHostVisible`
  Data store will be written to occasionally, CPU writes, GPU reads.
  `static final int`
  `kIndex`
  Index buffer, also known as element buffer.
  `static final int`
  `kReadback`
  Read-back buffers for device to CPU transfer.
  `static final int`
  `kStorage`
  Shader storage buffer, may be combined with other type flags.
  `static final int`
  `kTypeMask`
  `static final int`
  `kUniform`
  Uniform buffer, also known as constant buffer.
  `static final int`
  `kUpload`
  Staging buffers for CPU to device transfer.
  `static final int`
  `kVertex`
  Vertex buffer (also includes instance buffer).

- ## Field Details

  - ### kVertex

    static final int kVertex
    Vertex buffer (also includes instance buffer).
    See Also:
      - Constant Field Values

  - ### kIndex

    static final int kIndex
    Index buffer, also known as element buffer.
    See Also:
      - Constant Field Values

  - ### kDrawIndirect

    static final int kDrawIndirect
    Indirect buffer, also known as argument buffer. Not always available, check caps first.
    See Also:
      - Constant Field Values

  - ### kUpload

    static final int kUpload
    Staging buffers for CPU to device transfer.
    See Also:
      - Constant Field Values

  - ### kReadback

    static final int kReadback
    Read-back buffers for device to CPU transfer.
    See Also:
      - Constant Field Values

  - ### kUniform

    static final int kUniform
    Uniform buffer, also known as constant buffer. It's better not to combine this with other type flags.
    See Also:
      - Constant Field Values

  - ### kStorage

    static final int kStorage
    Shader storage buffer, may be combined with other type flags.
    See Also:
      - Constant Field Values

  - ### kDeviceLocal

    static final int kDeviceLocal
    Data store will be written to once by CPU. Use device-local only memory. A staging buffer is required to update it contents. For static or dynamic VBO, static UBO.
    See Also:
      - Constant Field Values

  - ### kHostVisible

    static final int kHostVisible
    Data store will be written to occasionally, CPU writes, GPU reads. Use host-visible host-coherent memory and persistent mapping, and possibly device-local. If write-combined memory is used, then write directly and requires sync. For streaming VBO, dynamic or streaming UBO.
    See Also:
      - Constant Field Values

  - ### kTypeMask

    static final int kTypeMask
    See Also:
      - Constant Field Values

  - ### kAccessMask

    static final int kAccessMask
    See Also:
      - Constant Field Values