X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fprogramdata.h;h=591ffee347f7dfe6bf97a3e1ef9b9772f87c101a;hb=927a1aa0a3a27e463ec0efc08bd08e7c4e969909;hp=495ea22f3a5be143fe498c1d9ce8ae7ee5bb91d3;hpb=85e83ace47e5a9a8ae7263886255dd81afc69278;p=libs%2Fgl.git diff --git a/source/programdata.h b/source/programdata.h index 495ea22f..591ffee3 100644 --- a/source/programdata.h +++ b/source/programdata.h @@ -9,6 +9,7 @@ Distributed under the LGPL #define MSP_GL_PROGRAMDATA_H_ #include +#include namespace Msp { namespace GL { @@ -16,8 +17,27 @@ namespace GL { class Program; class Uniform; +/** +Stores uniform variables for a shader program. +*/ class ProgramData { +public: + class Loader: public DataFile::ObjectLoader + { + private: + 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 data;