Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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

D3D10.h

Library

D3D10.lib

See also

ID3D10Device Interface

 

 

Show:
© 2017 Microsoft