X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Funiform.h;h=5d288cf50e29485701bb125830aebe4504d0ae07;hb=4af69ec90120a0be828a1ae475a38674087110b5;hp=ad2d88cc477715021baea7a4f7df4798b43173e7;hpb=ed7ca8892daceebb963950945fed5e75bd96a8a1;p=libs%2Fgl.git diff --git a/source/uniform.h b/source/uniform.h index ad2d88cc..5d288cf5 100644 --- a/source/uniform.h +++ b/source/uniform.h @@ -36,6 +36,8 @@ private: public: UniformScalar(Type v): value(v) { } + Type get() const { return value; } + virtual void apply(int index) const { apply(index, 1, &value); } @@ -69,6 +71,8 @@ public: UniformVector(const T *vp) { std::copy(vp, vp+vecsize, value); } + BaseType get(unsigned i) const { return value[i]; } + virtual void apply(int index) const { apply(index, 1, value); }