GraphicsDevice.DrawUserIndexedPrimitives Generic Method (PrimitiveType, T[], Int32, Int32, Int32 , Int32, Int32)
Renders geometric primitives with indexed data specified by the user, specifying an index buffer as an array of type Int32.
Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)
Syntax
public void DrawUserIndexedPrimitives<T> (
PrimitiveType primitiveType,
T[] vertexData,
int vertexOffset,
int numVertices,
int[] indexData,
int indexOffset,
int primitiveCount
) where T : ValueType
Type Parameters
- T
The type of vertex in vertexData.
Parameters
- primitiveType
Describes the type of primitive to render. - vertexData
The vertex buffer indexed by indexData. - vertexOffset
Offset to add to each vertex index in the index buffer. - numVertices
Number of vertices used during this call. The first vertex is located at index minVertexIndex. - indexData
A list of indices into the vertex buffer, given in the order that you want the vertices to render. Using an array of type Int32, which uses 32 bits per element, allows you to index a greater number of elements in the vertex buffer. - indexOffset
Location in the index array at which to start reading vertices. - primitiveCount
Number of primitives to render. The maximum number of primitives allowed is determined by checking MaxPrimitiveCount. (The number of indices is a function of the primitive count and the primitive type.)
Exceptions
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:
|
See Also
Reference
GraphicsDevice Class
GraphicsDevice Members
Microsoft.Xna.Framework.Graphics Namespace
Platforms
Xbox 360, Windows XP SP2, Windows Vista