]> git.tdb.fi Git - libs/gl.git/blobdiff - source/render/programdata.h
Move WindowView::render to the backend
[libs/gl.git] / source / render / programdata.h
index 4e8ee37302a90b23a7d64f05cd4ce7cb024586f2..9b8a25cb15be498a916bf0ffcf28c868ea56bb02 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.
@@ -172,19 +173,26 @@ private:
        void mark_dirty(Mask);
 public:
        void uniform(Tag, int);
+       void uniform(Tag, unsigned);
        void uniform(Tag, float);
        void uniform(Tag, int, int);
+       void uniform(Tag, unsigned, unsigned);
        void uniform(Tag, float, float);
        void uniform2(Tag, const int *);
+       void uniform2(Tag, const unsigned *);
        void uniform2(Tag, const float *);
        void uniform(Tag, int, int, int);
+       void uniform(Tag, unsigned, unsigned, unsigned);
        void uniform(Tag, float, float, float);
        void uniform3(Tag, const int *);
+       void uniform3(Tag, const unsigned *);
        void uniform3(Tag, const float *);
        void uniform(Tag, int, int, int, int);
+       void uniform(Tag, unsigned, unsigned, unsigned, unsigned);
        void uniform(Tag, float, float, float, float);
        void uniform(Tag, const Color &);
        void uniform4(Tag, const int *);
+       void uniform4(Tag, const unsigned *);
        void uniform4(Tag, const float *);
        void uniform_matrix2(Tag, const float *);
        void uniform_matrix3x2(Tag, const float *);
@@ -197,14 +205,19 @@ public:
        void uniform(Tag, const Matrix &);
        void uniform_matrix4(Tag, const float *);
        void uniform_array(Tag, unsigned, const int *);
+       void uniform_array(Tag, unsigned, const unsigned *);
        void uniform_array(Tag, unsigned, const float *);
        void uniform1_array(Tag, unsigned, const int *);
+       void uniform1_array(Tag, unsigned, const unsigned *);
        void uniform1_array(Tag, unsigned, const float *);
        void uniform2_array(Tag, unsigned, const int *);
+       void uniform2_array(Tag, unsigned, const unsigned *);
        void uniform2_array(Tag, unsigned, const float *);
        void uniform3_array(Tag, unsigned, const int *);
+       void uniform3_array(Tag, unsigned, const unsigned *);
        void uniform3_array(Tag, unsigned, const float *);
        void uniform4_array(Tag, unsigned, const int *);
+       void uniform4_array(Tag, unsigned, const unsigned *);
        void uniform4_array(Tag, unsigned, const float *);
        void uniform_matrix2_array(Tag, unsigned, const float *);
        void uniform_matrix3x2_array(Tag, unsigned, const float *);
@@ -243,6 +256,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 &);