TTextureManager Class Reference

This class defines texture manager. More...

#include <TextureManager.h>

Inheritance diagram for TTextureManager:

Inheritance graph
[legend]
Collaboration diagram for TTextureManager:

Collaboration graph
[legend]
List of all members.

Public Member Functions

TTextureGetTexture (const TString &filename)
 Return texture with specified name.

Static Public Member Functions

static TTextureManagerCreateTextureManager (TRenderer *renderer)
 This method is only way how to create texture manager.
static void DestroyTextureManager (TTextureManager *manager)
 Destroy specified texture manager.

Friends

class TTexture

Detailed Description

This class defines texture manager.

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.


Member Function Documentation

TTextureManager * TTextureManager::CreateTextureManager TRenderer renderer  )  [static]
 

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.

Parameters:
renderer [in] valid renderer

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:

void TTextureManager::DestroyTextureManager TTextureManager manager  )  [static]
 

Destroy specified texture manager.

Parameters:
manager [in] texture manager to destroy

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:

TTexture * TTextureManager::GetTexture const TString filename  ) 
 

Return texture with specified name.

Increase number of references to specified texture (TTexture).

This method always return any texture - NULL is never returned!!!

Parameters:
filename [in] name of file with specified texture.

Definition at line 154 of file TextureManager.cpp.

References TArrayPtrs< T, size, step >::GetSize().

Here is the call graph for this function:


Friends And Related Function Documentation

friend class TTexture [friend]
 

Definition at line 48 of file TextureManager.h.


The documentation for this class was generated from the following files:
Generated on Wed Nov 28 22:44:12 2007 for Joy4D by  doxygen 1.4.6-NO