Platform SDK: DirectX |
The Direct3DDevice7.DrawIndexedPrimitiveVB method renders a geometric primitive based on indexing into an array of vertices within a vertex buffer.
object.DrawIndexedPrimitiveVB( _ d3Dpt As CONST_D3DPRIMITIVETYPE, _ vertexBuffer As Direct3DVertexBuffer7, _ StartVertex As Long, _ NumVertices As Long, _ indexArray() As Integer, _ indexcount 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_INVALIDPRIMITIVETYPE |
D3DERR_INVALIDVERTEXTYPE |
D3DERR_VERTEXBUFFERLOCKED |
DDERR_INVALIDOBJECT |
DDERR_INVALIDPARAMS |
DDERR_WASSTILLDRAWING |
For information on trapping errors, see the Visual Basic Error Trapping topic.
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.
Applications must use vertex buffer methods when rendering from a vertex buffer.
With the exception of the reference rasterizer, software devices cannot render from a video memory (local or non-local) vertex buffer. To render a vertex buffer using a software device, the vertex buffer must exist in system memory. Hardware devices can render from system memory or video memory vertex buffers.
You cannot render from a locked vertex buffer; calls to the Direct3DDevice7.DrawIndexedPrimitiveVB or Direct3DDevice7.DrawPrimitiveVB method using a locked buffer will fail, returning D3DERR_VERTEXBUFFERLOCKED.
Direct3DDevice7.DrawPrimitive, Direct3DDevice7.DrawPrimitiveVB, Direct3DDevice7.DrawIndexedPrimitive