?/TD> |
Microsoft DirectX 9.0 |
Creates a mesh from a control-patch mesh.
Syntax
HRESULT D3DXCreatePatchMesh(
CONST LPD3DXPATCHINFO pInfo, CONST DWORD dwNumPatches, CONST DWORD dwNumVertices, CONST DWORD dwOptions, CONST LPD3DVERTEXELEMENT9 pDecl, CONST LPDIRECT3DDEVICE9 pDevice, LPD3DXPATCHMESH* pPatchMesh );
Parameters
- pInfo
- [in] Patch information structure. For more information, see D3DXPATCHINFO.
- dwNumPatches
- [in] Number of patches.
- dwNumVertices
- [in] Number of control vertices in the patch.
- dwOptions
- [in] Unused. Reserved for later use.
- pDecl
- [in] Array of D3DVERTEXELEMENT9 elements, describing the vertex format for the returned mesh.
- pDevice
- [in] Pointer the device that creates the patch mesh. See IDirect3DDevice9.
- pPatchMesh
- [out] Pointer to the ID3DXPatchMesh object that is created.
Return Value
If the function succeeds, the return value is D3D_OK.
If the function fails, the return value can be one of the following values.
D3DERR_INVALIDCALL The method call is invalid. For example, a method's parameter may have an invalid value. E_OUTOFMEMORY Microsoft?Direct3D?could not allocate sufficient memory to complete the call.
Remarks
This method takes an input patch mesh and converts it to a tessellated mesh. Patch meshes use 16-bit index buffers. Therefore, indices to ID3DXPatchMesh::LockIndexBuffer are 16 bits.
Function Information
Header d3dx9mesh.h Import library d3dx9.lib Minimum operating systems Windows 98
See Also
D3DXPATCHINFO