00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef TEXTURE_H
00019 #define TEXTURE_H
00020
00021 #include "allincludes.h"
00022 #include "GL/gl.h"
00023 #include "GL/glpng.h"
00024
00029 enum AlphaModes { BLEND_SOLID, BLEND_ALPHA, BLEND_STENCIL, BLEND_RGBDIST, BLEND_RGB };
00030
00031 class Texture {
00032 public:
00034 Texture( const char *texturefile, enum AlphaModes alpha, bool mipmap, int minfilter, int magfilter, int wrapmode );
00035 ~Texture();
00036
00038 int width() { return twidth; }
00040 int height() { return theight; }
00042 GLint getTextureID() { return texture_id; }
00044 const char *getFilename() { return filename; }
00046 bool isSameFile( const char *fname );
00047
00048 private:
00049 GLint texture_id;
00050 int twidth, theight;
00051 const char *filename;
00052 };
00053
00054 #endif