Texture Class Reference

This class is a wrapper around a texture handle. More...

#include <texture.hpp>

Inherited by GLTexture, and SDLTexture.

List of all members.

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 &)
Textureoperator= (const Texture &)

Private Attributes

std::string cache_filename

Friends

class TextureManager


Detailed Description

This class is a wrapper around a texture handle.

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.


Constructor & Destructor Documentation

Texture::Texture (  )  [inline]

Definition at line 53 of file texture.hpp.

00053 : cache_filename() {}

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]


Member Function Documentation

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.

Texture& Texture::operator= ( const Texture  )  [private]


Friends And Related Function Documentation

friend class TextureManager [friend]

Definition at line 47 of file texture.hpp.


Member Data Documentation

std::string Texture::cache_filename [private]

Definition at line 50 of file texture.hpp.

Referenced by ~Texture().


The documentation for this class was generated from the following file:
Generated on Mon Jun 9 03:38:37 2014 for SuperTux by  doxygen 1.5.1