Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

VertexBuffer Constructor (GraphicsDevice, VertexDeclaration, Int32, BufferUsage)

Creates an instance of this object.

Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework.Graphics (in microsoft.xna.framework.graphics.dll)

public VertexBuffer (
         GraphicsDevice graphicsDevice,
         VertexDeclaration vertexDeclaration,
         int vertexCount,
         BufferUsage usage
)

Parameters

graphicsDevice
Type: GraphicsDevice
The graphics device.
vertexDeclaration
Type: VertexDeclaration
The vertex declaration, which describes per-vertex data.
vertexCount
Type: Int32
The number of vertices.
usage
Type: BufferUsage
Behavior options; it is good practice for this to match the createOptions parameter in the GraphicsDevice constructor.
Exception typeCondition
OutOfMemoryExceptionThere is not enough memory to create this resource.
Xbox 360, Windows 7, Windows Vista, Windows XP
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.