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
파일 보기 프로젝트 열기: WolfgangSt/axiom 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
_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