Texture Class Reference

An image that can be applied to a surface of a drawable object. More...

#include <Texture.h>

Inherited by CubeMap, and DepthMap.

Public Member Functions

 Texture ()
 Constructor. More...
 
 Texture (const TextureData &data)
 Constructor. More...
 
 Texture (GLuint textureID)
 Constructor. More...
 
virtual ~Texture ()
 Virtual destructor. More...
 
GLuint getTextureID ()
 Returns texture id. More...
 
virtual void bind (GLint texUnit=GL_TEXTURE0)
 Binds the texture. More...
 
virtual void deleteTexture ()
 Delete the OpenGL texture. More...
 

Detailed Description

An image that can be applied to a surface of a drawable object.

Author
Rahul Mukhi, David Steiner

Constructor & Destructor Documentation

Texture::Texture ( )
inline

Constructor.

This constructor generates a texture yet doesn't apply any settings or data

Texture::Texture ( const TextureData data)

Constructor.

Parameters
[in]dataThe texture data to be used
Texture::Texture ( GLuint  textureID)
inline

Constructor.

This constructor should only be used if the texture is already created (e.g. by an external library) and should be integrated in the framework

Parameters
[in]textureID
virtual Texture::~Texture ( )
inlinevirtual

Virtual destructor.

Member Function Documentation

void Texture::bind ( GLint  texUnit = GL_TEXTURE0)
virtual

Binds the texture.

Parameters
[in]texUnitSpecifies which texture unit to bind it to

Reimplemented in CubeMap.

virtual void Texture::deleteTexture ( )
inlinevirtual

Delete the OpenGL texture.

GLuint Texture::getTextureID ( )
inline

Returns texture id.