Partager via


Device.DrawPrimitives Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

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
)
member DrawPrimitives : 
        primitiveType:PrimitiveType * 
        startVertex:int * 
        primitiveCount:int -> unit 

Parameters

  • startVertex
    Type: System.Int32
    An 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.Int32
    A 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

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

See Also

Reference

Device Class

Device Members

Microsoft.WindowsMobile.DirectX.Direct3D Namespace