Platform SDK: DirectX |
The Direct3DDevice7.DrawPrimitive method renders the specified array of vertices as a sequence of geometric primitives of the specified type.
object.DrawPrimitive( _ d3Dpt As CONST_D3DPRIMITIVETYPE, _ d3dfvf As CONST_D3DFVFFLAGS, _ vertices As Any, _ vertexCount As Long, _ flags As CONST_D3DDPFLAGS)
Note that the D3DPT_POINTLIST member of CONST_D3DPRIMITIVETYPE is not indexed.
If the method fails, an error is raised and Err.Number may be set to one of the following values:
D3DERR_INVALIDRAMPTEXTURE |
D3DERR_INVALIDPRIMITIVETYPE |
D3DERR_INVALIDVERTEXTYPE |
DDERR_WASSTILLDRAWING |
DDERR_INVALIDPARAMS |
For information on trapping errors, see the Visual Basic Error Trapping topic.
This method should not be used when rendering from a vertex buffer, use a vertex buffer method instead.
Make sure that the vertices being rendered match the vertex format you specify. For performance reasons, Direct3D does not attempt to verify that vertex size and stride match the provided flexible vertex format. If a mismatch occurs, a memory fault is likely to result.
Direct3DDevice7.DrawPrimitiveVB, Direct3DDevice7.DrawIndexedPrimitive, Direct3DDevice7.DrawIndexedPrimitiveVB