D3DX10CreateMesh function
Creates a mesh object using a declarator.
Syntax
HRESULT D3DX10CreateMesh(
_In_ ID3D10Device *pDevice,
_In_ const D3D10_INPUT_ELEMENT_DESC *pDeclaration,
_In_ UINT DeclCount,
_In_ LPCSTR pPositionSemantic,
_In_ UINT VertexCount,
_In_ UINT FaceCount,
_In_ UINT Options,
_Out_ ID3DX10Mesh **ppMesh
);
Parameters
-
pDevice [in]
-
Type: ID3D10Device*
Pointer to an ID3D10Device Interface, the device object to be associated with the mesh.
-
pDeclaration [in]
-
Type: const D3D10_INPUT_ELEMENT_DESC*
Array of D3D10_INPUT_ELEMENT_DESC elements, describing the vertex format for the returned mesh. This parameter must map directly to a flexible vertex format (FVF).
-
DeclCount [in]
-
Type: UINT
The number of elements in pDeclaration.
-
pPositionSemantic [in]
-
Type: LPCSTR
Semantic that identifies which part of the vertex declaration contains position information.
-
VertexCount [in]
-
Type: UINT
Number of vertices for the mesh. This parameter must be greater than 0.
-
FaceCount [in]
-
Type: UINT
Number of faces for the mesh. The valid range for this number is greater than 0, and one less than the maximum DWORD (typically 65534), because the last index is reserved.
-
Options [in]
-
Type: UINT
Combination of one or more flags from the D3DX10_MESH, specifying options for the mesh.
-
ppMesh [out]
-
Type: ID3DX10Mesh**
Address of a pointer to an ID3DX10Mesh Interface, representing the created mesh object.
Return value
Type: HRESULT
If the function succeeds, the return value is D3D_OK. If the function fails, the return value can be one of the following: D3DERR_INVALIDCALL, E_OUTOFMEMORY.
Requirements
Requirement | Value |
---|---|
Header |
|
Library |
|
See also