00001 #ifndef LOPER_GLTEXPICTURE
00002 #define LOPER_GLTEXPICTURE
00003
00014 #include "standard.hpp"
00015 #include "PortableBitmap.hpp"
00016 #include "PortablePixmap.hpp"
00017 #include <GL/gl.h>
00018 #include <map>
00019
00026 class GLTexPicture
00027 {
00028 public:
00029 GLTexPicture();
00030
00031 GLTexPicture & operator=(const GLTexPicture &p);
00032 GLTexPicture(const GLTexPicture &p);
00033
00034 void create (const PortablePixmap &img);
00035 void create (const PortableBitmap &img);
00036
00037 void draw (float originX, float originY);
00038
00039 void draw (float originX, float originY, float width, float height);
00040
00041 ~GLTexPicture();
00042
00043 private:
00044
00045 static std::map< int, int > textureIds;
00046 void cleanup();
00047
00048 int m_originalWidth, m_originalHeight;
00049 HGLRC m_hglrc;
00050 unsigned int m_texture_id;
00051 };
00052
00053 #endif // LOPER_GLTEXPICTURE