#include <Texture.h>
Inheritance diagram for Track::Texture:
Public Member Functions | |
Texture (std::istream &source) | |
Load filename from a stream. | |
Texture (std::string filename) | |
Take given filename. | |
Texture () | |
virtual | ~Texture () |
const std::string & | get_filename () const |
Get a reference to the filename containing the texture's image data. | |
virtual void | bind () const |
Bind the texture so it can be used in OpenGL. | |
void | make_cache () const |
Load the texture without binding it. | |
Protected Member Functions | |
GLuint * | load_gl_texture () const |
Create the OpenGL texture obect. | |
virtual void | load_from_file () const |
Load the file and specify mipmap textures from it. | |
Static Protected Member Functions | |
static void | delete_gl_texture (GLuint *texture) |
Delete the OpenGL texture object with the given name. | |
Protected Attributes | |
std::string | m_filename |
filename for the texture. | |
GLuint | m_texture_name |
OpenGL texture name. | |
boost::shared_ptr< GLuint > | m_texture_name_ref |
Reference counter for the texture name. | |
GLenum | m_target |
OpenGL texture target, normally GL_TEXTURE_2D. | |
unsigned int | m_width |
Number of texels horizontally across the image. | |
unsigned int | m_height |
Number of texels vertically across the image. | |
bool | m_has_alpha |
True if the texture has an alpha component, false otherwise. |
Also loads images from a file. Can find the filename from a stream.
Definition at line 26 of file Texture.h.
Track::Texture::Texture | ( | std::istream & | source | ) |
Track::Texture::Texture | ( | std::string | filename | ) |
Track::Texture::Texture | ( | ) |
Definition at line 36 of file Texture.cpp.
Track::Texture::~Texture | ( | ) | [virtual] |
Definition at line 42 of file Texture.cpp.
void Track::Texture::bind | ( | ) | const [virtual] |
void Track::Texture::delete_gl_texture | ( | GLuint * | texture | ) | [static, protected] |
Delete the OpenGL texture object with the given name.
This is static to meet boost::shared_ptr requirements.
texture | pointer to the name of the texture object to delete. |
Definition at line 69 of file Texture.cpp.
const std::string & Track::Texture::get_filename | ( | ) | const |
Get a reference to the filename containing the texture's image data.
Definition at line 47 of file Texture.cpp.
void Track::Texture::load_from_file | ( | ) | const [protected, virtual] |
Load the file and specify mipmap textures from it.
Definition at line 85 of file Texture.cpp.
GLuint * Track::Texture::load_gl_texture | ( | ) | const [protected] |
Create the OpenGL texture obect.
Definition at line 74 of file Texture.cpp.
void Track::Texture::make_cache | ( | ) | const |
Load the texture without binding it.
Loads the image file into an OpenGL texture. After the texture has been loaded, has no effect. Requires an OpenGL context.
Definition at line 61 of file Texture.cpp.
std::string Track::Texture::m_filename [protected] |
bool Track::Texture::m_has_alpha [mutable, protected] |
unsigned int Track::Texture::m_height [mutable, protected] |
GLenum Track::Texture::m_target [mutable, protected] |
GLuint Track::Texture::m_texture_name [mutable, protected] |
boost::shared_ptr<GLuint> Track::Texture::m_texture_name_ref [mutable, protected] |
unsigned int Track::Texture::m_width [mutable, protected] |
Generated at Mon Sep 6 00:41:19 2010 by Doxygen version 1.4.7 for Racer version svn335.