TextureCube.GetData Generic Method (CubeMapFace, Int32, Nullable<Rectangle>, T , Int32, Int32)
Gets a copy of cube texture data, specifying a cubemap face, mimap level, source rectangle, start index, and number of elements.
Syntax
'Declaration
Public Sub GetData(Of T As ValueType) ( _
cubeMapFace As CubeMapFace, _
level As Integer, _
rect As Nullable(Of Rectangle), _
data As T(), _
startIndex As Integer, _
elementCount As Integer _
)
public void GetData<T> (
CubeMapFace cubeMapFace,
int level,
Nullable<Rectangle> rect,
T[] data,
int startIndex,
int elementCount
) where T : ValueType
public:
generic<typename T> where T : ValueType
void GetData(
CubeMapFace cubeMapFace,
int level,
Nullable<Rectangle> rect,
T data[],
int startIndex,
int elementCount
)
Type Parameters
- T
The type of the elements in the array.
Parameters
- cubeMapFace
Type: CubeMapFace
Cube map face. - level
Type: Int32
Mipmap level. - rect
Type: Nullable<Rectangle>
The section of the texture where the data will be placed. null indicates the data will be copied over the entire texture. - data
Type: T
Array of data. - startIndex
Type: Int32
Index of the first element to get. - elementCount
Type: Int32
Number of elements to get.
Exceptions
Exception type | Condition |
---|---|
ArgumentNullException | data must be of sufficient length to receive the data. |
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.
Requirements
Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework.Graphics (in microsoft.xna.framework.graphics.dll)
See Also
Reference
TextureCube Class
TextureCube Members
Microsoft.Xna.Framework.Graphics Namespace
Platforms
Windows Phone