]> git.tdb.fi Git - libs/gl.git/blobdiff - source/program.h
Inherit Loaders from the ObjectLoader classes
[libs/gl.git] / source / program.h
index fde4d85439a2cfe9e7cb82a62aebd965f111d082..818e72be1174d4a0464bc91b5a691d8f54efd602 100644 (file)
@@ -10,7 +10,7 @@ Distributed under the LGPL
 
 #include <list>
 #include <string>
-#include <msp/datafile/loader.h>
+#include <msp/datafile/objectloader.h>
 #include "gl.h"
 #include "types.h"
 
@@ -27,14 +27,11 @@ private:
        bool del_shaders;
        bool linked;
 
-       static Program *cur_prog;
+       static const Program *cur_prog;
 
 public:
-       class Loader: public DataFile::Loader
+       class Loader: public DataFile::ObjectLoader<Program>
        {
-       private:
-               Program &prog;
-
        public:
                Loader(Program &);
 
@@ -61,7 +58,7 @@ public:
        int get_param(GLenum param) const;
        bool get_linked() const { return linked; }
        std::string get_info_log() const;
-       void bind();
+       void bind() const;
        int get_uniform_location(const std::string &) const;
 
        static void unbind();