Diligent Engine API Reference
Classes | Public Member Functions | Public Attributes | List of all members
Diligent::BufferDesc Struct Reference

Buffer description. More...

Inheritance diagram for Diligent::BufferDesc:
Diligent::DeviceObjectAttribs

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.
 

Detailed Description

Buffer description.

Constructor & Destructor Documentation

Diligent::BufferDesc::BufferDesc ( )
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()

Member Data Documentation

Uint32 Diligent::BufferDesc::BindFlags
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.