#include <texture.hpp>
Inherited by GLTexture, and SDLTexture.
Public Member Functions | |
Texture () | |
virtual | ~Texture () |
virtual unsigned int | get_texture_width () const=0 |
virtual unsigned int | get_texture_height () const=0 |
virtual unsigned int | get_image_width () const=0 |
virtual unsigned int | get_image_height () const=0 |
Private Member Functions | |
Texture (const Texture &) | |
Texture & | operator= (const Texture &) |
Private Attributes | |
std::string | cache_filename |
Friends | |
class | TextureManager |
It stores the texture width and height and provides convenience functions for uploading SDL_Surfaces into the texture
Definition at line 44 of file texture.hpp.
Texture::Texture | ( | ) | [inline] |
virtual Texture::~Texture | ( | ) | [inline, virtual] |
Definition at line 54 of file texture.hpp.
References cache_filename, TextureManager::reap_cache_entry(), and texture_manager.
00055 { 00056 if (texture_manager && cache_filename != "") 00057 /* The cache entry is now useless: its weak pointer to us has been 00058 * cleared. Remove the entry altogether to save memory. */ 00059 texture_manager->reap_cache_entry(cache_filename); 00060 }
Texture::Texture | ( | const Texture & | ) | [private] |
virtual unsigned int Texture::get_texture_width | ( | ) | const [pure virtual] |
Implemented in GLTexture, and SDLTexture.
virtual unsigned int Texture::get_texture_height | ( | ) | const [pure virtual] |
Implemented in GLTexture, and SDLTexture.
virtual unsigned int Texture::get_image_width | ( | ) | const [pure virtual] |
Implemented in GLTexture, and SDLTexture.
virtual unsigned int Texture::get_image_height | ( | ) | const [pure virtual] |
Implemented in GLTexture, and SDLTexture.
friend class TextureManager [friend] |
Definition at line 47 of file texture.hpp.
std::string Texture::cache_filename [private] |