VertexBuffer Class

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

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

public class VertexBuffer : GraphicsResource

The VertexBuffer type exposes the following members.

  NameDescription
Public methodVertexBuffer(GraphicsDevice, VertexDeclaration, Int32, BufferUsage)Initializes a new instance of the VertexBuffer class.
Public methodVertexBuffer(GraphicsDevice, Type, Int32, BufferUsage)Initializes a new instance of the VertexBuffer class.
Top

  NameDescription
Public propertyBufferUsageGets the state of the related BufferUsage enumeration.
Public propertyIsDisposedGets a value that indicates whether the object is disposed. (Inherited from GraphicsResource.)
Public propertyVertexCountGets the number of vertices.
Public propertyVertexDeclarationDefines per-vertex data in a buffer.
Top

  NameDescription
Public methodDispose()Immediately releases the unmanaged resources used by this object. (Inherited from GraphicsResource.)
Protected methodDispose(Boolean)Immediately releases the unmanaged resources used by this object. (Inherited from GraphicsResource.)
Protected methodFinalizeAllows this object to attempt to free resources and perform other cleanup operations before garbage collection reclaims the object. (Inherited from GraphicsResource.)
Public methodSetData<T>(T[])Sets vertex buffer data.
Public methodSetData<T>(T[], Int32, Int32)Sets vertex buffer data, specifying the start index and number of elements.
Public methodSetData<T>(Int32, T[], Int32, Int32, Int32)Sets vertex buffer data, specifying the offset, start index, number of elements, and the vertex stride.
Top

Silverlight

Supported in: 5

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Community Additions

ADD
Show: