ID3D10Device::CreateBuffer method (d3d10.h)
Create a buffer (vertex buffer, index buffer, or shader-constant buffer).
Syntax
HRESULT CreateBuffer(
[in] const D3D10_BUFFER_DESC *pDesc,
[in] const D3D10_SUBRESOURCE_DATA *pInitialData,
[out] ID3D10Buffer **ppBuffer
);
Parameters
[in] pDesc
Type: const D3D10_BUFFER_DESC*
Pointer to a buffer description (see D3D10_BUFFER_DESC).
[in] pInitialData
Type: const D3D10_SUBRESOURCE_DATA*
Pointer to the initialization data (see D3D10_SUBRESOURCE_DATA); use NULL to allocate space only.
[out] ppBuffer
Type: ID3D10Buffer**
Address of a pointer to the buffer created (see ID3D10Buffer Interface). Set this parameter to NULL to validate the other input parameters (S_FALSE indicates a pass).
Return value
Type: HRESULT
This method returns one of the following Direct3D 10 Return Codes.
Remarks
For example code, see:
Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | d3d10.h |
Library | D3D10.lib |