Go to the documentation of this file.00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 #ifndef __GELTEXTURE_H__
00017 #define __GELTEXTURE_H__
00018 
00019 #include "gel.h"
00020 #include "gelImage.h"
00021 
00022 namespace gel
00023 {
00024         class GelTexture
00025     {
00026         public:
00028             GelTexture();
00029 
00031 
00033             GelTexture( const GelString &filename, ImageType type, TextureFilter filter = GEL_LINEAR, TextureWrap wrap = GEL_NO_REPEAT );
00034 
00036 
00038             GelTexture( GelImageData *image, TextureFilter filter = GEL_LINEAR, TextureWrap wrap = GEL_NO_REPEAT );
00039 
00041             ~GelTexture();
00042 
00044 
00051             void load( const GelString &filename, ImageType type, TextureFilter filter = GEL_LINEAR, TextureWrap wrap = GEL_NO_REPEAT );
00052 
00054 
00060             void loadOverlay( const GelString &filename, ImageType type, int xoffset, int yoffset );
00061 
00063 
00072             void load( GelImageData *image, TextureFilter filter = GEL_LINEAR, TextureWrap wrap = GEL_NO_REPEAT );
00073 
00075 
00078             void setFilterMode( TextureFilter mode );
00079 
00081 
00084             void setWrapMode( TextureWrap mode );
00085 
00087 
00089             void setTexFunc( TextureFunction mode );
00090 
00092 
00093             int getWidth() const { return width; }
00094 
00096 
00097             int getHeight() const { return height; }
00098 
00100 
00101             int getRealWidth() const { return rwidth; }
00102 
00104 
00105             int getRealHeight() const { return rheight; }
00106 
00108 
00109             ColorMode getFormat() const { return format; }
00110 
00112 
00113             int getBpp() const { return bpp; }
00114 
00116 
00117             GELuint getID() const { return texID; }
00118 
00119         private:
00120             int width;
00121             int height;
00122             int rwidth;
00123             int rheight;
00124             int bpp;
00125             ColorMode format;
00126             GELuint texID;
00127     };
00128 }
00129 
00130 #endif // __GELTEXTURE_H__