\brief This file contains the the classes #Texture and #TextureHandler, which are used *surprise* for texture handling.
Whenever you need to load textures you just have to call #TextureHandler::getTexture(filename). If it returns a valid pointer to #Texture object you can bind it in OpenGL via \c Texture->texName. If #TextureHandler::getTexture() returns \c NULL the file couldn't be opened or the format is not known. To avoid the first you can set/change the #TetureHandler::searchPath.
The following image formats are supported: BMP, PNM (PPM/PGM/PBM), XPM, LBM, PCX, GIF, JPEG, PNG, TGA, TIFF and RGB/RGBA (SGI). RGB is supported through my own loader in rgbloader.h, all other formats are loaded by SDL_image routines (see imageloader.h).
*/
#ifdef WIN32
#include <windows.h>
#endif
#include <GL/gl.h>
#include <GL/glu.h>
#include "ImageLoader.h"
//! wraps an OpenGL texture
/*!
Since the constructors automatically generate an OpenGL texture object, an OpenGL context MUST be present, when you construct an object of this class.
*/
class Texture{
public:
int width; //!< width of the texture
int height; //!< height of the texture
bool hasAlpha; //!< does the texture have an alpha channel?
char* filename; //!< filename of the image file
GLuint texName; //!< the OpenGL texture object name
GLuint texType; //!< the OpenGL texture type (RGB, RGB, LUMINANCE, ...)
GLclampf priority; //!< the OpenGL texture priority