Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Describes the rendering order of the vertices in a vertex buffer.
Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)
Syntax
public class IndexBuffer : GraphicsResource
Example
The vertex stream and index data of the graphics device must be set before any call to DrawIndexedPrimitives. The following example sets the index data and 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 );
graphics.GraphicsDevice.Indices = lineListIndexBuffer;
See Also
Tasks
How to: Draw Points, Lines, and Other 3D Primitives
Reference
IndexBuffer Members
Indices
DrawUserIndexedPrimitives
Microsoft.Xna.Framework.Graphics Namespace
Platforms
Xbox 360, Windows XP SP2, Windows Vista