Texture2D.SetData Generic Method (Int32, Nullable<Rectangle>, T , Int32, Int32)
Sets 2D texture data, specifying a mipmap level, source rectangle, start index, and number of elements.
Syntax
'Declaration
Public Sub SetData(Of T As ValueType) ( _
level As Integer, _
rect As Nullable(Of Rectangle), _
data As T(), _
startIndex As Integer, _
elementCount As Integer _
)
public void SetData<T> (
int level,
Nullable<Rectangle> rect,
T[] data,
int startIndex,
int elementCount
) where T : ValueType
public:
generic<typename T> where T : ValueType
void SetData(
int level,
Nullable<Rectangle> rect,
T data[],
int startIndex,
int elementCount
)
Type Parameters
- T
The type of the elements in the array.
Parameters
- level
Type: Int32
Mipmap level. - rect
Type: Nullable<Rectangle>
A bounding box that defines the position and location (in pixels) of the data. - data
Type: T
Array of data. - startIndex
Type: Int32
Index of the first element to set. - elementCount
Type: Int32
Number of elements to set.
Requirements
Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework.Graphics (in microsoft.xna.framework.graphics.dll)
See Also
Reference
Texture2D Class
Texture2D Members
Microsoft.Xna.Framework.Graphics Namespace
Platforms
Windows Phone