#include <OgreD3D7TextureManager.h>
Inheritance diagram for Ogre::D3DTextureManager:
Public Types | |
typedef std::map< ResourceHandle, Resource * > | ResourceHandleMap |
typedef MapIterator< ResourceHandleMap > | ResourceMapIterator |
Public Methods | |
D3DTextureManager (LPDIRECT3DDEVICE7 lpD3DDevice) | |
virtual | ~D3DTextureManager () |
virtual Texture * | create (const String &name, TextureType texType) |
Creates a D3DTexture resource. | |
virtual Texture * | createAsRenderTarget (const String &name) |
Creates a render target surface. | |
virtual Texture * | createManual (const String &name, TextureType texType, uint width, uint height, uint num_mips, PixelFormat format, TextureUsage usage) |
virtual Texture * | load (const String &name, TextureType texType=TEX_TYPE_2D, int numMipMaps=-1, Real gamma=1.0f, int priority=1) |
Loads a texture from a file. | |
virtual void | load (Resource *res, int priority=1) |
@copydoc ResourceManager::load | |
virtual Texture * | loadImage (const String &name, const Image &img, TextureType texType=TEX_TYPE_2D, int iNumMipMaps=-1, Real gamma=1.0f, int priority=1) |
virtual Texture * | loadRawData (const String &name, const DataChunk &pData, ushort uWidth, ushort uHeight, PixelFormat eFormat, TextureType texType=TEX_TYPE_2D, int iNumMipMaps=-1, Real gamma=1.0f, int priority=1) |
virtual Resource * | create (const String &name) |
Creates a new blank resource, compatible with this manager. | |
virtual void | unload (const String &filename) |
Manually unloads a texture from the loaded set. | |
virtual void | unload (Resource *res) |
Unloads a Resource from the managed resources list, calling it's unload() method. | |
virtual void | enable32BitTextures (bool setting=true) |
Enables / disables 32-bit textures. | |
virtual void | setDefaultNumMipMaps (int num) |
Sets the default number of mipmaps to be used for loaded textures, for when textures are loaded automatically (e.g. | |
virtual int | getDefaultNumMipMaps () |
Sets the default number of mipmaps to be used for loaded textures. | |
virtual void | setMemoryBudget (size_t bytes) |
Set a limit on the amount of memory this resource handler may use. | |
virtual void | add (Resource *res) |
Add a resource to this manager; normally only done by subclasses. | |
virtual void | unloadAndDestroyAll (void) |
Unloads all Resources from memory. | |
virtual Resource * | getByName (const String &name) |
Retrieves a pointer to a resource by name, or null if the resource does not exist. | |
virtual Resource * | getByHandle (ResourceHandle handle) |
Retrieves a pointer to a resource by handle, or null if the resource does not exist. | |
void | addSearchPath (const String &path) |
Adds a relative path to search for resources of this type. | |
void | addArchiveEx (const String &strName, const String &strDriverName) |
Adds an archive to the search path for this type of resource. | |
bool | _findResourceData (const String &filename, DataChunk &refChunk) |
Internal method, used for locating resource data in the file system / archives. | |
std::set< String > | _getAllNamesLike (const String &startPath, const String &extension) |
Returns a collection of files with the given extension in all resource paths, common and specific to this resource type. | |
ResourceMapIterator | getResourceIterator (void) |
Returns an iterator over all resources in this manager. | |
Static Public Methods | |
TextureManager & | getSingleton (void) |
Override standard Singleton retrieval. | |
TextureManager * | getSingletonPtr (void) |
Override standard Singleton retrieval. | |
void | addCommonSearchPath (const String &path) |
Adds a relative search path for resources of ALL types. | |
void | addCommonArchiveEx (const String &strName, const String &strDriverName) |
Adds an archive to the search path for all resources. | |
std::set< String > | _getAllCommonNamesLike (const String &startPath, const String &extension) |
Returns a collection of files with the given extension in the common resource paths. | |
bool | _findCommonResourceData (const String &filename, DataChunk &refChunk) |
Internal method, used for locating common resource data in the file system / archives. | |
Protected Types | |
typedef HashMap< String, ArchiveEx *, _StringHash > | FileMap |
typedef HashMap< String, Resource *, _StringHash > | ResourceMap |
Protected Methods | |
ResourceHandle | getNextHandle (void) |
Allocates the next handle. | |
void | checkUsage (void) |
Checks memory usage and pages out if required. | |
Protected Attributes | |
bool | mIs32Bit |
int | mDefaultNumMipMaps |
FileMap | mArchiveFiles |
ResourceHandleMap | mResourcesByHandle |
ResourceMap | mResources |
ResourceHandle | mNextHandle |
size_t | mMemoryBudget |
size_t | mMemoryUsage |
std::vector< ArchiveEx * > | mVFS |
Collection of searchable ArchiveEx classes (virtual file system) for this resource type. | |
Static Protected Attributes | |
FileMap | mCommonArchiveFiles |
std::vector< ArchiveEx * > | mCommonVFS |
Collection of searchable ArchiveEx classes (virtual file system) for all resource types. | |
TextureManager * | ms_Singleton = 0 |
Private Attributes | |
LPDIRECT3DDEVICE7 | mlpD3DDevice |
Definition at line 36 of file OgreD3D7TextureManager.h.
|
Definition at line 195 of file OgreResourceManager.h. |
|
Definition at line 203 of file OgreResourceManager.h. |
|
Definition at line 196 of file OgreResourceManager.h. |
|
Definition at line 224 of file OgreResourceManager.h. |
|
Definition at line 36 of file OgreD3D7TextureManager.cpp. References mlpD3DDevice. |
|
Definition at line 48 of file OgreD3D7TextureManager.cpp. References Ogre::__safeRelease(), mlpD3DDevice, and Ogre::ResourceManager::unloadAndDestroyAll(). |
|
Internal method, used for locating common resource data in the file system / archives.
Definition at line 294 of file OgreResourceManager.cpp. References Except, Ogre::ResourceManager::mCommonArchiveFiles, and Ogre::ResourceManager::mCommonVFS. |
|
Internal method, used for locating resource data in the file system / archives.
Definition at line 212 of file OgreResourceManager.cpp. References Except, Ogre::ResourceManager::mArchiveFiles, Ogre::ResourceManager::mCommonArchiveFiles, Ogre::ResourceManager::mCommonVFS, and Ogre::ResourceManager::mVFS. |
|
Returns a collection of files with the given extension in the common resource paths.
Definition at line 255 of file OgreResourceManager.cpp. References Ogre::ResourceManager::mCommonVFS, and Ogre::StringVector. |
|
Returns a collection of files with the given extension in all resource paths, common and specific to this resource type.
Definition at line 274 of file OgreResourceManager.cpp. References Ogre::ResourceManager::mVFS, and Ogre::StringVector. |
|
Add a resource to this manager; normally only done by subclasses.
Definition at line 75 of file OgreResourceManager.cpp. References Except, Ogre::Resource::getName(), Ogre::ResourceManager::getNextHandle(), Ogre::Resource::mHandle, Ogre::ResourceManager::mResources, and Ogre::ResourceManager::mResourcesByHandle. Referenced by Ogre::Quake3ShaderManager::create(), Ogre::MaterialManager::create(), Ogre::MeshManager::createManual(), Ogre::HighLevelGpuProgramManager::createProgram(), and Ogre::ResourceManager::load(). |
|
Adds an archive to the search path for this type of resource.
Definition at line 188 of file OgreResourceManager.cpp. References Ogre::ArchiveEx::getAllNamesLike(), Ogre::ResourceManager::mArchiveFiles, Ogre::ResourceManager::mVFS, and Ogre::StringVector. Referenced by Ogre::ResourceManager::addSearchPath(). |
|
Adds an archive to the search path for all resources.
Definition at line 200 of file OgreResourceManager.cpp. References Ogre::ArchiveEx::getAllNamesLike(), Ogre::ResourceManager::mCommonArchiveFiles, Ogre::ResourceManager::mCommonVFS, and Ogre::StringVector. Referenced by Ogre::ResourceManager::addCommonSearchPath(). |
|
Adds a relative search path for resources of ALL types.
This method has the same effect as ResourceManager::addSearchPath, except that the path added applies to ALL resources, not just the one managed by the subclass in question. Definition at line 182 of file OgreResourceManager.cpp. References Ogre::ResourceManager::addCommonArchiveEx(), and Ogre::convertPath(). |
|
Adds a relative path to search for resources of this type.
Definition at line 176 of file OgreResourceManager.cpp. References Ogre::ResourceManager::addArchiveEx(), and Ogre::convertPath(). |
|
Checks memory usage and pages out if required.
Definition at line 170 of file OgreResourceManager.cpp. Referenced by Ogre::ResourceManager::setMemoryBudget(). |
|
Creates a new blank resource, compatible with this manager.
Implements Ogre::ResourceManager. Definition at line 106 of file OgreTextureManager.h. References Ogre::TEX_TYPE_2D. Referenced by Ogre::TextureManager::load(), Ogre::TextureManager::loadImage(), and Ogre::TextureManager::loadRawData(). |
|
Creates a D3DTexture resource.
Implements Ogre::TextureManager. Definition at line 55 of file OgreD3D7TextureManager.cpp. References Ogre::Texture::enable32Bit(), Ogre::TextureManager::mIs32Bit, mlpD3DDevice, Ogre::TextureType, and Ogre::TU_DEFAULT. |
|
Creates a render target surface.
Implements Ogre::TextureManager. Definition at line 62 of file OgreD3D7TextureManager.cpp. References Ogre::Texture::enable32Bit(), Ogre::D3DTexture::load(), Ogre::TextureManager::mIs32Bit, mlpD3DDevice, Ogre::TEX_TYPE_2D, and Ogre::TU_RENDERTARGET. |
|
Implements Ogre::TextureManager. Definition at line 70 of file OgreD3D7TextureManager.cpp. References mlpD3DDevice, Ogre::PixelFormat, Ogre::TextureType, Ogre::TextureUsage, and Ogre::uint. |
|
Enables / disables 32-bit textures.
Definition at line 127 of file OgreTextureManager.cpp. References Ogre::TextureManager::mIs32Bit, and Ogre::ResourceManager::mResources. |
|
Retrieves a pointer to a resource by handle, or null if the resource does not exist.
Definition at line 151 of file OgreResourceManager.cpp. References Ogre::ResourceManager::mResourcesByHandle, and Ogre::ResourceHandle. |
|
Retrieves a pointer to a resource by name, or null if the resource does not exist.
Definition at line 139 of file OgreResourceManager.cpp. References Ogre::ResourceManager::mResources. Referenced by Ogre::MaterialManager::create(), Ogre::FontManager::create(), Ogre::MeshManager::createBezierPatch(), Ogre::MeshManager::createManual(), Ogre::SceneManager::createSkyboxPlane(), Ogre::SceneManager::createSkydomePlane(), Ogre::TextureManager::load(), Ogre::SkeletonManager::load(), Ogre::MeshManager::load(), Ogre::DynLibManager::load(), Ogre::ArchiveManager::load(), Ogre::SceneManager::setSkyBox(), and Ogre::TextureManager::unload(). |
|
Sets the default number of mipmaps to be used for loaded textures.
Definition at line 142 of file OgreTextureManager.h. |
|
Allocates the next handle.
Definition at line 165 of file OgreResourceManager.cpp. References Ogre::ResourceManager::mNextHandle, and Ogre::ResourceHandle. Referenced by Ogre::ResourceManager::add(). |
|
Returns an iterator over all resources in this manager.
Definition at line 226 of file OgreResourceManager.h. |
|
Override standard Singleton retrieval.
Reimplemented from Ogre::Singleton< TextureManager >. Definition at line 36 of file OgreTextureManager.cpp. References Ogre::Singleton< TextureManager >::ms_Singleton. |
|
Override standard Singleton retrieval.
Reimplemented from Ogre::Singleton< TextureManager >. Definition at line 32 of file OgreTextureManager.cpp. References Ogre::Singleton< TextureManager >::ms_Singleton. |
|
@copydoc ResourceManager::load
Reimplemented from Ogre::ResourceManager. Definition at line 101 of file OgreTextureManager.h. |
|
Loads a texture from a file.
Definition at line 43 of file OgreTextureManager.cpp. References Ogre::TextureManager::create(), Ogre::Texture::enable32Bit(), Ogre::ResourceManager::getByName(), Ogre::TextureManager::mDefaultNumMipMaps, Ogre::TextureManager::mIs32Bit, Ogre::Real, Ogre::Texture::setGamma(), Ogre::Texture::setNumMipMaps(), and Ogre::TextureType. |
|
Definition at line 68 of file OgreTextureManager.cpp. References Ogre::TextureManager::create(), Except, Ogre::Resource::getName(), Ogre::Texture::loadImage(), Ogre::TextureManager::mDefaultNumMipMaps, Ogre::ResourceManager::mResources, Ogre::Real, Ogre::Texture::setGamma(), Ogre::Texture::setNumMipMaps(), and Ogre::TextureType. |
|
Definition at line 94 of file OgreTextureManager.cpp. References Ogre::TextureManager::create(), Except, Ogre::Resource::getName(), Ogre::Texture::loadRawData(), Ogre::TextureManager::mDefaultNumMipMaps, Ogre::ResourceManager::mResources, Ogre::PixelFormat, Ogre::Real, Ogre::Texture::setGamma(), Ogre::Texture::setNumMipMaps(), Ogre::TextureType, and Ogre::ushort. |
|
Sets the default number of mipmaps to be used for loaded textures, for when textures are loaded automatically (e.g. by Material class) or when 'load' is called with the default parameters by the application.
Definition at line 139 of file OgreTextureManager.cpp. References Ogre::TextureManager::mDefaultNumMipMaps. |
|
Set a limit on the amount of memory this resource handler may use.
Definition at line 97 of file OgreResourceManager.cpp. References Ogre::ResourceManager::checkUsage(), and Ogre::ResourceManager::mMemoryBudget. |
|
Unloads a Resource from the managed resources list, calling it's unload() method.
Definition at line 105 of file OgreResourceManager.cpp. References Ogre::Resource::getHandle(), Ogre::Resource::getName(), Ogre::Resource::getSize(), Ogre::ResourceManager::mMemoryUsage, Ogre::ResourceManager::mResources, Ogre::ResourceManager::mResourcesByHandle, and Ogre::Resource::unload(). Referenced by Ogre::SceneManager::createSkyboxPlane(), and Ogre::SceneManager::createSkydomePlane(). |
|
Manually unloads a texture from the loaded set.
Definition at line 121 of file OgreTextureManager.cpp. References Ogre::ResourceManager::getByName(). |
|
Unloads all Resources from memory.
Reimplemented in Ogre::D3D9TextureManager, and Ogre::GLTextureManager. Definition at line 122 of file OgreResourceManager.cpp. References Ogre::ResourceManager::mResources, and Ogre::ResourceManager::mResourcesByHandle. Referenced by Ogre::BspResourceManager::load(), ~D3DTextureManager(), and Ogre::ResourceManager::~ResourceManager(). |
|
Definition at line 200 of file OgreResourceManager.h. Referenced by Ogre::ResourceManager::_findResourceData(), and Ogre::ResourceManager::addArchiveEx(). |
|
Definition at line 37 of file OgreResourceManager.cpp. Referenced by Ogre::ResourceManager::_findCommonResourceData(), Ogre::ResourceManager::_findResourceData(), and Ogre::ResourceManager::addCommonArchiveEx(). |
|
Collection of searchable ArchiveEx classes (virtual file system) for all resource types.
Definition at line 36 of file OgreResourceManager.cpp. Referenced by Ogre::ResourceManager::_findCommonResourceData(), Ogre::ResourceManager::_findResourceData(), Ogre::ResourceManager::_getAllCommonNamesLike(), Ogre::ResourceManager::addCommonArchiveEx(), Ogre::OverlayManager::loadAndParseOverlayFile(), Ogre::Quake3ShaderManager::parseAllSources(), Ogre::OverlayManager::parseAllSources(), Ogre::MaterialManager::parseAllSources(), and Ogre::FontManager::parseAllSources(). |
|
Definition at line 182 of file OgreTextureManager.h. Referenced by Ogre::TextureManager::load(), Ogre::TextureManager::loadImage(), Ogre::TextureManager::loadRawData(), and Ogre::TextureManager::setDefaultNumMipMaps(). |
|
Definition at line 181 of file OgreTextureManager.h. Referenced by Ogre::GLTextureManager::create(), Ogre::D3D9TextureManager::create(), create(), Ogre::D3D9TextureManager::createAsRenderTarget(), createAsRenderTarget(), Ogre::GLTextureManager::createManual(), Ogre::TextureManager::enable32BitTextures(), and Ogre::TextureManager::load(). |
|
Definition at line 59 of file OgreD3D7TextureManager.h. Referenced by create(), createAsRenderTarget(), createManual(), D3DTextureManager(), and ~D3DTextureManager(). |
|
Definition at line 210 of file OgreResourceManager.h. Referenced by Ogre::ResourceManager::ResourceManager(), and Ogre::ResourceManager::setMemoryBudget(). |
|
Definition at line 211 of file OgreResourceManager.h. Referenced by Ogre::ResourceManager::ResourceManager(), and Ogre::ResourceManager::unload(). |
|
Definition at line 208 of file OgreResourceManager.h. Referenced by Ogre::ResourceManager::getNextHandle(), and Ogre::ResourceManager::ResourceManager(). |
|
|
Definition at line 205 of file OgreResourceManager.h. Referenced by Ogre::ResourceManager::add(), Ogre::ResourceManager::getByHandle(), Ogre::ResourceManager::unload(), and Ogre::ResourceManager::unloadAndDestroyAll(). |
|
Definition at line 31 of file OgreTextureManager.cpp. Referenced by Ogre::TextureManager::getSingleton(), and Ogre::TextureManager::getSingletonPtr(). |
|
Collection of searchable ArchiveEx classes (virtual file system) for this resource type.
Definition at line 221 of file OgreResourceManager.h. Referenced by Ogre::ResourceManager::_findResourceData(), Ogre::ResourceManager::_getAllNamesLike(), Ogre::ResourceManager::addArchiveEx(), Ogre::OverlayManager::loadAndParseOverlayFile(), Ogre::Quake3ShaderManager::parseAllSources(), Ogre::OverlayManager::parseAllSources(), Ogre::MaterialManager::parseAllSources(), and Ogre::FontManager::parseAllSources(). |
Copyright © 2002-2003 by The OGRE Team
Last modified Fri May 14 23:23:59 2004