Share via


TextureCube.GetData Generic Method (CubeMapFace, T , Int32, Int32)

Returns a copy of the texture data, specifying the start index and number of elements in the vertex buffer.

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

Syntax

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

Type Parameters

  • T
    The type of data in the texture buffer.

Parameters

  • faceType
    The cube map face type.
  • data
    The array into which to copy the data.
  • startIndex
    Index in the array at which to begin the copy.
  • elementCount
    Number of elements in the array.

Exceptions

Exception type Condition
ArgumentNullException data must be of sufficient length to receive the data.
NotSupportedException This TextureCube was created with a usage type of ResourceUsage.WriteOnly. Calling GetData on a resource that was created with ResourceUsage.WriteOnly is not supported.

Remarks

On Windows, GetData and SetData will fail if TextureCube.ResourceManagementMode is ResourceManagementMode.Manual and the format cannot be used as a render target.

See Also

Reference

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

Platforms

Xbox 360, Windows XP SP2, Windows Vista