Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
Microsoft.Xna.Framework.Graphics.Texture2D Class Reference

Public Member Functions

 Texture2D (GraphicsDevice graphicsDevice, int width, int height)
 
 Texture2D (GraphicsDevice graphicsDevice, int width, int height, [MarshalAs(UnmanagedType.U1)] bool mipMap, SurfaceFormat format)
 
void SaveAsJpeg (Stream stream, int width, int height)
 
void SaveAsPng (Stream stream, int width, int height)
 
void SetData< T > (T[] data)
 
void SetData< T > (T[] data, int startIndex, int elementCount)
 
void SetData< T > (int level, Rectangle? rect, T[] data, int startIndex, int elementCount)
 
void GetData< T > (T[] data)
 
void GetData< T > (T[] data, int startIndex, int elementCount)
 
void GetData< T > (int level, Rectangle? rect, T[] data, int startIndex, int elementCount)
 
override string ToString ()
 
virtual void Dispose ()
 

Static Public Member Functions

static Texture2D FromStream (GraphicsDevice graphicsDevice, Stream stream, int width, int height, [MarshalAs(UnmanagedType.U1)] bool zoom)
 
static Texture2D FromStream (GraphicsDevice graphicsDevice, Stream stream)
 

Protected Member Functions

 Texture2D ()
 
unsafe void InitializeDescription (SurfaceFormat? format)
 
unsafe void CreateTexture (GraphicsDevice graphicsDevice, int width, int height, [MarshalAs(UnmanagedType.U1)] bool mipMap, uint usage, _D3DPOOL pool, SurfaceFormat format)
 
override void Dispose ([MarshalAs(UnmanagedType.U1)] bool P_0)
 
unsafe void InitializeDescription (SurfaceFormat format)
 
unsafe int CreateStateWrapper ()
 
void raise_Disposing (object value0, EventArgs value1)
 

Static Protected Member Functions

static void ValidateCreationParameters (ProfileCapabilities profile, int width, int height, SurfaceFormat format, [MarshalAs(UnmanagedType.U1)] bool mipMap)
 

Protected Attributes

int _width
 
int _height
 
bool _shouldNotRecreate
 
SurfaceFormat _format
 
int _levelCount
 
GraphicsDevice _parent
 

Package Functions

 Texture2D (GraphicsDevice graphicsDevice, int width, int height, [MarshalAs(UnmanagedType.U1)] bool mipMap, SurfaceFormat format, [MarshalAs(UnmanagedType.U1)] bool __unnamed005)
 
unsafe Texture2D (GraphicsDevice graphicsDevice, Stream stream, int width, int height, SharedConstants.XnaImageOperation operation)
 
virtual unsafe int SaveDataForRecreation ()
 
virtual unsafe int RecreateAndPopulateObject ()
 
virtual unsafe void ReleaseNativeObject ([MarshalAs(UnmanagedType.U1)] bool disposeManagedResource)
 
unsafe int CopyOrRestoreData ([MarshalAs(UnmanagedType.U1)] bool isStoring)
 
unsafe void CleanupSavedData ()
 
unsafe override IDirect3DBaseTexture9 * GetComPtr ()
 
unsafe int CompareTo (Texture other)
 

Static Package Functions

static unsafe Texture2D GetManagedObject (IDirect3DTexture9 *pInterface, GraphicsDevice pDevice, uint pool)
 
static byte GetExpectedByteSizeFromFormat (_D3DFORMAT format)
 
static unsafe void GetAndValidateSizes< T > (_D3DSURFACE_DESC *pSurface, uint *pdwFormatSize, uint *pdwElementSize)
 
static unsafe void GetAndValidateRect (_D3DSURFACE_DESC *__unnamed000, uint *pdwLockWidth, uint *pdwLockHeight, Rectangle? rect)
 
static unsafe void ValidateTotalSize (_D3DSURFACE_DESC *__unnamed000, uint dwLockWidth, uint dwLockHeight, uint dwFormatSize, uint dwElementSize, uint elementCount)
 
static bool CheckCompressedTexture (_D3DFORMAT format)
 
static unsafe void CopyData< T > (void *pData, int pitch, T[] data, int dataIndex, int elementCount, _D3DSURFACE_DESC *pSurface, uint dwLockWidth, uint dwLockHeight, [MarshalAs(UnmanagedType.U1)] bool isSetting)
 
static unsafe void SwapBgr (void *pDest, void *pSrc, uint dwSize)
 
static bool IsPowerOfTwo (uint dwNumber)
 

Package Attributes

unsafe IDirect3DTexture9 * pComPtr
 
bool alreadyRecreated
 
bool isActiveRenderTarget
 
bool renderTargetContentsDirty
 
unsafe StateTrackerTexturepStateTracker
 
ulong _internalHandle
 
bool isDisposed
 

Properties

override bool MustClamp [get]
 
Rectangle Bounds [get]
 
int Height [get]
 
int Width [get]
 
int LevelCount [get]
 
SurfaceFormat Format [get]
 
bool IsDisposed [get]
 
object Tag [get, set]
 
string Name [get, set]
 
GraphicsDevice GraphicsDevice [get]
 
EventHandler< EventArgsDisposing
 

Private Member Functions

unsafe Texture2D (IDirect3DTexture9 *pInterface, GraphicsDevice pDevice)
 
unsafe void CopyData< T > (int level, Rectangle? rect, T[] data, int startIndex, int elementCount, uint options, [MarshalAs(UnmanagedType.U1)] bool isSetting)
 
void SaveAsImage (Stream stream, SharedConstants.XnaImageFormat __unnamed001, int width, int height)
 
Color[] GetDataAsColor< T > (Converter< T, Color > toColor)
 
Color[] GetDataAsColor< T > ()
 
int IGraphicsResource. SaveDataForRecreation ()
 
int IGraphicsResource. RecreateAndPopulateObject ()
 
void IGraphicsResource. ReleaseNativeObject ([MarshalAs(UnmanagedType.U1)] bool disposeManagedResource)
 
void OnObjectCreation ()
 
void _0021Texture2D ()
 
void _007ETexture2D ()
 
void _0021GraphicsResource ()
 
void _007EGraphicsResource ()
 

Private Attributes

IntPtr[] pFaceData
 
string _localName
 
object _localTag
 
EventHandler< EventArgs_003Cbacking_store_003EDisposing
 

Detailed Description

Definition at line 12 of file Texture2D.cs.


The documentation for this class was generated from the following file: