]> git.tdb.fi Git - libs/gl.git/blobdiff - source/objectpass.h
Use DevIL for loading images
[libs/gl.git] / source / objectpass.h
diff --git a/source/objectpass.h b/source/objectpass.h
new file mode 100644 (file)
index 0000000..59a1dfb
--- /dev/null
@@ -0,0 +1,48 @@
+/* $Id$
+
+This file is part of libmspgl
+Copyright © 2007  Mikko Rasa, Mikkosoft Productions
+Distributed under the LGPL
+*/
+
+#ifndef MSP_GL_OBJECTPASS_H_
+#define MSP_GL_OBJECTPASS_H_
+
+#include <msp/datafile/collection.h>
+
+namespace Msp {
+namespace GL {
+
+class Program;
+class ProgramData;
+
+struct ObjectPass
+{
+       class Loader: public DataFile::Loader
+       {
+       public:
+               typedef DataFile::Collection Collection;
+
+       private:
+               ObjectPass &pass;
+               Collection &coll;
+
+       public:
+               Loader(ObjectPass &, Collection &);
+               ObjectPass &get_object() const { return pass; }
+               Collection &get_collection() const { return coll; }
+       private:
+               void shader(const std::string &);
+       };
+
+       Program *shprog;
+       ProgramData *shdata;
+
+       ObjectPass();
+       ~ObjectPass();
+};
+
+} // namespace GL
+} // namespace Msp
+
+#endif