Device.DrawPrimitives Method
Renders a sequence of non-indexed geometric primitives of the specified type from the current set of data input streams.
Namespace: Microsoft.WindowsMobile.DirectX.Direct3D
Assembly: Microsoft.WindowsMobile.DirectX (in Microsoft.WindowsMobile.DirectX.dll)
Syntax
'Declaration
Public Sub DrawPrimitives ( _
primitiveType As PrimitiveType, _
startVertex As Integer, _
primitiveCount As Integer _
)
'Usage
Dim instance As Device
Dim primitiveType As PrimitiveType
Dim startVertex As Integer
Dim primitiveCount As Integer
instance.DrawPrimitives(primitiveType, _
startVertex, primitiveCount)
public void DrawPrimitives(
PrimitiveType primitiveType,
int startVertex,
int primitiveCount
)
public:
void DrawPrimitives(
PrimitiveType primitiveType,
int startVertex,
int primitiveCount
)
public function DrawPrimitives(
primitiveType : PrimitiveType,
startVertex : int,
primitiveCount : int
)
Parameters
primitiveType
Type: Microsoft.WindowsMobile.DirectX.Direct3D.PrimitiveTypeA member of the PrimitiveType enumerated type that describes the type of primitive to render.
startVertex
Type: System.Int32An index of the first vertex to load. Beginning at startVertex, the correct number of vertices is read out of the vertex buffer.
primitiveCount
Type: System.Int32A number of primitives to render. To determine the maximum number of primitives allowed, check MaxPrimitiveCount. The 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.
Exceptions
Exception | Condition |
---|---|
InvalidCallException | The method call is invalid. For example, a method's parameter might contain an invalid value. |
Remarks
This method should not be called with a single triangle at a time.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
Platforms
Windows CE, Windows Mobile for Smartphone, Windows Mobile for Pocket PC
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information
.NET Compact Framework
Supported in: 3.5, 2.0