Device.DrawUserPrimitives(PrimitiveType,Int32,Object) Method (Microsoft.DirectX.Direct3D)
Renders data specified by a user memory pointer as a sequence of geometric primitives of the specified type.
Visual Basic Public Sub DrawUserPrimitives( _
ByVal primitiveType As PrimitiveType, _
ByVal primitiveCount As Integer, _
ByVal vertexStreamZeroData As Object _
C# public void DrawUserPrimitives(
JScript public function DrawUserPrimitives(
primitiveType : PrimitiveType,
primitiveCount : int,
vertexStreamZeroData : Object
Member of the PrimitiveType enumerated type that describes the type of primitive to render.
Number of primitives to render. To determine the maximum number of primitives allowed, check the Caps.MaxPrimitiveCount member.
User memory 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, and uses the provided vertex data pointer and stride for vertex stream 0. It is invalid for the declaration of the current vertex shader to refer to vertex streams other than stream 0.
Following any Device.DrawUserPrimitives call, the stream 0 settings referenced by Device.GetStreamSource are set to null.
The vertex data passed to Device.DrawUserPrimitives 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 method's parameter might contain an invalid value.