#include <MercuryTextureManager.h>
Inheritance diagram for MercuryTextureManager:
Public Member Functions | |
MercuryTextureManager () | |
virtual | ~MercuryTextureManager () |
virtual void | Message (int Message, PStack &data, const MString &name) |
Receive message (When subscribing to messages, you receive them via this command). | |
void | CreateThread () |
void | ThreadLoop () |
void | UpdateTexture (MercuryTexture *texture) |
void | Remove (MercuryTexture *texture) |
void | Update (const float dTime) |
bool | IsTexture (const MercuryTexture *texture) |
unsigned int | TextureCount () const |
unsigned int | UniqueTextureCount () const |
TextureID * | FindTexture (const MString &path) const |
TextureID * | FindTexture (const MercuryTexture *texture) |
Static Public Member Functions | |
static MercuryTexture * | CreateTexture (const MString &path) |
Private Member Functions | |
void | Remove (const MString &path, const MercuryTexture *texture) |
void | ProcessLoadQueue () |
void | ProcessFinalizeQueue () |
bool | TryFromExisting (ThreadLoadData *tld) |
TextureID * | RegisterNewTexture (const MercuryTexture *t, RawImageData *d, const MString &path) |
RawImageData * | LoadDyn (const MString &sFullName, MString &sShortName) |
RawImageData * | LoadCube (const MString &sFullName, MString &sShortName) |
RawImageData * | LoadDynShadow (const MString &sFullName, MString &sShortName) |
RawImageData * | LoadDynCube (const MString &sFullName, MString &sShortName) |
RawImageData * | ImageLoader (const MString &path) |
Private Attributes | |
unsigned int | m_textureCount |
volatile map< MString, TextureID * > | m_textureMap |
volatile MDeque< ThreadLoadData * > | m_loadQueue |
volatile MDeque< ThreadLoadData * > | m_finalizeLoadQueue |
MercuryThread | m_thread |
MercuryMutex | m_mtxLoadQueue |
MercuryMutex | m_mtxMap |
MercuryMutex | m_mtxFinalize |
Classes | |
struct | ThreadLoadData |
Definition at line 34 of file MercuryTextureManager.h.
MercuryTextureManager::MercuryTextureManager | ( | ) |
Definition at line 47 of file MercuryTextureManager.cpp.
MercuryTextureManager::~MercuryTextureManager | ( | ) | [virtual] |
Definition at line 58 of file MercuryTextureManager.cpp.
MercuryTexture * MercuryTextureManager::CreateTexture | ( | const MString & | path | ) | [static] |
Definition at line 354 of file MercuryTextureManager.cpp.
Receive message (When subscribing to messages, you receive them via this command).
Reimplemented from MercuryMessageHandler.
Definition at line 66 of file MercuryTextureManager.cpp.
void MercuryTextureManager::CreateThread | ( | ) |
Definition at line 141 of file MercuryTextureManager.cpp.
void MercuryTextureManager::ThreadLoop | ( | ) |
Definition at line 392 of file MercuryTextureManager.cpp.
void MercuryTextureManager::UpdateTexture | ( | MercuryTexture * | texture | ) |
Definition at line 558 of file MercuryTextureManager.cpp.
void MercuryTextureManager::Remove | ( | MercuryTexture * | texture | ) |
Definition at line 501 of file MercuryTextureManager.cpp.
void MercuryTextureManager::Update | ( | const float | dTime | ) |
Definition at line 148 of file MercuryTextureManager.cpp.
bool MercuryTextureManager::IsTexture | ( | const MercuryTexture * | texture | ) |
Definition at line 569 of file MercuryTextureManager.cpp.
unsigned int MercuryTextureManager::TextureCount | ( | ) | const [inline] |
Definition at line 61 of file MercuryTextureManager.h.
unsigned int MercuryTextureManager::UniqueTextureCount | ( | ) | const [inline] |
Definition at line 62 of file MercuryTextureManager.h.
Definition at line 544 of file MercuryTextureManager.cpp.
TextureID* MercuryTextureManager::FindTexture | ( | const MercuryTexture * | texture | ) | [inline] |
Definition at line 64 of file MercuryTextureManager.h.
void MercuryTextureManager::Remove | ( | const MString & | path, | |
const MercuryTexture * | texture | |||
) | [private] |
Definition at line 522 of file MercuryTextureManager.cpp.
void MercuryTextureManager::ProcessLoadQueue | ( | ) | [private] |
Definition at line 401 of file MercuryTextureManager.cpp.
void MercuryTextureManager::ProcessFinalizeQueue | ( | ) | [private] |
Definition at line 461 of file MercuryTextureManager.cpp.
bool MercuryTextureManager::TryFromExisting | ( | ThreadLoadData * | tld | ) | [private] |
Definition at line 115 of file MercuryTextureManager.cpp.
TextureID * MercuryTextureManager::RegisterNewTexture | ( | const MercuryTexture * | t, | |
RawImageData * | d, | |||
const MString & | path | |||
) | [private] |
Definition at line 363 of file MercuryTextureManager.cpp.
RawImageData * MercuryTextureManager::LoadDyn | ( | const MString & | sFullName, | |
MString & | sShortName | |||
) | [private] |
Definition at line 156 of file MercuryTextureManager.cpp.
RawImageData * MercuryTextureManager::LoadCube | ( | const MString & | sFullName, | |
MString & | sShortName | |||
) | [private] |
Definition at line 235 of file MercuryTextureManager.cpp.
RawImageData * MercuryTextureManager::LoadDynShadow | ( | const MString & | sFullName, | |
MString & | sShortName | |||
) | [private] |
Definition at line 180 of file MercuryTextureManager.cpp.
RawImageData * MercuryTextureManager::LoadDynCube | ( | const MString & | sFullName, | |
MString & | sShortName | |||
) | [private] |
Definition at line 209 of file MercuryTextureManager.cpp.
RawImageData * MercuryTextureManager::ImageLoader | ( | const MString & | path | ) | [private] |
Definition at line 576 of file MercuryTextureManager.cpp.
unsigned int MercuryTextureManager::m_textureCount [private] |
Definition at line 80 of file MercuryTextureManager.h.
volatile map<MString, TextureID*> MercuryTextureManager::m_textureMap [private] |
Definition at line 81 of file MercuryTextureManager.h.
volatile MDeque<ThreadLoadData*> MercuryTextureManager::m_loadQueue [private] |
Definition at line 83 of file MercuryTextureManager.h.
volatile MDeque<ThreadLoadData*> MercuryTextureManager::m_finalizeLoadQueue [private] |
Definition at line 84 of file MercuryTextureManager.h.
MercuryThread MercuryTextureManager::m_thread [private] |
Definition at line 86 of file MercuryTextureManager.h.
Definition at line 88 of file MercuryTextureManager.h.
MercuryMutex MercuryTextureManager::m_mtxMap [private] |
Definition at line 89 of file MercuryTextureManager.h.
Definition at line 90 of file MercuryTextureManager.h.