System.Int32
Index of the first vertex to load. Beginning at param_Int32_startVertex, the correct number of vertices is read out of the vertex buffer.

primitiveCount

System.Int32
Number of primitives to render. To determine the maximum number of primitives allowed, check Caps.MaxPrimitiveCount. The param_Int32_primitiveCount is the number of primitives as determined by the primitive type. If it is a line list, each primitive has two vertices. If it is a triangle list, each primitive has three vertices.

Remarks

Device.DrawPrimitives should not be called with a single triangle at a time.

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

How Do I...?

Generate a Scene

This example shows how to begin scene generation and draw primitives.

The SetStreamSource method binds a vertex buffer to a device data stream to create an association between the vertex data and one of several data stream ports that feed the primitive processing functions. The parameters for this method are the number of the data stream, the name of the VertexBuffer object, and the stream vertex stride.

In the following C# code example, it is assumed that the device is the rendering Device, and vBuffer is a vertex buffer filled with CustomVertex.PositionNormal data.