X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Funiformblock.h;h=02e9086ef4ed75bdf118ca2fe41fd21ac4f74637;hb=HEAD;hp=d694e3674a48e07f56e4abfdd512d149f8c2e547;hpb=2b779717e42b514210f7128cf9aee2276650e003;p=libs%2Fgl.git diff --git a/source/uniformblock.h b/source/uniformblock.h deleted file mode 100644 index d694e367..00000000 --- a/source/uniformblock.h +++ /dev/null @@ -1,53 +0,0 @@ -#ifndef MSP_GL_UNIFORMBLOCK_H_ -#define MSP_GL_UNIFORMBLOCK_H_ - -#include -#include -#include "bufferable.h" -#include "program.h" -#include "vector.h" - -namespace Msp { -namespace GL { - -class BufferRange; -class Color; -class Matrix; -class Uniform; - -/** -Stores uniforms with a specific layout. Both named and default uniform blocks -are supported. -*/ -class UniformBlock: public Bufferable -{ -private: - std::map uniforms; - unsigned size; - std::vector data; - mutable BufferRange *buf_range; - - UniformBlock(const UniformBlock &); - UniformBlock &operator=(const UniformBlock &); -public: - UniformBlock(); - UniformBlock(unsigned); - ~UniformBlock(); - -private: - virtual unsigned get_data_size() const { return size; } - virtual unsigned get_alignment() const; - virtual void offset_changed(); - virtual void upload_data() const; - -public: - void attach(int, const Uniform &); - void attach(const Program::UniformInfo &, const Uniform &); - - void apply(int) const; -}; - -} // namespace GL -} // namespace Msp - -#endif