]> git.tdb.fi Git - libs/gl.git/blobdiff - source/programdata.h
Add class Technique to share passes between Objects
[libs/gl.git] / source / programdata.h
index 495ea22f3a5be143fe498c1d9ce8ae7ee5bb91d3..4d7938bf1dc7850bd4021f81cf21bdf4df19d1ac 100644 (file)
@@ -9,6 +9,7 @@ Distributed under the LGPL
 #define MSP_GL_PROGRAMDATA_H_
 
 #include <map>
+#include <msp/datafile/loader.h>
 
 namespace Msp {
 namespace GL {
@@ -16,8 +17,28 @@ namespace GL {
 class Program;
 class Uniform;
 
+/**
+Stores uniform variables for a shader program.
+*/
 class ProgramData
 {
+public:
+       class Loader: public DataFile::Loader
+       {
+       private:
+               ProgramData &pdata;
+               Program &prog;
+
+       public:
+               Loader(ProgramData &, Program &);
+       private:
+               void uniform1i(const std::string &, int);
+               void uniform1f(const std::string &, float);
+               void uniform2f(const std::string &, float, float);
+               void uniform3f(const std::string &, float, float, float);
+               void uniform4f(const std::string &, float, float, float, float);
+       };
+
 private:
        std::map<int, Uniform *> data;