Urho.Urho2D.Texture2D Class

2D texture resource.

See Also: Texture2D


public class Texture2D : Texture


Namespace: Urho.Urho2D
Assembly: Urho (in Urho.dll)
Assembly Versions:

The members of Urho.Urho2D.Texture2D are listed below.

See Also: Texture

Public Constructors

Constructs a new instance of Urho.Urho2D.Texture2D which is tied to the Application.CurrentContext.
Constructs a new instance of Urho.Urho2D.Texture2D, given a raw pointer to an unmanaged object
Constructs a new instance of Urho.Urho2D.Texture2D linked to a specific Context.

Protected Constructors

Empty constructor, chain to this constructor when you provide your own constructor that sets the handle field.

Public Properties

ImageImage. Get image data from zero mip level. Only RGB and RGBA textures are supported.
RenderSurfaceRenderSurface. Return render surface.
TypeStringHash. Urho's type system type.
TypeNameString. Urho's low-level type name.
TypeNameStaticString. Urho's low-level type name, accessible as a static method.
TypeStaticStringHash. Urho's low-level type, accessible as a static method.

Public Methods

BeginLoad(File) : Boolean
Load resource from stream. May be called from a worker thread. Return true if successful.
BeginLoad(MemoryBuffer) : Boolean
EndLoad() : Boolean
Finish resource loading. Always called from the main thread. Return true if successful.
GetData(UInt32, IntPtr) : Boolean
Get data from a mip level. The destination buffer must be big enough. Return true if successful.
Register object factory.
Release the texture.
SetData(Image, Boolean) : Boolean
Set data from an image. Return true if successful. Optionally make a single channel image alpha-only.
SetData(UInt32, Int32, Int32, Int32, Int32, Void*) : Boolean
Set data either partially or fully on a mip level. Return true if successful.
SetSize(Int32, Int32, UInt32, TextureUsage) : Boolean
SetSize(Int32, Int32, UInt32, TextureUsage, Int32, Boolean) : Boolean

Set size, format, usage and multisampling parameters for rendertargets. Zero size will follow application window size. Return true if successful.

Autoresolve true means the multisampled texture will be automatically resolved to 1-sample after being rendered to and before being sampled as a texture.

Autoresolve false means the multisampled texture will be read as individual samples in the shader and is not supported on Direct3D9.