X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Funiformblock.h;h=a71dab25f71afa7108e0867cd9f4740417ac169a;hb=f73e671dcb36c097647cddbf5b1eaaad2ffc9299;hp=5e88f0f80de81919ebcc510defaccc6f778e7b47;hpb=be6ffe96ecb4707599fe1a6f620c348760213d46;p=libs%2Fgl.git diff --git a/source/core/uniformblock.h b/source/core/uniformblock.h index 5e88f0f8..a71dab25 100644 --- a/source/core/uniformblock.h +++ b/source/core/uniformblock.h @@ -11,8 +11,15 @@ namespace Msp { namespace GL { /** -Stores uniforms with a specific layout. Both named and default uniform blocks -are supported. +Stores uniform values in a block of memory. + +For named uniform blocks the values are stored according to the reflected +layout of the block, ready for use by shaders. For the default uniform block, +the location of the uniform is multiplied by 16 to obtain the memory offset. + +Applications normally don't need to deal with UniformBlocks directly. They're +managed by the ProgramData class, which provides a higher-level interface for +setting uniform values. */ class UniformBlock: public UniformBlockBackend, public NonCopyable, public Bufferable {