#include <Texture.h>
Mutators | |
boost::shared_ptr< Texture > | StoreTexture (Texture *texture, const std::string &texture_name) |
boost::shared_ptr< Texture > | StoreTexture (const boost::shared_ptr< Texture > &texture, const std::string &texture_name) |
boost::shared_ptr< Texture > | GetTexture (const std::string &name, bool mipmap=false) |
void | FreeTexture (const std::string &name) |
Static Public Member Functions | |
static void | InitDevIL () |
Friends | |
TextureManager & | GetTextureManager () |
The user need only request a texture through GetTexture(); if the texture is not already resident, it will be loaded. If the user would like to create her own images and store them in the manager, that can be accomplished via StoreTexture() calls.
Definition at line 205 of file Texture.h.
boost::shared_ptr<Texture> GG::TextureManager::StoreTexture | ( | Texture * | texture, | |
const std::string & | texture_name | |||
) |
stores a pre-existing GG::Texture in the manager's texture pool, and returns a shared_ptr to it.
boost::shared_ptr<Texture> GG::TextureManager::StoreTexture | ( | const boost::shared_ptr< Texture > & | texture, | |
const std::string & | texture_name | |||
) |
stores a pre-existing GG::Texture in the manager's texture pool, and returns a shared_ptr to it.
boost::shared_ptr<Texture> GG::TextureManager::GetTexture | ( | const std::string & | name, | |
bool | mipmap = false | |||
) |
returns a shared_ptr to the texture created from image file name.
If the texture is not present in the manager's pool, it will be loaded from disk.
void GG::TextureManager::FreeTexture | ( | const std::string & | name | ) |
removes the manager's shared_ptr to the texture created from image file name, if it exists.
static void GG::TextureManager::InitDevIL | ( | ) | [static] |
initializes DevIL image library, if it is not already initialized
TextureManager& GetTextureManager | ( | ) | [friend] |
Returns the singleton TextureManager instance.