]> git.tdb.fi Git - libs/gl.git/blobdiff - source/texture2d.h
Include the local gl.h in types.h to make it work on win32
[libs/gl.git] / source / texture2d.h
index 251561b99490c5ca93166bd9679e121a3fbc92d2..30eab26c47d648cd91bbc6ec7aab4c542ec7322e 100644 (file)
@@ -9,17 +9,31 @@ Distributed under the LGPL
 #define MSP_GL_TEXTURE2D_H_
 
 #include <string>
+#include <msp/datafile/loader.h>
 #include "pixelformat.h"
 #include "texture.h"
 
 namespace Msp {
 namespace GL {
 
+class Image;
+
 /**
 Two-dimensional texture class.  This is the most common type of texture.
 */
 class Texture2D: public Texture
 {
+public:
+       class Loader: public Texture::Loader
+       {
+       public:
+               Loader(Texture2D &);
+       private:
+               void image_data(const std::string &);
+               void raw_data(const std::string &);
+               void storage(PixelFormat, unsigned, unsigned, unsigned);
+       };
+
 private:
        PixelFormat ifmt;
        sizei width;
@@ -56,6 +70,9 @@ public:
 
        sizei get_width() const  { return width; }
        sizei get_height() const { return height; }
+
+private:
+       void image(const Image &);
 };
 
 } // namespace GL