Table of Contents

Enum BufferUsage

Namespace
NeoVeldrid
Assembly
NeoVeldrid.dll

A bitmask describing the permitted uses of a DeviceBuffer object.

[Flags]
public enum BufferUsage : byte

Fields

Dynamic = 64

Indicates that a DeviceBuffer will be updated with new data very frequently. Dynamic Buffers can be mapped with Write. This flag cannot be combined with StructuredBufferReadWrite or IndirectBuffer.

IndexBuffer = 2

Indicates that a DeviceBuffer can be used as the source of index data for drawing commands. This flag enables the use of a Buffer in the SetIndexBuffer(DeviceBuffer, IndexFormat) method.

IndirectBuffer = 32

Indicates that a DeviceBuffer can be used as the source of indirect drawing information. This flag enables the use of a Buffer in the *Indirect methods of CommandList. This flag cannot be combined with Dynamic.

Staging = 128

Indicates that a DeviceBuffer will be used as a staging Buffer. Staging Buffers can be used to transfer data to-and-from the CPU using Map(MappableResource, MapMode). Staging Buffers can use all MapMode values. This flag cannot be combined with any other flag.

StructuredBufferReadOnly = 8

Indicates that a DeviceBuffer can be used as a read-only structured Buffer. This flag enables the use of a Buffer in a ResourceSet as a read-only structured Buffer. This flag can only be combined with Dynamic.

StructuredBufferReadWrite = 16

Indicates that a DeviceBuffer can be used as a read-write structured Buffer. This flag enables the use of a Buffer in a ResourceSet as a read-write structured Buffer. This flag cannot be combined with any other flag.

UniformBuffer = 4

Indicates that a DeviceBuffer can be used as a uniform Buffer. This flag enables the use of a Buffer in a ResourceSet as a uniform Buffer.

VertexBuffer = 1

Indicates that a DeviceBuffer can be used as the source of vertex data for drawing commands. This flag enables the use of a Buffer in the SetVertexBuffer(uint, DeviceBuffer) method.