Urho.Texture Class

Base class for texture resources.

See Also: Texture

Syntax

public class Texture : Resource

Requirements

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

The members of Urho.Texture are listed below.

See Also: Resource

Public Constructors

Constructs a new instance of Urho.Texture which is tied to the Application.CurrentContext.
Constructs a new instance of Urho.Texture, given a raw pointer to an unmanaged object
Constructs a new instance of Urho.Texture 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

AnisotropyUInt32. Return texture max. anisotropy level. Value 0 means to use the default value from Renderer. Or Set texture max. anisotropy level. No effect if not using anisotropic filtering. Value 0 (default) uses the default setting from Renderer.
[read-only]
AutoResolveBoolean. Return texture multisampling autoresolve mode. When true, the texture is resolved before being sampled on SetTexture(). When false, the texture will not be resolved and must be read as individual samples in the shader.
BackupTextureTexture. Return backup texture. Or Set backup texture to use when rendering to this texture.
BorderColorColor. Return border color. Or Set border color for border addressing mode.
[read-only]
ComponentsUInt32. Return number of image components required to receive pixel data from GetData(), or 0 for compressed images.
[read-only]
CompressedBoolean. Return whether the texture format is compressed.
[read-only]
DepthInt32. Return height.
FilterModeTextureFilterMode. Return filtering mode. Or Set filtering mode.
[read-only]
FormatUInt32. Return texture format.
[read-only]
HeightInt32. Return height.
[read-only]
LevelsUInt32. Return number of mip levels.
[read-only]
LevelsDirtyBoolean.
[read-only]
MultiSampleInt32. Return texture multisampling level (1 = no multisampling).
[read-only]
ParametersDirtyBoolean. Return whether parameters are dirty.
ResolveDirtyBoolean. Set or clear the need resolve flag. Called internally by Graphics.
[read-only]
ResolveTextureIntPtr. Return resolve texture. Only used on Direct3D11.
[read-only]
SamplerIntPtr. Return sampler state object. Only used on Direct3D11.
[read-only]
ShaderResourceViewIntPtr. Return shader resource view. Only used on Direct3D11.
ShadowCompareBoolean. Return whether shadow compare is enabled. Or Set shadow compare mode.
SRGBBoolean. Return whether is using sRGB sampling and writing. Or Set sRGB sampling and writing mode.
[read-only]
UsageTextureUsage. Return texture usage type.
[read-only]
WidthInt32. Return width.

Public Methods

static
CheckMaxLevels(Int32, Int32, UInt32) : UInt32
Check maximum allowed mip levels for a specific texture size.
static
CheckMaxLevels(Int32, Int32, Int32, UInt32) : UInt32
Check maximum allowed mip levels for a specific 3D texture size.
GetAddressMode(TextureCoordinate) : TextureAddressMode
Return addressing mode by texture coordinate.
GetDataSize(Int32, Int32) : UInt32
Return data size in bytes for a rectangular region.
GetDataSize(Int32, Int32, Int32) : UInt32
Return data size in bytes for a volume region.
GetLevelDepth(UInt32) : Int32
Return mip level depth, or 0 if level does not exist.
GetLevelHeight(UInt32) : Int32
Return mip level width, or 0 if level does not exist.
GetLevelWidth(UInt32) : Int32
Return mip level width, or 0 if level does not exist.
GetMipsToSkip(Int32) : Int32
Return mip levels to skip on a quality setting when loading.
GetRowDataSize(Int32) : UInt32
Return data size in bytes for a pixel or block row.
GetSRGBFormat(UInt32) : UInt32
Return the corresponding SRGB texture format if supported. If not supported, return format unchanged.
RegenerateLevels()
SetAddressMode(TextureCoordinate, TextureAddressMode)
Set addressing mode by texture coordinate.
SetLevelsDirty()
SetMipsToSkip(Int32, Int32)
Set mip levels to skip on a quality setting when loading. Ensures higher quality levels do not skip more.
SetNumLevels(UInt32)
Set number of requested mip levels. Needs to be called before setting size.
SetParameters(XmlElement)
Set additional parameters from an XML element.
SetParameters(XmlFile)
Set additional parameters from an XML file.
SetParametersDirty()
Dirty the parameters.
UpdateParameters()
Update changed parameters to OpenGL. Called by Graphics when binding the texture.