1 #ifndef MSP_GL_UNIFORMBLOCK_H_
2 #define MSP_GL_UNIFORMBLOCK_H_
5 #include <msp/core/noncopyable.h>
6 #include "bufferable.h"
7 #include "reflectdata.h"
8 #include "uniformblock_backend.h"
14 Stores uniforms with a specific layout. Both named and default uniform blocks
17 class UniformBlock: public UniformBlockBackend, public NonCopyable, public Bufferable
20 std::vector<char> data;
23 UniformBlock(const ReflectData::UniformBlockInfo &);
25 virtual unsigned get_data_size() const { return data.size(); }
26 virtual const void *get_data_pointer() const { return &data[0]; }
28 virtual unsigned get_alignment() const;
31 void store(const ReflectData::UniformInfo &, unsigned, const void *);