]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/uniformblock.h
Use size_t to store sizes of buffers and such
[libs/gl.git] / source / core / uniformblock.h
index ec42089a8823bb46ea75f8e94467b766f2d40459..5e88f0f80de81919ebcc510defaccc6f778e7b47 100644 (file)
@@ -5,6 +5,7 @@
 #include <msp/core/noncopyable.h>
 #include "bufferable.h"
 #include "reflectdata.h"
+#include "uniformblock_backend.h"
 
 namespace Msp {
 namespace GL {
@@ -13,7 +14,7 @@ namespace GL {
 Stores uniforms with a specific layout.  Both named and default uniform blocks
 are supported.
 */
-class UniformBlock: public NonCopyable, public Bufferable
+class UniformBlock: public UniformBlockBackend, public NonCopyable, public Bufferable
 {
 private:
        std::vector<char> data;
@@ -21,13 +22,13 @@ private:
 public:
        UniformBlock(const ReflectData::UniformBlockInfo &);
 
-       virtual unsigned get_data_size() const { return data.size(); }
+       virtual std::size_t get_data_size() const { return data.size(); }
        virtual const void *get_data_pointer() const { return &data[0]; }
 private:
-       virtual unsigned get_alignment() const;
+       virtual std::size_t get_alignment() const;
 
 public:
-       void store(const ReflectData::UniformInfo &, unsigned, const void *);
+       void store(const ReflectData::UniformInfo &, std::size_t, const void *);
 };
 
 } // namespace GL