Urho.Urho2D.Texture2D Class

2D texture resource.

See Also: Texture2D

Syntax

public class Texture2D : Texture

Requirements

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

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

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

Public Methods

override
BeginLoad(File) : Boolean
Load resource from stream. May be called from a worker thread. Return true if successful.
override
BeginLoad(MemoryBuffer) : Boolean
override
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.
static
RegisterObject(Context)
Register object factory.
Release()
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.