C# Класс Axiom.Core.TextureManager

Class for loading & managing textures.
Texture manager serves as an abstract singleton for all API specific texture managers. When a class inherits from this and is created, a instance of that class (i.e. GLTextureManager) is stored in the global singleton instance of the TextureManager. Note: This will not take place until the RenderSystem is initialized and at least one RenderWindow has been created.
Наследование: ResourceManager
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
_defaultMipmapCount int

Открытые методы

Метод Описание
CreateManual ( string name, string group, TextureType type, int width, int height, int numMipmaps, PixelFormat format ) : Axiom.Core.Texture
CreateManual ( string name, string group, TextureType type, int width, int height, int numMipmaps, PixelFormat format, TextureUsage usage ) : Axiom.Core.Texture

Create a manual texture with a depth of 1 (not loaded from a file).

CreateManual ( string name, string group, TextureType type, int width, int height, int numMipmaps, PixelFormat format, TextureUsage usage, IManualResourceLoader loader ) : Axiom.Core.Texture

Create a manual texture with a depth of 1 (not loaded from a file).

CreateManual ( string name, string group, TextureType type, int width, int height, int numMipmaps, PixelFormat format, TextureUsage usage, IManualResourceLoader loader, bool hwGammaCorrection ) : Axiom.Core.Texture
CreateManual ( string name, string group, TextureType type, int width, int height, int numMipmaps, PixelFormat format, TextureUsage usage, IManualResourceLoader loader, bool hwGammaCorrection, int fsaa ) : Axiom.Core.Texture
CreateManual ( string name, string group, TextureType type, int width, int height, int numMipmaps, PixelFormat format, TextureUsage usage, IManualResourceLoader loader, bool hwGammaCorrection, int fsaa, string fsaaHint ) : Axiom.Core.Texture
CreateManual ( string name, string group, TextureType type, int width, int height, int depth, int numMipmaps, PixelFormat format, TextureUsage usage, IManualResourceLoader loader ) : Axiom.Core.Texture
CreateManual ( string name, string group, TextureType type, int width, int height, int depth, int numMipmaps, PixelFormat format, TextureUsage usage, IManualResourceLoader loader, bool hwGammaCorrection ) : Axiom.Core.Texture
CreateManual ( string name, string group, TextureType type, int width, int height, int depth, int numMipmaps, PixelFormat format, TextureUsage usage, IManualResourceLoader loader, bool hwGammaCorrection, int fsaa ) : Axiom.Core.Texture
CreateManual ( string name, string group, TextureType type, int width, int height, int depth, int numMipMaps, PixelFormat format, TextureUsage usage, IManualResourceLoader loader, bool hwGammaCorrection, int fsaa, string fsaaHint ) : Axiom.Core.Texture

Create a manual texture with specified width, height and depth (not loaded from a file).

GetNativeFormat ( TextureType ttype, PixelFormat format, TextureUsage usage ) : PixelFormat
IsEquivalentFormatSupported ( TextureType ttype, PixelFormat format, TextureUsage usage ) : bool
IsFormatSupported ( TextureType ttype, PixelFormat format, TextureUsage usage ) : bool
IsHardwareFilteringSupported ( TextureType ttype, PixelFormat format, int usage ) : bool

Returns whether this render system has hardware filtering supported for the texture format requested with the given usage options.

IsHardwareFilteringSupported ( TextureType ttype, PixelFormat format, int usage, bool preciseFormatOnly ) : bool

Returns whether this render system has hardware filtering supported for the texture format requested with the given usage options.

Load ( string name, string group ) : Axiom.Core.Texture

Loads a texture with the specified name.

Load ( string name, string group, TextureType type ) : Axiom.Core.Texture

Load ( string name, string group, TextureType type, int numMipMaps ) : Axiom.Core.Texture
Load ( string name, string group, TextureType type, int numMipMaps, float gamma, bool isAlpha ) : Axiom.Core.Texture

Load ( string name, string group, TextureType type, int numMipMaps, float gamma, bool isAlpha, PixelFormat desiredFormat ) : Axiom.Core.Texture

LoadImage ( string name, string group, Image image ) : Axiom.Core.Texture

Loads a pre-existing image into the texture.

LoadImage ( string name, string group, Image image, TextureType texType ) : Axiom.Core.Texture

Loads a pre-existing image into the texture.

LoadImage ( string name, string group, Image image, TextureType texType, int numMipMaps, float gamma, bool isAlpha, PixelFormat desiredFormat ) : Axiom.Core.Texture

Loads a pre-existing image into the texture.

SetPreferredBitDepths ( ushort integerBits, ushort floatBits, bool reloadTextures ) : void
SetPreferredFloatBitDepth ( ushort bits, bool reloadTextures ) : void
SetPreferredIntegerBitDepth ( ushort bits, bool reloadTextures ) : void
this ( string name ) : Axiom.Core.Texture

Returns an instance of Texture that has the supplied name.

Защищенные методы

Метод Описание
TextureManager ( ) : System

Internal constructor. This class cannot be instantiated externally.

Protected internal because this singleton will actually hold the instance of a subclass created by a render system plugin.

dispose ( bool disposeManagedResources ) : void

Called when the engine is shutting down.

Описание методов

CreateManual() публичный метод

public CreateManual ( string name, string group, TextureType type, int width, int height, int numMipmaps, PixelFormat format ) : Axiom.Core.Texture
name string
group string
type TextureType
width int
height int
numMipmaps int
format PixelFormat
Результат Axiom.Core.Texture

CreateManual() публичный метод

Create a manual texture with a depth of 1 (not loaded from a file).
public CreateManual ( string name, string group, TextureType type, int width, int height, int numMipmaps, PixelFormat format, TextureUsage usage ) : Axiom.Core.Texture
name string The name to give the resulting texture
group string The name of the resource group to assign the texture to
type TextureType The type of texture to load/create, defaults to normal 2D textures
width int The dimensions of the texture
height int The dimensions of the texture
numMipmaps int /// The number of pre-filtered mipmaps to generate. If left to MIP_DEFAULT then /// the TextureManager's default number of mipmaps will be used (see setDefaultNumMipmaps()). /// If set to MIP_UNLIMITED mipmaps will be generated until the lowest possible /// level, 1x1x1. ///
format PixelFormat /// The internal format you wish to request; the manager reserves /// the right to create a different format if the one you select is /// not available in this context. ///
usage TextureUsage /// The kind of usage this texture is intended for. It /// is a combination of TU_STATIC, TU_DYNAMIC, TU_WRITE_ONLY, /// TU_AUTOMIPMAP and TU_RENDERTARGET (see TextureUsage enum). You are /// strongly advised to use HBU_STATIC_WRITE_ONLY wherever possible, if you need to /// update regularly, consider HBU_DYNAMIC_WRITE_ONLY. ///
Результат Axiom.Core.Texture

CreateManual() публичный метод

Create a manual texture with a depth of 1 (not loaded from a file).
public CreateManual ( string name, string group, TextureType type, int width, int height, int numMipmaps, PixelFormat format, TextureUsage usage, IManualResourceLoader loader ) : Axiom.Core.Texture
name string The name to give the resulting texture
group string The name of the resource group to assign the texture to
type TextureType The type of texture to load/create, defaults to normal 2D textures
width int The dimensions of the texture
height int The dimensions of the texture
numMipmaps int /// The number of pre-filtered mipmaps to generate. If left to MIP_DEFAULT then /// the TextureManager's default number of mipmaps will be used (see setDefaultNumMipmaps()). /// If set to MIP_UNLIMITED mipmaps will be generated until the lowest possible /// level, 1x1x1. ///
format PixelFormat /// The internal format you wish to request; the manager reserves /// the right to create a different format if the one you select is /// not available in this context. ///
usage TextureUsage /// The kind of usage this texture is intended for. It /// is a combination of TU_STATIC, TU_DYNAMIC, TU_WRITE_ONLY, /// TU_AUTOMIPMAP and TU_RENDERTARGET (see TextureUsage enum). You are /// strongly advised to use HBU_STATIC_WRITE_ONLY wherever possible, if you need to /// update regularly, consider HBU_DYNAMIC_WRITE_ONLY. ///
loader IManualResourceLoader /// If you intend the contents of the manual texture to be /// regularly updated, to the extent that you don't need to recover /// the contents if the texture content is lost somehow, you can leave /// this parameter as null. However, if you intend to populate the /// texture only once, then you should implement ManualResourceLoader /// and pass a pointer to it in this parameter; this means that if the /// manual texture ever needs to be reloaded, the ManualResourceLoader /// will be called to do it. ///
Результат Axiom.Core.Texture

CreateManual() публичный метод

public CreateManual ( string name, string group, TextureType type, int width, int height, int numMipmaps, PixelFormat format, TextureUsage usage, IManualResourceLoader loader, bool hwGammaCorrection ) : Axiom.Core.Texture
name string
group string
type TextureType
width int
height int
numMipmaps int
format PixelFormat
usage TextureUsage
loader IManualResourceLoader
hwGammaCorrection bool
Результат Axiom.Core.Texture

CreateManual() публичный метод

public CreateManual ( string name, string group, TextureType type, int width, int height, int numMipmaps, PixelFormat format, TextureUsage usage, IManualResourceLoader loader, bool hwGammaCorrection, int fsaa ) : Axiom.Core.Texture
name string
group string
type TextureType
width int
height int
numMipmaps int
format PixelFormat
usage TextureUsage
loader IManualResourceLoader
hwGammaCorrection bool
fsaa int
Результат Axiom.Core.Texture

CreateManual() публичный метод

public CreateManual ( string name, string group, TextureType type, int width, int height, int numMipmaps, PixelFormat format, TextureUsage usage, IManualResourceLoader loader, bool hwGammaCorrection, int fsaa, string fsaaHint ) : Axiom.Core.Texture
name string
group string
type TextureType
width int
height int
numMipmaps int
format PixelFormat
usage TextureUsage
loader IManualResourceLoader
hwGammaCorrection bool
fsaa int
fsaaHint string
Результат Axiom.Core.Texture

CreateManual() публичный метод

public CreateManual ( string name, string group, TextureType type, int width, int height, int depth, int numMipmaps, PixelFormat format, TextureUsage usage, IManualResourceLoader loader ) : Axiom.Core.Texture
name string
group string
type TextureType
width int
height int
depth int
numMipmaps int
format PixelFormat
usage TextureUsage
loader IManualResourceLoader
Результат Axiom.Core.Texture

CreateManual() публичный метод

public CreateManual ( string name, string group, TextureType type, int width, int height, int depth, int numMipmaps, PixelFormat format, TextureUsage usage, IManualResourceLoader loader, bool hwGammaCorrection ) : Axiom.Core.Texture
name string
group string
type TextureType
width int
height int
depth int
numMipmaps int
format PixelFormat
usage TextureUsage
loader IManualResourceLoader
hwGammaCorrection bool
Результат Axiom.Core.Texture

CreateManual() публичный метод

public CreateManual ( string name, string group, TextureType type, int width, int height, int depth, int numMipmaps, PixelFormat format, TextureUsage usage, IManualResourceLoader loader, bool hwGammaCorrection, int fsaa ) : Axiom.Core.Texture
name string
group string
type TextureType
width int
height int
depth int
numMipmaps int
format PixelFormat
usage TextureUsage
loader IManualResourceLoader
hwGammaCorrection bool
fsaa int
Результат Axiom.Core.Texture

CreateManual() публичный метод

Create a manual texture with specified width, height and depth (not loaded from a file).
public CreateManual ( string name, string group, TextureType type, int width, int height, int depth, int numMipMaps, PixelFormat format, TextureUsage usage, IManualResourceLoader loader, bool hwGammaCorrection, int fsaa, string fsaaHint ) : Axiom.Core.Texture
name string The name to give the resulting texture
group string The name of the resource group to assign the texture to
type TextureType The type of texture to load/create, defaults to normal 2D textures
width int The dimensions of the texture
height int The dimensions of the texture
depth int The dimensions of the texture
numMipMaps int /// The number of pre-filtered mipmaps to generate. If left to MIP_DEFAULT then /// the TextureManager's default number of mipmaps will be used (see setDefaultNumMipmaps()). /// If set to MIP_UNLIMITED mipmaps will be generated until the lowest possible /// level, 1x1x1. ///
format PixelFormat /// The internal format you wish to request; the manager reserves /// the right to create a different format if the one you select is /// not available in this context. ///
usage TextureUsage /// The kind of usage this texture is intended for. It /// is a combination of TU_STATIC, TU_DYNAMIC, TU_WRITE_ONLY, /// TU_AUTOMIPMAP and TU_RENDERTARGET (see TextureUsage enum). You are /// strongly advised to use HBU_STATIC_WRITE_ONLY wherever possible, if you need to /// update regularly, consider HBU_DYNAMIC_WRITE_ONLY. ///
loader IManualResourceLoader /// If you intend the contents of the manual texture to be /// regularly updated, to the extent that you don't need to recover /// the contents if the texture content is lost somehow, you can leave /// this parameter as null. However, if you intend to populate the /// texture only once, then you should implement ManualResourceLoader /// and pass a pointer to it in this parameter; this means that if the /// manual texture ever needs to be reloaded, the ManualResourceLoader /// will be called to do it. ///
hwGammaCorrection bool
fsaa int
fsaaHint string
Результат Axiom.Core.Texture

GetNativeFormat() публичный метод

public GetNativeFormat ( TextureType ttype, PixelFormat format, TextureUsage usage ) : PixelFormat
ttype TextureType
format PixelFormat
usage TextureUsage
Результат PixelFormat

IsEquivalentFormatSupported() публичный метод

public IsEquivalentFormatSupported ( TextureType ttype, PixelFormat format, TextureUsage usage ) : bool
ttype TextureType
format PixelFormat
usage TextureUsage
Результат bool

IsFormatSupported() публичный метод

public IsFormatSupported ( TextureType ttype, PixelFormat format, TextureUsage usage ) : bool
ttype TextureType
format PixelFormat
usage TextureUsage
Результат bool

IsHardwareFilteringSupported() публичный метод

Returns whether this render system has hardware filtering supported for the texture format requested with the given usage options.
public IsHardwareFilteringSupported ( TextureType ttype, PixelFormat format, int usage ) : bool
ttype TextureType The texture type requested
format PixelFormat The pixel format requested
usage int the kind of usage this texture is intended for, a combination of the TextureUsage flags.
Результат bool

IsHardwareFilteringSupported() публичный метод

Returns whether this render system has hardware filtering supported for the texture format requested with the given usage options.
public IsHardwareFilteringSupported ( TextureType ttype, PixelFormat format, int usage, bool preciseFormatOnly ) : bool
ttype TextureType The texture type requested
format PixelFormat The pixel format requested
usage int the kind of usage this texture is intended for, a combination of the TextureUsage flags.
preciseFormatOnly bool /// Whether precise or fallback format mode is used to detecting. /// In case the pixel format doesn't supported by device, false will be returned /// if in precise mode, and natively used pixel format will be actually use to /// check if in fallback mode. ///
Результат bool

Load() публичный метод

Loads a texture with the specified name.
public Load ( string name, string group ) : Axiom.Core.Texture
name string
group string
Результат Axiom.Core.Texture

Load() публичный метод

public Load ( string name, string group, TextureType type ) : Axiom.Core.Texture
name string
group string
type TextureType
Результат Axiom.Core.Texture

Load() публичный метод

public Load ( string name, string group, TextureType type, int numMipMaps ) : Axiom.Core.Texture
name string
group string
type TextureType
numMipMaps int
Результат Axiom.Core.Texture

Load() публичный метод

public Load ( string name, string group, TextureType type, int numMipMaps, float gamma, bool isAlpha ) : Axiom.Core.Texture
name string
group string
type TextureType
numMipMaps int
gamma float
isAlpha bool
Результат Axiom.Core.Texture

Load() публичный метод

public Load ( string name, string group, TextureType type, int numMipMaps, float gamma, bool isAlpha, PixelFormat desiredFormat ) : Axiom.Core.Texture
name string
group string
type TextureType
numMipMaps int
gamma float
isAlpha bool
desiredFormat PixelFormat
Результат Axiom.Core.Texture

LoadImage() публичный метод

Loads a pre-existing image into the texture.
public LoadImage ( string name, string group, Image image ) : Axiom.Core.Texture
name string
group string
image Image
Результат Axiom.Core.Texture

LoadImage() публичный метод

Loads a pre-existing image into the texture.
public LoadImage ( string name, string group, Image image, TextureType texType ) : Axiom.Core.Texture
name string
group string
image Image
texType TextureType
Результат Axiom.Core.Texture

LoadImage() публичный метод

Loads a pre-existing image into the texture.
public LoadImage ( string name, string group, Image image, TextureType texType, int numMipMaps, float gamma, bool isAlpha, PixelFormat desiredFormat ) : Axiom.Core.Texture
name string
group string
image Image
texType TextureType
numMipMaps int
gamma float
isAlpha bool
desiredFormat PixelFormat
Результат Axiom.Core.Texture

SetPreferredBitDepths() публичный метод

public SetPreferredBitDepths ( ushort integerBits, ushort floatBits, bool reloadTextures ) : void
integerBits ushort
floatBits ushort
reloadTextures bool
Результат void

SetPreferredFloatBitDepth() публичный метод

public SetPreferredFloatBitDepth ( ushort bits, bool reloadTextures ) : void
bits ushort
reloadTextures bool
Результат void

SetPreferredIntegerBitDepth() публичный метод

public SetPreferredIntegerBitDepth ( ushort bits, bool reloadTextures ) : void
bits ushort
reloadTextures bool
Результат void

TextureManager() защищенный метод

Internal constructor. This class cannot be instantiated externally.
Protected internal because this singleton will actually hold the instance of a subclass created by a render system plugin.
protected TextureManager ( ) : System
Результат System

dispose() защищенный метод

Called when the engine is shutting down.
protected dispose ( bool disposeManagedResources ) : void
disposeManagedResources bool
Результат void

this() публичный метод

Returns an instance of Texture that has the supplied name.
public this ( string name ) : Axiom.Core.Texture
name string
Результат Axiom.Core.Texture

Описание свойств

_defaultMipmapCount защищенное свойство

Default number of mipmaps to be used for loaded textures.
protected int _defaultMipmapCount
Результат int