VertexBuffer Constructor (GraphicsDevice, VertexDeclaration, Int32, BufferUsage)
Creates an instance of this object.
Syntax
'Declaration
Public Sub New ( _
graphicsDevice As GraphicsDevice, _
vertexDeclaration As VertexDeclaration, _
vertexCount As Integer, _
usage As BufferUsage _
)
public VertexBuffer (
GraphicsDevice graphicsDevice,
VertexDeclaration vertexDeclaration,
int vertexCount,
BufferUsage usage
)
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.
Exceptions
Exception type | Condition |
---|---|
OutOfMemoryException | There is not enough memory to create this resource. |
Requirements
Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework.Graphics (in microsoft.xna.framework.graphics.dll)
See Also
Reference
VertexBuffer Class
VertexBuffer Members
Microsoft.Xna.Framework.Graphics Namespace
Platforms
Windows Phone