Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

Texture Class Reference

A single OpenGL texture. More...

#include <model.h>

Inherited by _classes_ [private].

Inheritance diagram for Texture:

Inheritance graph
[legend]
List of all members.

Public Methods

 Texture (const std::string &file)
 This constructor opens file and generates an openGl texture using that data. handle is set to that value. More...

 ~Texture ()
void Bind ()
 This calls the opengl bind function. This does not do anything if handle == last_handle to save time and then sets last_handle to this handle. More...

bool operator< (const Texture &oth) const
 This is used only for sorting... even though there is no real < for textures. More...

bool operator== (const Texture &oth) const
 Used for comparism between two textures. More...


Private Methods

 Texture (const Texture &)
 Private copy constructor to generate errors. More...

Texture & operator= (const Texture &)
 Private = operator to generate errors. More...


Private Attributes

int handle
 An OpenGL handle to the texture. More...


Static Private Attributes

int last_handle
 Used to make sure that Model s that call Draw two times do not have to Bind the texture more than one time. More...


Detailed Description

A single OpenGL texture.


Constructor & Destructor Documentation

Texture::Texture const Texture &    [inline, private]
 

Private copy constructor to generate errors.

00007 {}

Texture::Texture const std::string &    file
 

This constructor opens file and generates an openGl texture using that data. handle is set to that value.

00013                                     {
00014     assert(0);
00015 }

Texture::~Texture  
 

00016                    {
00017     assert(0);
00018 }


Member Function Documentation

void Texture::Bind  
 

This calls the opengl bind function. This does not do anything if handle == last_handle to save time and then sets last_handle to this handle.

bool Texture::operator< const Texture &    oth const [inline]
 

This is used only for sorting... even though there is no real < for textures.

00020                                               {
00021         return handle<oth.handle;
00022     }

Texture& Texture::operator= const Texture &    [inline, private]
 

Private = operator to generate errors.

00009 {return *this;}

bool Texture::operator== const Texture &    oth const [inline]
 

Used for comparism between two textures.

00024                                                {
00025         return (handle==oth.handle);
00026     }


Member Data Documentation

int Texture::handle [private]
 

An OpenGL handle to the texture.

int Texture::last_handle [static, private]
 

Used to make sure that Model s that call Draw two times do not have to Bind the texture more than one time.


The documentation for this class was generated from the following files:
Generated on Mon Jul 7 21:13:56 2003 for Ethereal by doxygen1.2.15