Xface Core Library: XEngine::TextureLoaderGL Class Reference

XFace / XEngine / XMath

XEngine::TextureLoaderGL Class Reference
[XEngine]

#include <TextureLoaderGL.h>

Inheritance diagram for XEngine::TextureLoaderGL:

XEngine::ITextureLoader List of all members.

Detailed Description

Author:
Koray Balci
Version:
1.0
Date:
August 2002
Loads the textures from files (later might create textures dynamically) using OpenGL function calls and stores the texture list. Deletes the textures on exit. An STL list is used to store the textures.

Note:
Do NOT destroy the instance of this class if you still want to use the textures created by it. It DELETEs all the textures created by this instance.
In the framework, it is used in TextureManager class as a member variable. So, if possible use TextureManager to load/unload and manage your textures.


Public Member Functions

void unLoad (const ITexture *pTexture)
 Unloads the OpenGL texture from the ITexture instance.
bool load (const std::string &filename, ITexture *pTexture)
 Loads the texture with the filename to the ITexture instance.
 TextureLoaderGL ()
 Default constructor.
virtual ~TextureLoaderGL ()

Constructor & Destructor Documentation

XEngine::TextureLoaderGL::~TextureLoaderGL  )  [virtual]
 

IMPORTANT: Clears the texture list and deletes the textures if there are any.


Member Function Documentation

bool XEngine::TextureLoaderGL::load const std::string &  filename,
ITexture pTexture
[virtual]
 

Loads a texture from a file and attaches it to an ITexture object.

Parameters:
filename Path to an image file to load the texture.
pTexture A valid pointer to an existing ITexture instance to attach the loaded texture.
Note:
Currently only bitmap (using gluaux library) and tga files are supported.

Implements XEngine::ITextureLoader.

void XEngine::TextureLoaderGL::unLoad const ITexture pTexture  )  [virtual]
 

Unloads a texture attached to a Texture object.

Implements XEngine::ITextureLoader.


The documentation for this class was generated from the following files:
Generated on Mon Aug 28 15:39:26 2006 for Xface Core Library by  doxygen 1.4.6-NO