Device.DrawIndexedPrimitives(PrimitiveType,Int32,Int32,Int32,Int32,Int32) Method (Microsoft.DirectX.Direct3D)

Renders the specified geometric primitive, based on indexing into an array of vertices.

Definition

Visual BasicPublic Sub DrawIndexedPrimitives( _
    ByVal primitiveType As PrimitiveType, _
    ByVal baseVertex As Integer, _
    ByVal minVertexIndex As Integer, _
    ByVal numVertices As Integer, _
    ByVal startIndex As Integer, _
    ByVal primCount As Integer _
)
C#public void DrawIndexedPrimitives(
    PrimitiveType primitiveType,
    int baseVertex,
    int minVertexIndex,
    int numVertices,
    int startIndex,
    int primCount
);
C++public:
void DrawIndexedPrimitives(
    PrimitiveType primitiveType,
    int baseVertex,
    int minVertexIndex,
    int numVertices,
    int startIndex,
    int primCount
);
JScriptpublic function DrawIndexedPrimitives(
    primitiveType : PrimitiveType,
    baseVertex : int,
    minVertexIndex : int,
    numVertices : int,
    startIndex : int,
    primCount : int
);

Parameters

primitiveType Microsoft.DirectX.Direct3D.PrimitiveType
Member of the PrimitiveType enumerated type that describes the type of primitive to render. The PointList constant is not supported with this method. See Remarks.
baseVertex System.Int32
Offset from the start of the index buffer to the first vertex index.
minVertexIndex System.Int32
Minimum vertex index for vertices used during the call.
numVertices System.Int32
Number of vertices used during the call, starting from param_Int32_baseVertex + param_Int32_minVertexIndex.
startIndex System.Int32
Location in the index array at which to start reading vertices.
primCount System.Int32
Number of primitives to render. The number of vertices used is a function of the param_Int32_primCount and param_PrimitiveType_primitiveType. To determine the maximum number of primitives allowed, check the MaxPrimitiveCount member of the Caps structure.

Remarks

This method draws indexed primitives from the current set of data input streams.

The param_Int32_minVertexIndex parameter and all of the indices in the index stream are relative to the param_Int32_baseVertex.

The param_Int32_minVertexIndex and param_Int32_numVertices parameters specify the range of vertex indices used for each Device.DrawIndexedPrimitives call. These vertex indices are used to optimize vertex processing of indexed primitives by processing a sequential range of vertices prior to indexing into them. Indices used during this call cannot reference any vertices outside of this range.

If no index array is set, Device.DrawIndexedPrimitives fails.

The PointList member of the PrimitiveType enumerated type is not supported and is not a valid type for this method.

Exceptions
InvalidCallException The method call is invalid. For example, a parameter might contain an invalid value.

See Also

Show: