]> git.tdb.fi Git - libs/gl.git/blobdiff - source/render/programdata.h
Update and improve documentation
[libs/gl.git] / source / render / programdata.h
index 4e8ee37302a90b23a7d64f05cd4ce7cb024586f2..9d08219ef84368943f6cb4535466bc61a1c742af 100644 (file)
@@ -26,10 +26,11 @@ class UniformBlock;
 struct Color;
 
 /**
-Stores uniform variables for shader programs.  The uniforms are stored in a
-program-independent way, and UniformBlocks are created to match the uniform
-layouts of different programs.  If multiple programs have the same layout, the
-same block is used for them.
+Stores uniform values for shader programs.
+
+The uniforms are stored in a program-independent way, and UniformBlocks are
+created to match the uniform layouts of different programs.  If multiple
+programs have the same layout, the same block is used for them.
 
 The class is optimized for an access pattern where the set of uniforms and
 programs stays constants, with only the values changing.
@@ -243,6 +244,8 @@ private:
 
        std::vector<ProgramBlock>::const_iterator prepare_program(const Program &) const;
 public:
+       /** Creates or updates UniformBlocks for a specific program if necessary,
+       then sets them to the PipelineState. */
        void apply(const Program &, PipelineState &) const;
 
        void set_debug_name(const std::string &);