GraphicsDevice.DrawUserPrimitives<T> Method (Microsoft.Xna.Framework.Graphics)

Draw primitives of the specified type from the data in the given array of vertices without indexing.

Namespace: Microsoft.Xna.Framework.Graphics
Assembly: MonoGame.Framework (MonoGame.Framework.dll 3.8.0.964)
  • C#
  • VB
  • F#
public void DrawUserPrimitives<T>(
	PrimitiveType primitiveType, 
	T[] vertexData, 
	int vertexOffset, 
	int primitiveCount, 
	VertexDeclaration vertexDeclaration
) where T : ValueType, new()

Syntax for VB is not yet implemented.

Syntax for F# is not yet implemented.

Parameters

primitiveType
Type: Microsoft.Xna.Framework.Graphics.PrimitiveType
The type of primitives to draw with the vertices.
vertexData
Type: T[]
An array of vertices to draw.
vertexOffset
Type: System.Int32
The index in the array of the first vertex that should be rendered.
primitiveCount
Type: System.Int32
The number of primitives to draw.
vertexDeclaration
Type: Microsoft.Xna.Framework.Graphics.VertexDeclaration
The layout of the vertices.
Supported in:

    
 Windows DirectX Desktop
    
 Linux Desktop
    
 Windows OpenGL Desktop
    
 Web