| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889 |
- // WARNING - AUTOGENERATED - DO NOT EDIT
- //
- // Generated using `sharpie urho`
- //
- // Texture.cs
- //
- // Copyright 2015 Xamarin Inc. All rights reserved.
- using System;
- using System.Runtime.InteropServices;
- using System.Collections.Generic;
- using Urho.Urho2D;
- using Urho.Gui;
- using Urho.Resources;
- using Urho.IO;
- using Urho.Navigation;
- using Urho.Network;
- namespace Urho
- {
- /// <summary>
- /// Base class for texture resources.
- /// </summary>
- public unsafe partial class Texture : ResourceWithMetadata, IGPUObject
- {
- unsafe partial void OnTextureCreated ();
- [Preserve]
- public Texture (IntPtr handle) : base (handle)
- {
- OnTextureCreated ();
- }
- [Preserve]
- protected Texture (UrhoObjectFlag emptyFlag) : base (emptyFlag)
- {
- OnTextureCreated ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr Texture_CastToGPUObject (IntPtr handle);
- public GPUObject AsGPUObject ()
- {
- return new GPUObject (Texture_CastToGPUObject (handle));
- }
- [Preserve]
- public Texture () : this (Application.CurrentContext)
- {
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr Texture_Texture (IntPtr context);
- [Preserve]
- public Texture (Context context) : base (UrhoObjectFlag.Empty)
- {
- Runtime.Validate (typeof(Texture));
- handle = Texture_Texture ((object)context == null ? IntPtr.Zero : context.Handle);
- Runtime.RegisterObject (this);
- OnTextureCreated ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Texture_SetNumLevels (IntPtr handle, uint levels);
- /// <summary>
- /// Set number of requested mip levels. Needs to be called before setting size.
- /// The default value (0) allocates as many mip levels as necessary to reach 1x1 size. Set value 1 to disable mipmapping.
- /// Note that rendertargets need to regenerate mips dynamically after rendering, which may cost performance. Screen buffers
- /// and shadow maps allocated by Renderer will have mipmaps disabled.
- /// </summary>
- public void SetNumLevels (uint levels)
- {
- Runtime.ValidateRefCounted (this);
- Texture_SetNumLevels (handle, levels);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Texture_SetFilterMode (IntPtr handle, TextureFilterMode filter);
- /// <summary>
- /// Set filtering mode.
- /// </summary>
- private void SetFilterMode (TextureFilterMode filter)
- {
- Runtime.ValidateRefCounted (this);
- Texture_SetFilterMode (handle, filter);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Texture_SetAddressMode (IntPtr handle, TextureCoordinate coord, TextureAddressMode address);
- /// <summary>
- /// Set addressing mode by texture coordinate.
- /// </summary>
- public void SetAddressMode (TextureCoordinate coord, TextureAddressMode address)
- {
- Runtime.ValidateRefCounted (this);
- Texture_SetAddressMode (handle, coord, address);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Texture_SetAnisotropy (IntPtr handle, uint level);
- /// <summary>
- /// Set texture max. anisotropy level. No effect if not using anisotropic filtering. Value 0 (default) uses the default setting from Renderer.
- /// </summary>
- private void SetAnisotropy (uint level)
- {
- Runtime.ValidateRefCounted (this);
- Texture_SetAnisotropy (handle, level);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Texture_SetShadowCompare (IntPtr handle, bool enable);
- /// <summary>
- /// Set shadow compare mode. Not used on Direct3D9.
- /// </summary>
- private void SetShadowCompare (bool enable)
- {
- Runtime.ValidateRefCounted (this);
- Texture_SetShadowCompare (handle, enable);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Texture_SetBorderColor (IntPtr handle, ref Urho.Color color);
- /// <summary>
- /// Set border color for border addressing mode.
- /// </summary>
- private void SetBorderColor (Urho.Color color)
- {
- Runtime.ValidateRefCounted (this);
- Texture_SetBorderColor (handle, ref color);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Texture_SetSRGB (IntPtr handle, bool enable);
- /// <summary>
- /// Set sRGB sampling and writing mode.
- /// </summary>
- private void SetSRGB (bool enable)
- {
- Runtime.ValidateRefCounted (this);
- Texture_SetSRGB (handle, enable);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Texture_SetBackupTexture (IntPtr handle, IntPtr texture);
- /// <summary>
- /// Set backup texture to use when rendering to this texture.
- /// </summary>
- private void SetBackupTexture (Texture texture)
- {
- Runtime.ValidateRefCounted (this);
- Texture_SetBackupTexture (handle, (object)texture == null ? IntPtr.Zero : texture.Handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Texture_SetMipsToSkip (IntPtr handle, int quality, int toSkip);
- /// <summary>
- /// Set mip levels to skip on a quality setting when loading. Ensures higher quality levels do not skip more.
- /// </summary>
- public void SetMipsToSkip (int quality, int toSkip)
- {
- Runtime.ValidateRefCounted (this);
- Texture_SetMipsToSkip (handle, quality, toSkip);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint Texture_GetFormat (IntPtr handle);
- /// <summary>
- /// Return API-specific texture format.
- /// </summary>
- private uint GetFormat ()
- {
- Runtime.ValidateRefCounted (this);
- return Texture_GetFormat (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Texture_IsCompressed (IntPtr handle);
- /// <summary>
- /// Return whether the texture format is compressed.
- /// </summary>
- private bool IsCompressed ()
- {
- Runtime.ValidateRefCounted (this);
- return Texture_IsCompressed (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint Texture_GetLevels (IntPtr handle);
- /// <summary>
- /// Return number of mip levels.
- /// </summary>
- private uint GetLevels ()
- {
- Runtime.ValidateRefCounted (this);
- return Texture_GetLevels (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern int Texture_GetWidth (IntPtr handle);
- /// <summary>
- /// Return width.
- /// </summary>
- private int GetWidth ()
- {
- Runtime.ValidateRefCounted (this);
- return Texture_GetWidth (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern int Texture_GetHeight (IntPtr handle);
- /// <summary>
- /// Return height.
- /// </summary>
- private int GetHeight ()
- {
- Runtime.ValidateRefCounted (this);
- return Texture_GetHeight (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern int Texture_GetDepth (IntPtr handle);
- /// <summary>
- /// Return depth.
- /// </summary>
- private int GetDepth ()
- {
- Runtime.ValidateRefCounted (this);
- return Texture_GetDepth (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern TextureFilterMode Texture_GetFilterMode (IntPtr handle);
- /// <summary>
- /// Return filtering mode.
- /// </summary>
- private TextureFilterMode GetFilterMode ()
- {
- Runtime.ValidateRefCounted (this);
- return Texture_GetFilterMode (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern TextureAddressMode Texture_GetAddressMode (IntPtr handle, TextureCoordinate coord);
- /// <summary>
- /// Return addressing mode by texture coordinate.
- /// </summary>
- public TextureAddressMode GetAddressMode (TextureCoordinate coord)
- {
- Runtime.ValidateRefCounted (this);
- return Texture_GetAddressMode (handle, coord);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint Texture_GetAnisotropy (IntPtr handle);
- /// <summary>
- /// Return texture max. anisotropy level. Value 0 means to use the default value from Renderer.
- /// </summary>
- private uint GetAnisotropy ()
- {
- Runtime.ValidateRefCounted (this);
- return Texture_GetAnisotropy (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Texture_GetShadowCompare (IntPtr handle);
- /// <summary>
- /// Return whether shadow compare is enabled. Not used on Direct3D9.
- /// </summary>
- private bool GetShadowCompare ()
- {
- Runtime.ValidateRefCounted (this);
- return Texture_GetShadowCompare (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern Urho.Color Texture_GetBorderColor (IntPtr handle);
- /// <summary>
- /// Return border color.
- /// </summary>
- private Urho.Color GetBorderColor ()
- {
- Runtime.ValidateRefCounted (this);
- return Texture_GetBorderColor (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Texture_GetSRGB (IntPtr handle);
- /// <summary>
- /// Return whether is using sRGB sampling and writing.
- /// </summary>
- private bool GetSRGB ()
- {
- Runtime.ValidateRefCounted (this);
- return Texture_GetSRGB (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern int Texture_GetMultiSample (IntPtr handle);
- /// <summary>
- /// Return texture multisampling level (1 = no multisampling).
- /// </summary>
- private int GetMultiSample ()
- {
- Runtime.ValidateRefCounted (this);
- return Texture_GetMultiSample (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Texture_GetAutoResolve (IntPtr handle);
- /// <summary>
- /// 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.
- /// </summary>
- private bool GetAutoResolve ()
- {
- Runtime.ValidateRefCounted (this);
- return Texture_GetAutoResolve (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Texture_IsResolveDirty (IntPtr handle);
- /// <summary>
- /// Return whether multisampled texture needs resolve.
- /// </summary>
- private bool IsResolveDirty ()
- {
- Runtime.ValidateRefCounted (this);
- return Texture_IsResolveDirty (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Texture_GetLevelsDirty (IntPtr handle);
- /// <summary>
- /// Return whether rendertarget mipmap levels need regenration.
- /// </summary>
- private bool GetLevelsDirty ()
- {
- Runtime.ValidateRefCounted (this);
- return Texture_GetLevelsDirty (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr Texture_GetBackupTexture (IntPtr handle);
- /// <summary>
- /// Return backup texture.
- /// </summary>
- private Texture GetBackupTexture ()
- {
- Runtime.ValidateRefCounted (this);
- return Runtime.LookupObject<Texture> (Texture_GetBackupTexture (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern int Texture_GetMipsToSkip (IntPtr handle, int quality);
- /// <summary>
- /// Return mip levels to skip on a quality setting when loading.
- /// </summary>
- public int GetMipsToSkip (int quality)
- {
- Runtime.ValidateRefCounted (this);
- return Texture_GetMipsToSkip (handle, quality);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern int Texture_GetLevelWidth (IntPtr handle, uint level);
- /// <summary>
- /// Return mip level width, or 0 if level does not exist.
- /// </summary>
- public int GetLevelWidth (uint level)
- {
- Runtime.ValidateRefCounted (this);
- return Texture_GetLevelWidth (handle, level);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern int Texture_GetLevelHeight (IntPtr handle, uint level);
- /// <summary>
- /// Return mip level width, or 0 if level does not exist.
- /// </summary>
- public int GetLevelHeight (uint level)
- {
- Runtime.ValidateRefCounted (this);
- return Texture_GetLevelHeight (handle, level);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern int Texture_GetLevelDepth (IntPtr handle, uint level);
- /// <summary>
- /// Return mip level depth, or 0 if level does not exist.
- /// </summary>
- public int GetLevelDepth (uint level)
- {
- Runtime.ValidateRefCounted (this);
- return Texture_GetLevelDepth (handle, level);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern TextureUsage Texture_GetUsage (IntPtr handle);
- /// <summary>
- /// Return texture usage type.
- /// </summary>
- private TextureUsage GetUsage ()
- {
- Runtime.ValidateRefCounted (this);
- return Texture_GetUsage (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint Texture_GetDataSize (IntPtr handle, int width, int height);
- /// <summary>
- /// Return data size in bytes for a rectangular region.
- /// </summary>
- public uint GetDataSize (int width, int height)
- {
- Runtime.ValidateRefCounted (this);
- return Texture_GetDataSize (handle, width, height);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint Texture_GetDataSize0 (IntPtr handle, int width, int height, int depth);
- /// <summary>
- /// Return data size in bytes for a volume region.
- /// </summary>
- public uint GetDataSize (int width, int height, int depth)
- {
- Runtime.ValidateRefCounted (this);
- return Texture_GetDataSize0 (handle, width, height, depth);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint Texture_GetRowDataSize (IntPtr handle, int width);
- /// <summary>
- /// Return data size in bytes for a pixel or block row.
- /// </summary>
- public uint GetRowDataSize (int width)
- {
- Runtime.ValidateRefCounted (this);
- return Texture_GetRowDataSize (handle, width);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint Texture_GetComponents (IntPtr handle);
- /// <summary>
- /// Return number of image components required to receive pixel data from GetData(), or 0 for compressed images.
- /// </summary>
- private uint GetComponents ()
- {
- Runtime.ValidateRefCounted (this);
- return Texture_GetComponents (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Texture_GetParametersDirty (IntPtr handle);
- /// <summary>
- /// Return whether the parameters are dirty.
- /// </summary>
- private bool GetParametersDirty ()
- {
- Runtime.ValidateRefCounted (this);
- return Texture_GetParametersDirty (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Texture_SetParameters (IntPtr handle, IntPtr xml);
- /// <summary>
- /// Set additional parameters from an XML file.
- /// </summary>
- public void SetParameters (Urho.Resources.XmlFile xml)
- {
- Runtime.ValidateRefCounted (this);
- Texture_SetParameters (handle, (object)xml == null ? IntPtr.Zero : xml.Handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Texture_SetParameters1 (IntPtr handle, IntPtr element);
- /// <summary>
- /// Set additional parameters from an XML element.
- /// </summary>
- public void SetParameters (XmlElement element)
- {
- Runtime.ValidateRefCounted (this);
- Texture_SetParameters1 (handle, (object)element == null ? IntPtr.Zero : element.Handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Texture_SetParametersDirty (IntPtr handle);
- /// <summary>
- /// Mark parameters dirty. Called by Graphics.
- /// </summary>
- public void SetParametersDirty ()
- {
- Runtime.ValidateRefCounted (this);
- Texture_SetParametersDirty (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Texture_UpdateParameters (IntPtr handle);
- /// <summary>
- /// Update dirty parameters to the texture object. Called by Graphics when assigning the texture.
- /// </summary>
- public void UpdateParameters ()
- {
- Runtime.ValidateRefCounted (this);
- Texture_UpdateParameters (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr Texture_GetShaderResourceView (IntPtr handle);
- /// <summary>
- /// Return shader resource view. Only used on Direct3D11.
- /// </summary>
- private IntPtr GetShaderResourceView ()
- {
- Runtime.ValidateRefCounted (this);
- return Texture_GetShaderResourceView (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr Texture_GetSampler (IntPtr handle);
- /// <summary>
- /// Return sampler state object. Only used on Direct3D11.
- /// </summary>
- private IntPtr GetSampler ()
- {
- Runtime.ValidateRefCounted (this);
- return Texture_GetSampler (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr Texture_GetResolveTexture (IntPtr handle);
- /// <summary>
- /// Return resolve texture. Only used on Direct3D11.
- /// </summary>
- private IntPtr GetResolveTexture ()
- {
- Runtime.ValidateRefCounted (this);
- return Texture_GetResolveTexture (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint Texture_GetSRGBFormat (IntPtr handle, uint format);
- /// <summary>
- /// Convert format to sRGB. Not used on Direct3D9.
- /// </summary>
- public uint GetSRGBFormat (uint format)
- {
- Runtime.ValidateRefCounted (this);
- return Texture_GetSRGBFormat (handle, format);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Texture_SetResolveDirty (IntPtr handle, bool enable);
- /// <summary>
- /// Set or clear the need resolve flag. Called internally by Graphics.
- /// </summary>
- private void SetResolveDirty (bool enable)
- {
- Runtime.ValidateRefCounted (this);
- Texture_SetResolveDirty (handle, enable);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Texture_SetLevelsDirty (IntPtr handle);
- /// <summary>
- /// Set the mipmap levels dirty flag. Called internally by Graphics.
- /// </summary>
- public void SetLevelsDirty ()
- {
- Runtime.ValidateRefCounted (this);
- Texture_SetLevelsDirty (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Texture_RegenerateLevels (IntPtr handle);
- /// <summary>
- /// Regenerate mipmap levels for a rendertarget after rendering and before sampling. Called internally by Graphics. No-op on Direct3D9. On OpenGL the texture must have been bound to work properly.
- /// </summary>
- public void RegenerateLevels ()
- {
- Runtime.ValidateRefCounted (this);
- Texture_RegenerateLevels (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint Texture_CheckMaxLevels (int width, int height, uint requestedLevels);
- /// <summary>
- /// Check maximum allowed mip levels for a specific texture size.
- /// </summary>
- public static uint CheckMaxLevels (int width, int height, uint requestedLevels)
- {
- Runtime.Validate (typeof(Texture));
- return Texture_CheckMaxLevels (width, height, requestedLevels);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern uint Texture_CheckMaxLevels2 (int width, int height, int depth, uint requestedLevels);
- /// <summary>
- /// Check maximum allowed mip levels for a specific 3D texture size.
- /// </summary>
- public static uint CheckMaxLevels (int width, int height, int depth, uint requestedLevels)
- {
- Runtime.Validate (typeof(Texture));
- return Texture_CheckMaxLevels2 (width, height, depth, requestedLevels);
- }
- /// <summary>
- /// Return filtering mode.
- /// Or
- /// Set filtering mode.
- /// </summary>
- public TextureFilterMode FilterMode {
- get {
- return GetFilterMode ();
- }
- set {
- SetFilterMode (value);
- }
- }
- /// <summary>
- /// 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.
- /// </summary>
- public uint Anisotropy {
- get {
- return GetAnisotropy ();
- }
- set {
- SetAnisotropy (value);
- }
- }
- /// <summary>
- /// Return whether shadow compare is enabled. Not used on Direct3D9.
- /// Or
- /// Set shadow compare mode. Not used on Direct3D9.
- /// </summary>
- public bool ShadowCompare {
- get {
- return GetShadowCompare ();
- }
- set {
- SetShadowCompare (value);
- }
- }
- /// <summary>
- /// Return border color.
- /// Or
- /// Set border color for border addressing mode.
- /// </summary>
- public Urho.Color BorderColor {
- get {
- return GetBorderColor ();
- }
- set {
- SetBorderColor (value);
- }
- }
- /// <summary>
- /// Return whether is using sRGB sampling and writing.
- /// Or
- /// Set sRGB sampling and writing mode.
- /// </summary>
- public bool SRGB {
- get {
- return GetSRGB ();
- }
- set {
- SetSRGB (value);
- }
- }
- /// <summary>
- /// Return backup texture.
- /// Or
- /// Set backup texture to use when rendering to this texture.
- /// </summary>
- public Texture BackupTexture {
- get {
- return GetBackupTexture ();
- }
- set {
- SetBackupTexture (value);
- }
- }
- /// <summary>
- /// Return API-specific texture format.
- /// </summary>
- public uint Format {
- get {
- return GetFormat ();
- }
- }
- /// <summary>
- /// Return whether the texture format is compressed.
- /// </summary>
- public bool Compressed {
- get {
- return IsCompressed ();
- }
- }
- /// <summary>
- /// Return number of mip levels.
- /// </summary>
- public uint Levels {
- get {
- return GetLevels ();
- }
- }
- /// <summary>
- /// Return width.
- /// </summary>
- public int Width {
- get {
- return GetWidth ();
- }
- }
- /// <summary>
- /// Return height.
- /// </summary>
- public int Height {
- get {
- return GetHeight ();
- }
- }
- /// <summary>
- /// Return depth.
- /// </summary>
- public int Depth {
- get {
- return GetDepth ();
- }
- }
- /// <summary>
- /// Return texture multisampling level (1 = no multisampling).
- /// </summary>
- public int MultiSample {
- get {
- return GetMultiSample ();
- }
- }
- /// <summary>
- /// 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.
- /// </summary>
- public bool AutoResolve {
- get {
- return GetAutoResolve ();
- }
- }
- /// <summary>
- /// Return whether multisampled texture needs resolve.
- /// Or
- /// Set or clear the need resolve flag. Called internally by Graphics.
- /// </summary>
- public bool ResolveDirty {
- get {
- return IsResolveDirty ();
- }
- set {
- SetResolveDirty (value);
- }
- }
- /// <summary>
- /// Return whether rendertarget mipmap levels need regenration.
- /// </summary>
- public bool LevelsDirty {
- get {
- return GetLevelsDirty ();
- }
- }
- /// <summary>
- /// Return texture usage type.
- /// </summary>
- public TextureUsage Usage {
- get {
- return GetUsage ();
- }
- }
- /// <summary>
- /// Return number of image components required to receive pixel data from GetData(), or 0 for compressed images.
- /// </summary>
- public uint Components {
- get {
- return GetComponents ();
- }
- }
- /// <summary>
- /// Return whether the parameters are dirty.
- /// </summary>
- public bool ParametersDirty {
- get {
- return GetParametersDirty ();
- }
- }
- /// <summary>
- /// Return shader resource view. Only used on Direct3D11.
- /// </summary>
- public IntPtr ShaderResourceView {
- get {
- return GetShaderResourceView ();
- }
- }
- /// <summary>
- /// Return sampler state object. Only used on Direct3D11.
- /// </summary>
- public IntPtr Sampler {
- get {
- return GetSampler ();
- }
- }
- /// <summary>
- /// Return resolve texture. Only used on Direct3D11.
- /// </summary>
- public IntPtr ResolveTexture {
- get {
- return GetResolveTexture ();
- }
- }
- }
- }
|