Share via


IndexBuffer.SetData Generic Method (T , Int32, Int32)

Copies array data to the index buffer.

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

Syntax

public void SetData<T> (
         T[] data,
         int startIndex,
         int elementCount
) where T : ValueType

Type Parameters

  • T
    The type of the elements in the array.

Parameters

  • data
    The array of data to copy.
  • startIndex
    The index of the element in the array at which to start copying.
  • elementCount
    The number of elements to copy.

Remarks

An InvalidOperationException is thrown if an attempt is made to modify (for example, calls to the SetData method) a resource that is currently set on a graphics device.

See Also

Reference

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

Platforms

Xbox 360, Windows XP SP2, Windows Vista