Texture2DΒΆ
-
class
Texture2D: Texture, System.IDisposable -
readonly Rectangle
Bounds Gets the dimensions of the texture
-
readonly int
Width
-
readonly int
Height
-
float
get_TexelWidth()
-
float
get_TexelHeight()
-
public void
SetData<T>(int level, int arraySlice, System.Nullable<Rectangle> rect, Microsoft.Xna.Framework.Graphics.T[] data, int startIndex, int elementCount) Type Parameters: - T –
Parameters: - level (int) –
- arraySlice (int) –
- rect (System.Nullable<Rectangle>) –
- data (Microsoft.Xna.Framework.Graphics.T[]) –
- startIndex (int) –
- elementCount (int) –
-
public void
SetData<T>(int level, System.Nullable<Rectangle> rect, Microsoft.Xna.Framework.Graphics.T[] data, int startIndex, int elementCount) Type Parameters: - T –
Parameters: - level (int) –
- rect (System.Nullable<Rectangle>) –
- data (Microsoft.Xna.Framework.Graphics.T[]) –
- startIndex (int) –
- elementCount (int) –
-
public void
SetData<T>(Microsoft.Xna.Framework.Graphics.T[] data, int startIndex, int elementCount) Type Parameters: - T –
Parameters: - data (Microsoft.Xna.Framework.Graphics.T[]) –
- startIndex (int) –
- elementCount (int) –
-
public void
SetData<T>(Microsoft.Xna.Framework.Graphics.T[] data) Type Parameters: - T –
Parameters: - data (Microsoft.Xna.Framework.Graphics.T[]) –
-
public void
GetData<T>(int level, int arraySlice, System.Nullable<Rectangle> rect, Microsoft.Xna.Framework.Graphics.T[] data, int startIndex, int elementCount) Type Parameters: - T –
Parameters: - level (int) –
- arraySlice (int) –
- rect (System.Nullable<Rectangle>) –
- data (Microsoft.Xna.Framework.Graphics.T[]) –
- startIndex (int) –
- elementCount (int) –
-
public void
GetData<T>(int level, System.Nullable<Rectangle> rect, Microsoft.Xna.Framework.Graphics.T[] data, int startIndex, int elementCount) Type Parameters: - T –
Parameters: - level (int) –
- rect (System.Nullable<Rectangle>) –
- data (Microsoft.Xna.Framework.Graphics.T[]) –
- startIndex (int) –
- elementCount (int) –
-
public void
GetData<T>(Microsoft.Xna.Framework.Graphics.T[] data, int startIndex, int elementCount) Type Parameters: - T –
Parameters: - data (Microsoft.Xna.Framework.Graphics.T[]) –
- startIndex (int) –
- elementCount (int) –
-
public void
GetData<T>(Microsoft.Xna.Framework.Graphics.T[] data) Type Parameters: - T –
Parameters: - data (Microsoft.Xna.Framework.Graphics.T[]) –
-
public Texture2D
FromStream(GraphicsDevice graphicsDevice, System.IO.Stream stream) Creates a Texture2D from a stream, supported formats bmp, gif, jpg, png, tif and dds (only for simple textures). May work with other formats, but will not work with tga files.
Parameters: - graphicsDevice (Microsoft.Xna.Framework.Graphics.GraphicsDevice) –
- stream (System.IO.Stream) –
Returns:
-
public void
SaveAsJpeg(System.IO.Stream stream, int width, int height) Converts the texture to a JPG image
Parameters: - stream (System.IO.Stream) – Destination for the image
- width (int) –
- height (int) –
-
public void
SaveAsPng(System.IO.Stream stream, int width, int height) Converts the texture to a PNG image
Parameters: - stream (System.IO.Stream) – Destination for the image
- width (int) –
- height (int) –
-
public void
Reload(System.IO.Stream textureStream) Parameters: - textureStream (System.IO.Stream) –
-
SharpDX.Direct3D11.Resource
CreateTexture()
-
SharpDX.DXGI.SampleDescription
GetTextureSampleDescription()
-
readonly Rectangle