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.
Syntax
'Declaration
Public Sub DrawUserIndexedPrimitives(Of T As ) ( _
primitiveType As PrimitiveType, _
vertexData As T(), _
vertexOffset As Integer, _
numVertices As Integer, _
indexData As Integer(), _
indexOffset As Integer, _
primitiveCount As Integer _
)
public void DrawUserIndexedPrimitives<T> (
PrimitiveType primitiveType,
T[] vertexData,
int vertexOffset,
int numVertices,
int[] indexData,
int indexOffset,
int primitiveCount
) where T :
public:
generic<typename T> where T :
void DrawUserIndexedPrimitives(
PrimitiveType primitiveType,
T vertexData[],
int vertexOffset,
int numVertices,
int indexData[],
int indexOffset,
int primitiveCount
)
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.
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:
|
NotSupportedException | The profile does not support an elementSize of IndexElementSize.ThirtyTwoBits; use IndexElementSize.SixteenBits or a type that has a size of two bytes. |
Requirements
Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework.Graphics (in microsoft.xna.framework.graphics.dll)
See Also
Reference
GraphicsDevice Class
GraphicsDevice Members
Microsoft.Xna.Framework.Graphics Namespace
Platforms
Windows Phone