DynamicIndexBuffer Constructor (GraphicsDevice, Type, Int32, BufferUsage)

Create a new instance of this class.

Syntax

'Declaration
Public Sub New ( _
         graphicsDevice As GraphicsDevice, _
         indexType As Type, _
         indexCount As Integer, _
         usage As BufferUsage _
)
public DynamicIndexBuffer (
         GraphicsDevice graphicsDevice,
         Type indexType,
         int indexCount,
         BufferUsage usage
)
public:
DynamicIndexBuffer(
         GraphicsDevice graphicsDevice,
         Type indexType,
         int indexCount,
         BufferUsage usage
)

Parameters

  • graphicsDevice
    Type: GraphicsDevice
    The associated graphics device.
  • indexType
    Type: Type
    The index type.
  • indexCount
    Type: Int32
    The number of indicies in the buffer.
  • usage
    Type: BufferUsage
    Behavior options.

Exceptions

Exception type Condition
ArgumentNullException graphicsDevice is null.
ArgumentOutOfRangeException The elementCount parameter is invalid. It must be greater than zero, and the index must be sixteen or thirty-two bits in length. Index buffers can only be created for indices that are sixteen or thirty-two bits in length.
InvalidOperationException This resource could not be created.
NotSupportedException The profile does not support an elementSize of IndexElementSize.ThirtyTwoBits; use IndexElementSize.SixteenBits or a type that has a size of two bytes.

Requirements

Namespace: Microsoft.Xna.Framework.Graphics

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

See Also

Reference

DynamicIndexBuffer Class
DynamicIndexBuffer Members
Microsoft.Xna.Framework.Graphics Namespace

Platforms

Windows Phone