MercuryTextureManager Class Reference

[internal] Manager for all textures loaded. More...

#include <MercuryTextureManager.h>

Inheritance diagram for MercuryTextureManager:

Inheritance graph
Collaboration diagram for MercuryTextureManager:

Collaboration graph
List of all members.

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
TextureIDFindTexture (const MString &path) const
TextureIDFindTexture (const MercuryTexture *texture)

Static Public Member Functions

static MercuryTextureCreateTexture (const MString &path)

Private Member Functions

void Remove (const MString &path, const MercuryTexture *texture)
void ProcessLoadQueue ()
void ProcessFinalizeQueue ()
bool TryFromExisting (ThreadLoadData *tld)
TextureIDRegisterNewTexture (const MercuryTexture *t, RawImageData *d, const MString &path)
RawImageDataLoadDyn (const MString &sFullName, MString &sShortName)
RawImageDataLoadCube (const MString &sFullName, MString &sShortName)
RawImageDataLoadDynShadow (const MString &sFullName, MString &sShortName)
RawImageDataLoadDynCube (const MString &sFullName, MString &sShortName)
RawImageDataImageLoader (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


struct  ThreadLoadData

Detailed Description

[internal] Manager for all textures loaded.

Definition at line 34 of file MercuryTextureManager.h.

Constructor & Destructor Documentation

MercuryTextureManager::MercuryTextureManager (  ) 

Definition at line 47 of file MercuryTextureManager.cpp.

MercuryTextureManager::~MercuryTextureManager (  )  [virtual]

Definition at line 58 of file MercuryTextureManager.cpp.

Member Function Documentation

MercuryTexture * MercuryTextureManager::CreateTexture ( const MString path  )  [static]

Definition at line 354 of file MercuryTextureManager.cpp.

void MercuryTextureManager::Message ( int  Message,
PStack data,
const MString name 
) [virtual]

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.

TextureID * MercuryTextureManager::FindTexture ( const MString path  )  const

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.

Member Data Documentation

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.

MercuryMutex MercuryTextureManager::m_mtxLoadQueue [private]

Definition at line 88 of file MercuryTextureManager.h.

MercuryMutex MercuryTextureManager::m_mtxMap [private]

Definition at line 89 of file MercuryTextureManager.h.

MercuryMutex MercuryTextureManager::m_mtxFinalize [private]

Definition at line 90 of file MercuryTextureManager.h.

The documentation for this class was generated from the following files:
Hosted by Logo