Texture Class Reference

Texture to be used with OpenGL. More...

#include <Texture.h>

List of all members.

Public Member Functions

 Texture ()
 Standard Constructor.
 Texture (const string &filename)
 Constructor.
 Texture (const Texture &source)
 Copy-constructor.
 Texture (const string &filename, const bool &noRepeat)
 Enhanced Constructor.
 ~Texture ()
 Destructor.
void bind ()
 Bind texture in OpenGL.
const string & getFilename () const
 Gets texture filename.
GLuint getGlName ()
 Gets OpenGL texture name.
virtual string toString () const
 Returns a textual representation.
virtual string className () const
 Returns the class name of the object.
virtual enum classId classId () const
 Returns the class id of the object.
Texture operator= (const Texture &tex)
 Operator =.

Private Attributes

struct textureEntrydata
 data of the texture


Detailed Description

Texture to be used with OpenGL.

Provides image loading, saving and texture binding.


Constructor & Destructor Documentation

Texture::Texture (  ) 

Standard Constructor.

Texture::Texture ( const string &  filename  ) 

Constructor.

If an invalid filename was choosen, a default image will be generated

Parameters:
filename The image to be loaded

Texture::Texture ( const Texture source  ) 

Copy-constructor.

Duplicates a texture

Texture::Texture ( const string &  filename,
const bool &  repeat 
)

Enhanced Constructor.

If an invalid filename was choosen, a default image will be generated

Parameters:
filename The image to be loaded
repeat Tells if texture is a repaetable tile

Texture::~Texture (  ) 

Destructor.

Destroys the Texture.


Member Function Documentation

void Texture::bind (  ) 

Bind texture in OpenGL.

Signals OpenGL to use this one as active texture

const string & Texture::getFilename (  )  const

Gets texture filename.

Returns:
The texture's image filename

GLuint Texture::getGlName (  ) 

Gets OpenGL texture name.

Returns:
The internal name (id) OpenGL has assigned this texture

string Texture::toString (  )  const [virtual]

Returns a textual representation.

Returns:
a string descriping the run-time object

string Texture::className (  )  const [virtual]

Returns the class name of the object.

Returns:
a string with the name of the object's class

enum classId Texture::classId (  )  const [virtual]

Returns the class id of the object.

Returns:
an id of the object's class

Texture Texture::operator= ( const Texture tex  )  [inline]

Operator =.


Member Data Documentation

struct textureEntry* Texture::data [read, private]

data of the texture


The documentation for this class was generated from the following files:

Generated on Mon Jul 7 13:30:35 2008 for Firefly by  doxygen 1.5.6