Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
VertexBuffer Class
Collapse the table of content
Expand the table of content

VertexBuffer Class

Represents a list of 3D vertices to be streamed to the graphics device.

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

public class VertexBuffer : GraphicsResource

The vertex stream of the graphics device must be set before any call to DrawPrimitives. The following example associates a user created vertex buffer of type VertexPositionNormalTexture with vertex stream 0 (zero) of the graphics device.

graphics.GraphicsDevice.Vertices[0].SetSource(
    vertexBuffer, 0,
    VertexPositionNormalTexture.SizeInBytes);

Xbox 360, Windows XP SP2, Windows Vista

Community Additions

ADD
Show:
© 2015 Microsoft