共用方式為


Texture3D.GetData Generic Method (Int32, Int32, Int32, Int32, Int32, Int32, Int32, T , Int32, Int32)

Gets a copy of the texture data, specifying the level and dimensions of the volume texture to copy.

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

Syntax

public void GetData<T> (
         int level,
         int left,
         int top,
         int right,
         int bottom,
         int front,
         int back,
         T[] data,
         int startIndex,
         int elementCount
) where T : ValueType

Type Parameters

  • T
    Type of value to return.

Parameters

  • level
    The mipmap level where the data will be placed.
  • left
    Position of the left side of the box on the x-axis.
  • top
    Position of the top of the box on the y-axis.
  • right
    Position of the right side of the box on the x-axis.
  • bottom
    Position of the bottom of the box on the y-axis.
  • front
    Position of the front of the box on the z-axis.
  • back
    Position of the back of the box on the z-axis.
  • data
    An array to fill with data.
  • startIndex
    The index of the element in the array at which to start copying.
  • elementCount
    The number of elements to copy.

Remarks

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

See Also

Reference

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

Platforms

Xbox 360, Windows XP SP2, Windows Vista