共用方式為


VertexBuffer Constructor (Type, Int32, Device, Usage, VertexFormats, Pool)

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

Initializes a new instance of the VertexBuffer class.

Namespace:  Microsoft.WindowsMobile.DirectX.Direct3D
Assembly:  Microsoft.WindowsMobile.DirectX (in Microsoft.WindowsMobile.DirectX.dll)

Syntax

'Declaration
Public Sub New ( _
    typeVertexType As Type, _
    numVerts As Integer, _
    device As Device, _
    usage As Usage, _
    vertexFormat As VertexFormats, _
    pool As Pool _
)
'Usage
Dim typeVertexType As Type
Dim numVerts As Integer
Dim device As Device
Dim usage As Usage
Dim vertexFormat As VertexFormats
Dim pool As Pool

Dim instance As New VertexBuffer(typeVertexType, _
    numVerts, device, usage, vertexFormat, _
    pool)
public VertexBuffer(
    Type typeVertexType,
    int numVerts,
    Device device,
    Usage usage,
    VertexFormats vertexFormat,
    Pool pool
)
public:
VertexBuffer(
    Type^ typeVertexType, 
    int numVerts, 
    Device^ device, 
    Usage usage, 
    VertexFormats vertexFormat, 
    Pool pool
)
new : 
        typeVertexType:Type * 
        numVerts:int * 
        device:Device * 
        usage:Usage * 
        vertexFormat:VertexFormats * 
        pool:Pool -> VertexBuffer

Parameters

  • typeVertexType
    Type: System.Type
    A Type that indicates the type of vertex data the buffer holds. This can be a value type or any type that contains only value types.
  • numVerts
    Type: System.Int32
    Maximum number of vertices the buffer can hold.
  • usage
    Type: Microsoft.WindowsMobile.DirectX.Direct3D.Usage
    Usage can be 0, which indicates no usage value. However, if usage is desired, use a combination of one or more Usage flags. It is good practice to match the usage parameter in the constructor with the behavior flags in the constructor. See Remarks.

Exceptions

Exception Condition
InvalidCallException

The method call is invalid. For example, a method's parameter may contain an invalid value.

OutOfMemoryException

Direct3D could not allocate sufficient memory to complete the call.

Remarks

A Device supports rendering of primitives using vertex data stored in vertex buffer objects. Vertex buffers are created from a Device, and can only be used with the Device from which they were created.

.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

VertexBuffer Class

VertexBuffer Members

VertexBuffer Overload

Microsoft.WindowsMobile.DirectX.Direct3D Namespace