D3DX8.CreateMesh
Creates a mesh object using a declarator.
object.CreateMesh( _
NumFaces As Long, _
NumVertices As Long, _
Options As Long, _
Declaration As Any, _
Device As Direct3DDevice8) As D3DXMesh
Parts
- object
- Object expression that resolves to a D3DX8 object.
- NumFaces
- Number of faces for the mesh. This parameter must be greater than 0.
- NumVertices
- Number of vertices for the mesh. This parameter must be greater than 0.
- Options
- A combination of one or more flags defined by the CONST_D3DXMESH enumeration, specifying options for the mesh.
- Declaration
- A declarator that describes the vertex format for the returned mesh. This parameter must map directly to an FVF.
- Device
- Direct3DDevice8 object, the device to be associated with the mesh.
Return Values
D3DXMesh object representing the created mesh.
Error Codes
If the method fails, an error is raised and Err.Number can be set to one of the following values.
For information on trapping errors, see the Microsoft® Visual Basic® Error Handling topic.
See Also
D3DX8.DeclaratorFromFVF