This manager handles the storage and query of of Graphics Textures. More...
#include <texturemanager.h>
Public Types | |
typedef TextureContainer::const_iterator | ConstTextureIterator |
Const Iterator type for Texture instances stored in this class. | |
typedef std::map< String, Texture * > | TextureContainer |
Basic container type for Texture storage in this class. | |
typedef TextureContainer::iterator | TextureIterator |
Iterator type for Texture instances stored in this class. | |
Public Types inherited from Mezzanine::ManagerBase | |
enum | ManagerType { MT_Undefined = 0, MT_AudioManager = 1, MT_AnimationManager = 2, MT_CollisionShapeManager = 3, MT_CompositorManager = 4, MT_GraphicsManager = 5, MT_EventManager = 6, MT_InputManager = 7, MT_LogManager = 8, MT_MaterialManager = 9, MT_MeshManager = 10, MT_NetworkManager = 11, MT_ResourceManager = 12, MT_ScriptingManager = 13, MT_TextureManager = 14, MT_UIManager = 15, MT_ActorManager = 101, MT_AreaEffectManager = 102, MT_DebrisManager = 103, MT_PagingManager = 104, MT_PhysicsManager = 105, MT_SceneManager = 106, MT_SoundScapeManager = 107, MT_TerrainManager = 108, MT_VehicleManager = 109, MT_UserCreated = 512 } |
A listing of Manager Types. More... | |
Public Member Functions | |
TextureManager () | |
Class constructor. | |
TextureManager (const XML::Node &XMLNode) | |
XML constructor. More... | |
virtual | ~TextureManager () |
Class destructor. | |
Ogre::TextureManager * | _GetInternalManager () const |
Gets the internal TextureManager. More... | |
virtual Texture * | _WrapInternalTexture (Ogre::TexturePtr ToWrap) |
Wraps and stores an Ogre Texture instance. More... | |
Texture * | CreateManualTexture (const String &ResourceName, const String &ResourceGroup, const Graphics::TextureType Type, const Whole Width, const Whole Height, const Integer NumMipMaps, const Graphics::PixelFormat Format, const Whole Usage=Graphics::TU_Default, const Boole HWGammaCorrect=false, const Whole FSAA=0) |
Creates a blank texture with a width and height. More... | |
Texture * | CreateManualTexture (const String &ResourceName, const String &ResourceGroup, const Graphics::TextureType Type, const Whole Width, const Whole Height, const Whole Depth, const Integer NumMipMaps, const Graphics::PixelFormat Format, const Whole Usage=Graphics::TU_Default, const Boole HWGammaCorrect=false, const Whole FSAA=0) |
Creates a blank texture with a width, height, and depth. More... | |
virtual void | Deinitialize () |
Removes this manager from any necessary configuration so it can be safely disposed of. More... | |
virtual String | GetImplementationTypeName () const |
This Allows any manager name to be sent to a stream. Primarily used for logging. More... | |
virtual ManagerType | GetInterfaceType () const |
This returns the type of this manager. More... | |
virtual Whole | GetNumTextures () |
Gets the number of currently loaded Textures. More... | |
Texture * | GetTexture (const String &TextureName) |
Gets a Texture stored in this manager. More... | |
virtual void | Initialize () |
Configures this manager for use prior to entering the main loop. More... | |
virtual Texture * | LoadTexture (const String &TextureName, const String &Group) |
Loads a Texture file from disk and prepares it for use. More... | |
virtual void | UnloadAllTextures () |
Unloads every Texture that is currently loaded. | |
virtual void | UnloadTexture (const String &TextureName) |
Unloads a Texture file. More... | |
Public Member Functions inherited from Mezzanine::EntresolManager | |
EntresolManager () | |
Class constructor. | |
virtual | ~EntresolManager () |
Class destructor. | |
Public Member Functions inherited from Mezzanine::ManagerBase | |
ManagerBase () | |
Class constructor. | |
virtual | ~ManagerBase () |
Class destructor. | |
virtual String | GetInterfaceTypeAsString () const |
Gets a string of the interface type of this manager. More... | |
Boole | IsInitialized () const |
Gets whether or not this manager has been initialized. More... | |
Public Member Functions inherited from Mezzanine::Singleton< TextureManager > | |
~Singleton () | |
Class destructor. | |
Static Public Attributes | |
static const String | ImplementationName = "DefaultTextureManager" |
A String containing the name of this manager implementation. | |
static const ManagerBase::ManagerType | InterfaceType = ManagerBase::MT_TextureManager |
A ManagerType enum value used to describe the type of interface/functionality this manager provides. | |
Protected Member Functions | |||
virtual void | AddTexture (Texture *ToAdd) | ||
Adds a Texture to this manager.
| |||
Protected Member Functions inherited from Mezzanine::Singleton< TextureManager > | |||
Singleton () | |||
Class constructor. | |||
Protected Attributes | |
TextureContainer | Textures |
Container storing all of the currently loaded Textures. More... | |
Protected Attributes inherited from Mezzanine::ManagerBase | |
Boole | Initialized |
Simple Boole indicating whether or not this manager has been initialized. More... | |
Entresol * | TheEntresol |
The actual pointer to the Entresol core class. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from Mezzanine::ManagerBase | |
static String | GetTypeAsString (const ManagerType &ManagerType) |
Gets the string form of the type of manager. More... | |
static ManagerType | GetTypeFromString (const String &ManagerName) |
Gets the type of manager requested from a string. More... | |
Static Public Member Functions inherited from Mezzanine::Singleton< TextureManager > | |
static TextureManager * | GetSingletonPtr () |
Fetches a pointer to the singleton. More... | |
static Boole | SingletonValid () |
Checks to see if the singleton pointer is valid. More... | |
Static Protected Attributes inherited from Mezzanine::Singleton< TextureManager > | |
static TextureManager * | SingletonPtr |
The one and only pointer to the single object. More... | |
This manager handles the storage and query of of Graphics Textures.
Definition at line 71 of file texturemanager.h.
Mezzanine::Graphics::TextureManager::TextureManager | ( | const XML::Node & | XMLNode | ) |
XML constructor.
XMLNode | The node of the xml document to construct from. |
Definition at line 60 of file texturemanager.cpp.
Ogre::TextureManager * Mezzanine::Graphics::TextureManager::_GetInternalManager | ( | ) | const |
Gets the internal TextureManager.
Definition at line 174 of file texturemanager.cpp.
|
virtual |
|
protectedvirtual |
Adds a Texture to this manager.
If | the name of the Texture being added is not unique a II_DUPLICATE_IDENTITY_EXCEPTION will be thrown. |
ToAdd | The Texture to be added. |
Definition at line 70 of file texturemanager.cpp.
Texture * Mezzanine::Graphics::TextureManager::CreateManualTexture | ( | const String & | ResourceName, |
const String & | ResourceGroup, | ||
const Graphics::TextureType | Type, | ||
const Whole | Width, | ||
const Whole | Height, | ||
const Integer | NumMipMaps, | ||
const Graphics::PixelFormat | Format, | ||
const Whole | Usage = Graphics::TU_Default , |
||
const Boole | HWGammaCorrect = false , |
||
const Whole | FSAA = 0 |
||
) |
Creates a blank texture with a width and height.
ResourceName | The name of the resource to be created. |
ResourceGroup | The name of the group the resource will be created in. |
Type | The type of blank texture to be created. See TextureType enum for more details. |
Width | The width of the texture to be loaded. |
Height | The height of the texture to be loaded. |
NumMipMaps | The number of mipmaps that exist for the texture. |
Format | The pixel format to create the buffer for. |
Usage | Indicates how the texture will be used so the buffer structure can be optimized. |
HWGammaCorrect | Whether or not to enable hardware gamma correction (sRGB) on this texture. The hardware will convert from gamma space to linear space when reading from this texture. Only applicable for 8-bits per channel textures, will be ignored for other types. |
FSAA | The level of multisampling to use if this is a render target. Ignored if usage does not include TU_RenderTarget or if the device does not support it. |
Definition at line 84 of file texturemanager.cpp.
Texture * Mezzanine::Graphics::TextureManager::CreateManualTexture | ( | const String & | ResourceName, |
const String & | ResourceGroup, | ||
const Graphics::TextureType | Type, | ||
const Whole | Width, | ||
const Whole | Height, | ||
const Whole | Depth, | ||
const Integer | NumMipMaps, | ||
const Graphics::PixelFormat | Format, | ||
const Whole | Usage = Graphics::TU_Default , |
||
const Boole | HWGammaCorrect = false , |
||
const Whole | FSAA = 0 |
||
) |
Creates a blank texture with a width, height, and depth.
ResourceName | The name of the resource to be created. |
ResourceGroup | The name of the group the resource will be created in. |
Type | The type of blank texture to be created. See TextureType enum for more details. |
Width | The width of the texture to be loaded. |
Height | The height of the texture to be loaded. |
NumMipMaps | The number of mipmaps that exist for the texture. |
Format | The pixel format to create the buffer for. |
Usage | Indicates how the texture will be used so the buffer structure can be optimized. |
HWGammaCorrect | Whether or not to enable hardware gamma correction (sRGB) on this texture. The hardware will convert from gamma space to linear space when reading from this texture. Only applicable for 8-bits per channel textures, will be ignored for other types. |
FSAA | The level of multisampling to use if this is a render target. Ignored if usage does not include TU_RenderTarget or if the device does not support it. |
Definition at line 90 of file texturemanager.cpp.
|
virtual |
Removes this manager from any necessary configuration so it can be safely disposed of.
Implements Mezzanine::ManagerBase.
Definition at line 147 of file texturemanager.cpp.
|
virtual |
This Allows any manager name to be sent to a stream. Primarily used for logging.
Implements Mezzanine::ManagerBase.
Definition at line 161 of file texturemanager.cpp.
|
virtual |
This returns the type of this manager.
This is intended to make using and casting from Manager base easier. With this is is possible to cast from ManagerBase to the correct Manager Type.
Implements Mezzanine::ManagerBase.
Definition at line 158 of file texturemanager.cpp.
|
virtual |
Gets the number of currently loaded Textures.
Definition at line 128 of file texturemanager.cpp.
Gets a Texture stored in this manager.
MeshName | The name of the Texture to retrieve. |
Definition at line 119 of file texturemanager.cpp.
|
virtual |
Configures this manager for use prior to entering the main loop.
Implements Mezzanine::ManagerBase.
Definition at line 144 of file texturemanager.cpp.
|
virtual |
Unloads a Texture file.
MeshName | The name of the Texture to be unloaded. |
Definition at line 108 of file texturemanager.cpp.
|
protected |
Container storing all of the currently loaded Textures.
Definition at line 88 of file texturemanager.h.