X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fprogramdata.h;h=e96a73acc651ba8ec9a1ab2b3af1cf77f337c4bc;hp=c367097bd886752fc94697ebfeb5c013acdffb64;hb=bec07999d95b76f4b47cffcc564d0cd0afc0435e;hpb=4af69ec90120a0be828a1ae475a38674087110b5 diff --git a/source/programdata.h b/source/programdata.h index c367097b..e96a73ac 100644 --- a/source/programdata.h +++ b/source/programdata.h @@ -2,6 +2,7 @@ #define MSP_GL_PROGRAMDATA_H_ #include +#include #include #include "datatype.h" #include "matrix.h" @@ -11,6 +12,13 @@ namespace Msp { namespace GL { +class too_many_uniforms: public std::runtime_error +{ +public: + too_many_uniforms(const std::string &w): std::runtime_error(w) { } + virtual ~too_many_uniforms() throw() { } +}; + class Buffer; class Uniform; class UniformBlock; @@ -161,6 +169,12 @@ public: private: void uniform(const std::string &, Uniform *); + template + void uniform(const std::string &, V); + template + void uniform_array(const std::string &, unsigned, V); + bool validate_name(const std::string &) const; + void add_uniform(const std::string &, Uniform *); public: void uniform(const std::string &, const Uniform &); void uniform(const std::string &, int);