DeferredRenderer 1.0

TextureManager Class Reference

Container and manager for all the application textures. More...

#include <TextureManager.h>

List of all members.

Public Member Functions

 TextureManager ()
 ctor
 ~TextureManager ()
 dtor
void addTexture (Texture &_t)
 add a texture object
Texture getTexture (const std::string &_name)
 access texture by name
GLuint getTextureId (const std::string &_name)
 get texture ID by
void bindTexture (const std::string &_name)
 bind texture by name
void addEmptyf (const std::string &_name, int _w, int _h)
 add empty float texture
void addEmpty (const std::string &_name, int _w, int _h)
 add empty rgba texture

Private Attributes

std::map< std::string, Texturem_textures
 texture container

Detailed Description

Container and manager for all the application textures.

Definition at line 16 of file TextureManager.h.


Constructor & Destructor Documentation

TextureManager::TextureManager ( )

ctor

Definition at line 3 of file TextureManager.cpp.

{}
TextureManager::~TextureManager ( )

dtor

Definition at line 4 of file TextureManager.cpp.

{}

Member Function Documentation

void TextureManager::addEmpty ( const std::string &  _name,
int  _w,
int  _h 
)

add empty rgba texture

Definition at line 33 of file TextureManager.cpp.

References addTexture(), and Texture::generateEmpty().

{
    Texture tmp(_name);
    tmp.generateEmpty(_w, _h);
    this->addTexture(tmp);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void TextureManager::addEmptyf ( const std::string &  _name,
int  _w,
int  _h 
)

add empty float texture

Definition at line 26 of file TextureManager.cpp.

References addTexture(), and Texture::generateEmptyf().

{
    Texture tmp(_name);
    tmp.generateEmptyf(_w, _h);
    this->addTexture(tmp);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void TextureManager::addTexture ( Texture _t)

add a texture object

Definition at line 6 of file TextureManager.cpp.

References Texture::getName(), and m_textures.

{
    m_textures.insert(std::pair<std::string, Texture>(_t.getName(), _t));
}

Here is the call graph for this function:

Here is the caller graph for this function:

void TextureManager::bindTexture ( const std::string &  _name)

bind texture by name

Definition at line 21 of file TextureManager.cpp.

References m_textures.

{
    m_textures[_name].bind();
}

Here is the caller graph for this function:

Texture TextureManager::getTexture ( const std::string &  _name)

access texture by name

Definition at line 11 of file TextureManager.cpp.

References m_textures.

{
    return m_textures[_name];
}
GLuint TextureManager::getTextureId ( const std::string &  _name)

get texture ID by

Definition at line 16 of file TextureManager.cpp.

References m_textures.

{
    return m_textures[_name].id;
}

Here is the caller graph for this function:


Member Data Documentation

std::map<std::string, Texture> TextureManager::m_textures [private]

texture container

Definition at line 46 of file TextureManager.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Defines