GraphicsDevice.DrawUserIndexedPrimitives Generic Method (PrimitiveType, T[], Int32, Int32, Int32[], Int32, Int32)
Renders indexed primitives from a 32-bit index buffer and other related input parameters.
Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework.Graphics (in microsoft.xna.framework.graphics.dll)
public void DrawUserIndexedPrimitives<T> ( PrimitiveType primitiveType, T[] vertexData, int vertexOffset, int numVertices, int[] indexData, int indexOffset, int primitiveCount ) where T :
Type Parameters
- T
- Per-vertex data type.
Parameters
- primitiveType
- Type: PrimitiveType
The primitive type. - vertexData
- Type: T
The vertex data. - vertexOffset
- Type: Int32
Offset (in vertices) from the beginning of the vertex buffer to the first vertex to draw. - numVertices
- Type: Int32
Number of vertices to draw. - indexData
- Type: Int32
The index data. - indexOffset
- Type: Int32
Offset (in indices) from the beginning of the index buffer to the first index to use. - primitiveCount
- Type: Int32
Number of primitives to render.
| Exception type | Condition |
|---|---|
| ArgumentException |
One of the following conditions is true:
|
| ArgumentNullException | vertexData or indexData is null. |
| ArgumentOutOfRangeException |
One of the following conditions is true:
|
| InvalidOperationException |
One of the following conditions is true:
|
| NotSupportedException | The profile does not support an elementSize of IndexElementSize.ThirtyTwoBits; use IndexElementSize.SixteenBits or a type that has a size of two bytes. |