Sdílet prostřednictvím


DynamicIndexBuffer Constructor (GraphicsDevice, IndexElementSize, Int32, BufferUsage)

Create a new instance of this class.

Syntax

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

Parameters

  • graphicsDevice
    Type: GraphicsDevice
    The associated graphics device.
  • indexElementSize
    Type: IndexElementSize
    Size of each index element.
  • indexCount
    Type: Int32
    Number of indices 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