Share via


VertexBuffer Constructor (Device, Int32, 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 ( _
    device As Device, _
    sizeOfBufferInBytes As Integer, _
    usage As Usage, _
    vertexFormat As VertexFormats, _
    pool As Pool _
)
'Usage
Dim device As Device
Dim sizeOfBufferInBytes As Integer
Dim usage As Usage
Dim vertexFormat As VertexFormats
Dim pool As Pool

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

Parameters

  • sizeOfBufferInBytes
    Type: System.Int32
    Size of the vertex buffer in bytes. If vertexFormat is set to 0, sizeOfBufferInBytes must be large enough to contain at least one vertex, but it need not be a multiple of the vertex size. If vertexFormat is not set to 0, sizeOfBufferInBytes is not validated. See Remarks.
  • 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