Bagikan melalui


IndexBuffer Constructor (GraphicsDevice, IndexElementSize, Int32, BufferUsage)

Initializes a new instance of the IndexBuffer class.

Syntax

'Declaration
Public Sub New ( _
         graphicsDevice As GraphicsDevice, _
         indexElementSize As IndexElementSize, _
         indexCount As Integer, _
         usage As BufferUsage _
)
public IndexBuffer (
         GraphicsDevice graphicsDevice,
         IndexElementSize indexElementSize,
         int indexCount,
         BufferUsage usage
)
public:
IndexBuffer(
         GraphicsDevice graphicsDevice,
         IndexElementSize indexElementSize,
         int indexCount,
         BufferUsage usage
)

Parameters

Exceptions

Exception type Condition
ArgumentNullException graphicsDevice is null.
ArgumentOutOfRangeException

One of the following conditions is true:

NotSupportedException The profile does not support an elementSize of IndexElementSize.ThirtyTwoBits; use IndexElementSize.SixteenBits or a type that has a size of two bytes.
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

GraphicsDeviceManager.DeviceReset Event
IndexBuffer Class
IndexBuffer Members
Microsoft.Xna.Framework.Graphics Namespace

Platforms

Windows Phone