Texture2D Members

The following tables list the members exposed by the Texture2D type.

Public Constructors

Name Description
Public Method Texture2D Overloaded. Initializes a new instance of the Texture2D class.

Public Properties

Name Description
Public Property Format Gets the pixel format of this texture resource.
Public Property GraphicsDevice (Inherited from GraphicsResource.)
Public Property Height Gets the height of this texture resource, in pixels.
Public Property IsDisposed (Inherited from GraphicsResource.)
Public Property LevelCount (Inherited from Texture.)
Public Property LevelOfDetail (Inherited from Texture.)
Public Property Name (Inherited from GraphicsResource.)
Public Property Priority (Inherited from GraphicsResource.)
Public Property ResourceManagementMode Gets the class of memory allocated for this texture resource.
Public Property ResourceType (Inherited from GraphicsResource.)
Public Property ResourceUsage Gets a set of options identifying the behaviors of this resource.
Public Property Tag (Inherited from GraphicsResource.)
Public Property Width Gets the width of this texture resource, in pixels.

Public Methods

Name Description
Public Method Dispose Overloaded. Immediately releases the unmanaged resources used by this object.
Public Method Equals Overloaded. Returns a value that indicates whether the current instance is equal to a specified object.
Public Method Static FromFile Overloaded. Creates a texture resource from a file.
Public Method GenerateMipMaps (Inherited from Texture.)
Public Method GetCreationParameters (Inherited from Texture.)
Public Method GetData Overloaded. Copies texture data into an array.
Public Method GetHashCode Gets the hash code for this instance.
Public Method GetTextureInformation (Inherited from Texture.)
Public Method GetType (Inherited from Object.)
Public Method Static op_Equality Overloaded. Compares two objects to determine whether they are the same.
Public Method Static op_Inequality Overloaded. Compares two objects to determine whether they are different.
Public Method ReferenceEquals (Inherited from Object.)
Public Method Save (Inherited from Texture.)
Public Method SetData Overloaded. Copies array data to the texture.
Public Method ToString Retrieves a string representation of this object.

Protected Methods

Name Description
Protected Method Finalize Allows this object to attempt to free resources and perform other cleanup operations before garbage collection reclaims the object.
Protected Method MemberwiseClone (Inherited from Object.)
Protected Method raise_Disposing (Inherited from GraphicsResource.)

Public Events

Name Description
Public Event Disposing (Inherited from GraphicsResource.)

See Also

Reference

Texture2D Class
Microsoft.Xna.Framework.Graphics Namespace