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.
Definition
| Visual Basic | Public Sub DrawUserPrimitives( _ ByVal primitiveType As PrimitiveType, _ ByVal primitiveCount As Integer, _ ByVal vertexStreamZeroData As Object _ ) |
| C# | public void DrawUserPrimitives( PrimitiveType primitiveType, int primitiveCount, object vertexStreamZeroData ); |
| C++ | public: void DrawUserPrimitives( PrimitiveType primitiveType, int primitiveCount, Object ^ vertexStreamZeroData ); |
| JScript | public function DrawUserPrimitives( primitiveType : PrimitiveType, primitiveCount : int, vertexStreamZeroData : Object.gif) ); |
Parameters
Remarks
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.
Exceptions | InvalidCallException | The method call is invalid. For example, a method's parameter might contain an invalid value. |