struct
GpuBufferCreateInformation
Descriptor structure used for initialization of a GpuBuffer.
Public
Constructors
GpuBufferCreateInformation
GpuBufferCreateInformation
Methods
staticCreateVertex
Builds a structure that can be used for creating a GpuBuffer containing vertex information.
- elementSize
- Size of a single vertex in the buffer.
- elementCount
- Number of vertices in the buffer.
- flags
- Flags that control how is buffer accessed/used.
Returns: Structure that can be used for creating the buffer.
staticCreateIndex
Builds a structure that can be used for creating a GpuBuffer containing triangle indices.
- indexType
- Type of index contained in the buffer.
- indexCount
- Number of indices in the buffer.
- flags
- Flags that control how is buffer accessed/used.
Returns: Structure that can be used for creating the buffer.
staticCreateUniform
Builds a structure that can be used for creating a GpuBuffer containing uniform parameters.
- size
- Size of the uniform buffer.
- flags
- Flags that control how is buffer accessed/used.
- suballocationCount
- Number of buffers of requested size to create. In case you need multiple buffers of the same size this is more efficient than creating a separate GpuBuffer for each. Sub-allocated buffers can be bound for rendering by using the dynamic offset functionality provided on GpuCommandBuffer.
Returns: Structure that can be used for creating the buffer.
staticCreateSimpleStorage
Builds a structure that can be used for creating a GpuBuffer that may be bound for arbitrary reads or writes, containing simple (primitive) elements.
- format
- Format of elements in the buffer.
- elementCount
- Number of elements in the buffer.
- flags
- Flags that control how is buffer accessed/used.
Returns: Structure that can be used for creating the buffer.
staticCreateStructuredStorage
Builds a structure that can be used for creating a GpuBuffer that may be bound for arbitrary reads or writes, containing arbitrary data.
- elementSize
- Size of a single element in the buffer.
- elementCount
- Number of elements in the buffer.
- flags
- Flags that control how is buffer accessed/used.
Returns: Structure that can be used for creating the buffer.
staticCreateStagingWrite
Builds a structure that can be used for creating a GpuBuffer that can be written to by the CPU and used as a source in copy operations.
- size
- Size of the buffer.
Returns: Structure that can be used for creating the buffer.
staticCreateStagingRead
Builds a structure that can be used for creating a GpuBuffer that can be read by the CPU and used as a destination in copy operations.
- size
- Size of the buffer.
Returns: Structure that can be used for creating the buffer.
Fields
Type
Controls at which parts of the GPU pipeline is the buffer intended to be primarily used in.
SuballocationCount
Number of sub-allocated buffers to create.
Internally this will allocate memory for this many buffers, which can be bound by providing a dynamic offset when binding the buffer on GpuCommandBuffer. Binding buffers this way is more efficient than creating separate GpuBuffer for each entry.