Diligent Engine API Reference
|
Buffer description. More...
Classes | |
struct | BufferFormat |
Buffer format description. More... | |
Public Member Functions | |
BufferDesc () | |
Initializes the structure members with default values. More... | |
Public Member Functions inherited from Diligent::DeviceObjectAttribs | |
DeviceObjectAttribs () | |
Constructor intializes the structure members with default values. | |
Public Attributes | |
Uint32 | uiSizeInBytes |
Size of the buffer, in bytes. For a uniform buffer, this must be multiple of 16. | |
Uint32 | BindFlags |
Buffer bind flags, see Diligent::BIND_FLAGS for details. More... | |
USAGE | Usage |
Buffer usage, see Diligent::USAGE for details. | |
Uint32 | CPUAccessFlags |
CPU access flags or 0 if no CPU access is allowed, see Diligent::CPU_ACCESS_FLAG for details. | |
BUFFER_MODE | Mode |
Buffer mode. | |
BufferFormat | Format |
Buffer format. More... | |
Uint32 | ElementByteStride |
Buffer element stride, in bytes. For a structured buffer (BufferDesc::Mode equals Diligent::BUFFER_MODE_STRUCTURED), this member cannot be zero. For a formatted buffer (BufferDesc::Mode equals Diligent::BUFFER_MODE_FORMATED), this member can either specify the stride, or be 0. In the latter case, the stride is computed automatically based on the format size and assuming that elements are densely packed. | |
Public Attributes inherited from Diligent::DeviceObjectAttribs | |
const Char * | Name |
Object name. | |
Buffer description.
|
inline |
Initializes the structure members with default values.
Default values:
Member | Default value |
---|---|
uiSizeInBytes | 0 |
BindFlags | 0 |
Usage | Diligent::USAGE_DEFAULT |
CPUAccessFlags | 0 |
Mode | Diligent::BUFFER_MODE_UNDEFINED |
ElementByteStride | 0 |
Members of BufferDesc::Format are initialized with default values by BufferFormat::BufferFormat()
Uint32 Diligent::BufferDesc::BindFlags |
Buffer bind flags, see Diligent::BIND_FLAGS for details.
The following bind flags are allowed: Diligent::BIND_VERTEX_BUFFER, Diligent::BIND_INDEX_BUFFER, Diligent::BIND_UNIFORM_BUFFER, Diligent::BIND_SHADER_RESOURCE, Diligent::BIND_STREAM_OUTPUT, Diligent::BIND_UNORDERED_ACCESS, Diligent::BIND_INDIRECT_DRAW_ARGS
BufferFormat Diligent::BufferDesc::Format |
Buffer format.
For a formatted buffer (BufferDesc::Mode equals Diligent::BUFFER_MODE_FORMATED), this member describes the buffer format, see BufferFormat. Ignored otherwise.