1 #ifndef MSP_GL_UNIFORMBLOCK_H_
2 #define MSP_GL_UNIFORMBLOCK_H_
6 #include "bufferable.h"
19 class UniformBlock: public Bufferable
22 std::map<int, const Uniform *> uniforms;
24 std::vector<char> data;
25 mutable BufferRange *buf_range;
27 UniformBlock(const UniformBlock &);
28 UniformBlock &operator=(const UniformBlock &);
31 UniformBlock(unsigned);
35 virtual unsigned get_data_size() const { return size; }
36 virtual unsigned get_alignment() const;
37 virtual void offset_changed();
38 virtual void upload_data() const;
41 void attach(int, const Uniform &);
42 void attach(const Program::UniformInfo &, const Uniform &);
44 void apply(int) const;