#include <TextureManager.h>
Inheritance diagram for TTextureManager:
Public Member Functions | |
TTexture * | GetTexture (const TString &filename) |
Return texture with specified name. | |
Static Public Member Functions | |
static TTextureManager * | CreateTextureManager (TRenderer *renderer) |
This method is only way how to create texture manager. | |
static void | DestroyTextureManager (TTextureManager *manager) |
Destroy specified texture manager. | |
Friends | |
class | TTexture |
There may exists more texture managers in application thus this class is instanciable. You can create texture manager only via static method CreateTextureManager!!! You destroy texture manager via DestroyTextureManager!!!
Texture manager load textures from files only. If a texture cannot be loaded from file then blank texture is used and warning is displayed. Blank texture is created while texture manager is created.
When texture is loaded from file its TRendererTexture is created and encapsulate in TTexture object.
When you destroy texture manager all textures used from manager should have no references.
USING: Create manager via static method TTextureManager::CreateTextureManager Get textures via TTextureManager::GetTexture() method. Release given texture via TTexture::Release() Destroy manager via static method TTextureManager::DestroyTextureManager (all textures from manager should have no references)
Definition at line 46 of file TextureManager.h.
|
This method is only way how to create texture manager. Method creates manager with blank TRendererTexture, for what you must provide valid renderer. Method returns pointer to texture manager or NULL if an error occured.
Definition at line 100 of file TextureManager.cpp. References DBGTEXTF, TGlobalsSystem::GetLogFile(), Init(), and NSMath::NSStdMath::log(). Referenced by TGlobalsGraphic::Initialize(). Here is the call graph for this function: ![]() |
|
Destroy specified texture manager.
Definition at line 136 of file TextureManager.cpp. References TGlobalsSystem::GetLogFile(), and NSMath::NSStdMath::log(). Referenced by TGlobalsGraphic::Destroy(). Here is the call graph for this function: ![]() |
|
Return texture with specified name. Increase number of references to specified texture (TTexture). This method always return any texture - NULL is never returned!!!
Definition at line 154 of file TextureManager.cpp. References TArrayPtrs< T, size, step >::GetSize(). Here is the call graph for this function: ![]() |
|
Definition at line 48 of file TextureManager.h. |