Collapse the table of content
Expand the table of content

Device.DrawIndexedUserPrimitives(PrimitiveType,Int32,Int32,Int32,Object,Boolean,Object) Method (Microsoft.DirectX.Direct3D)

Renders the specified geometric primitive with data specified by a user memory pointer.


Visual BasicPublic Sub DrawIndexedUserPrimitives( _
    ByVal primitiveType As PrimitiveType, _
    ByVal minVertexIndex As Integer, _
    ByVal numVertexIndices As Integer, _
    ByVal primitiveCount As Integer, _
    ByVal indexData As Object, _
    ByVal sixteenBitIndices As Boolean, _
    ByVal vertexStreamZeroData As Object _
C#public void DrawIndexedUserPrimitives(
    PrimitiveType primitiveType,
    int minVertexIndex,
    int numVertexIndices,
    int primitiveCount,
    object indexData,
    bool sixteenBitIndices,
    object vertexStreamZeroData
void DrawIndexedUserPrimitives(
    PrimitiveType primitiveType,
    int minVertexIndex,
    int numVertexIndices,
    int primitiveCount,
    ObjectLeave SiteindexData,
    bool sixteenBitIndices,
    ObjectLeave SitevertexStreamZeroData
JScriptpublic function DrawIndexedUserPrimitives(
    primitiveType : PrimitiveType,
    minVertexIndex : int,
    numVertexIndices : int,
    primitiveCount : int,
    indexData : ObjectLeave Site,
    sixteenBitIndices : boolean,
    vertexStreamZeroData : ObjectLeave Site


primitiveType Microsoft.DirectX.Direct3D.PrimitiveType
Member of the PrimitiveType enumerated type that describes the type of primitive to render.
minVertexIndex System.Int32
Minimum vertex index, relative to 0 (the start of param_Object_vertexStreamZeroData), for vertices used during the call.
numVertexIndices System.Int32
Number of vertices used during the call, starting from param_Int32_minVertexIndex.
primitiveCount System.Int32
Number of primitives to render. The number of indices used is a function of the primitive count and primitive type. To determine the maximum number of primitives allowed, check the MaxPrimitiveCount member of the Caps structure.
indexData System.Object
User memory pointer to the index data.
sixteenBitIndices System.Boolean
Set to true to indicate 16-bit indices. Set to false if to indicate 32-bit indices.
vertexStreamZeroData System.Object
User memory pointer to the vertex data to use for vertex stream 0.


This method is intended for use in applications that are unable to store their vertex data in vertex buffers.

It supports only a single vertex stream, which must be declared as stream 0.

Following any Device.DrawIndexedUserPrimitives call, the stream 0 settings referenced by Device.GetStreamSource are set to null. The index buffer setting for Indices also is set to null.

The vertex data passed to DrawIndexedUserPrimitives does not need to persist after the call. Microsoft Direct3D completes its access to that data prior to returning from the call.

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

See Also

© 2016 Microsoft