public:
virtual ~Uniform() { }
- virtual void apply(int) const = 0;
virtual void store(const ReflectData::UniformInfo &, void *) const = 0;
virtual Uniform *clone() const = 0;
};
Type get() const { return value; }
- virtual void apply(int index) const
- { apply(index, 1, &value); }
-
- static void apply(int, unsigned, const T *);
-
virtual void store(const ReflectData::UniformInfo &info, void *buffer) const
{ store(info, buffer, &value); }
BaseType get(unsigned i) const { return value[i]; }
- virtual void apply(int index) const
- { apply(index, 1, value); }
-
- static void apply(int index, unsigned size, const T *value);
-
virtual void store(const ReflectData::UniformInfo &info, void *buffer) const
{ store(info, buffer, value); }
void set(const T *vp)
{ std::copy(vp, vp+rows*cols, value); }
- virtual void apply(int index) const
- { apply(index, 1, value); }
-
- static void apply(int index, unsigned size, const T *value);
-
virtual void store(const ReflectData::UniformInfo &info, void *buffer) const
{ store(info, buffer, value); }
void set(const BaseType *vp)
{ std::copy(vp, vp+elemsize*size_, values); }
- virtual void apply(int index) const
- { T::apply(index, size_, values); }
-
virtual void store(const ReflectData::UniformInfo &info, void *buffer) const
{
for(unsigned i=0; i<size_; ++i)