ID3D10Device::CreateBuffer method
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
- pDesc [in]
-
Type: const D3D10_BUFFER_DESC*
Pointer to a buffer description (see D3D10_BUFFER_DESC).
- pInitialData [in]
-
Type: const D3D10_SUBRESOURCE_DATA*
Pointer to the initialization data (see D3D10_SUBRESOURCE_DATA); use NULL to allocate space only.
- ppBuffer [out]
-
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
|
Header |
|
|---|---|
|
Library |
|
See also