- Uniform4f(float v0, float v1, float v2, float v3);
- virtual void apply(int index) const;
+ UniformArray(unsigned n, const BaseType *vp):
+ size(n)
+ {
+ unsigned elemsize = sizeof(typename T::Type)/sizeof(typename T::BaseType);
+ values = new BaseType[elemsize*size];
+ std::copy(vp, vp+elemsize*size, values);
+ }
+
+ virtual void apply(int index) const
+ { T::apply(index, size, values); }
+
+ virtual UniformArray *clone() const
+ { return new UniformArray(size, values); }