X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=effect.h;h=67e64238beb2bdc590f75ed83327b045d3e80c29;hp=ebbb6726104051caaba9b4e58df21279682dc1f3;hb=e766478d4a236074000a6a17be9cba6e8b1576f3;hpb=6ec130490868eb8316cb2cdce9fbfd237d25a00e diff --git a/effect.h b/effect.h index ebbb672..67e6423 100644 --- a/effect.h +++ b/effect.h @@ -316,11 +316,8 @@ protected: // // Neither of these take ownership of the pointer. - // int is special since GLSL pre-1.30 doesn't have integer uniforms. - // Thus, ints that you register will _not_ be converted to GLSL uniforms. + // These correspond directly to int/float/vec2/vec3/vec4 in GLSL. void register_int(const std::string &key, int *value); - - // These correspond directly to float/vec2/vec3/vec4 in GLSL. void register_float(const std::string &key, float *value); void register_vec2(const std::string &key, float *values); void register_vec3(const std::string &key, float *values); @@ -353,7 +350,9 @@ protected: void register_uniform_vec2(const std::string &key, const float *values); void register_uniform_vec3(const std::string &key, const float *values); void register_uniform_vec4(const std::string &key, const float *values); + void register_uniform_float_array(const std::string &key, const float *values, size_t num_values); void register_uniform_vec2_array(const std::string &key, const float *values, size_t num_values); + void register_uniform_vec3_array(const std::string &key, const float *values, size_t num_values); void register_uniform_vec4_array(const std::string &key, const float *values, size_t num_values); void register_uniform_mat3(const std::string &key, const Eigen::Matrix3d *matrix); @@ -372,7 +371,9 @@ private: std::vector > uniforms_vec2; std::vector > uniforms_vec3; std::vector > uniforms_vec4; + std::vector > uniforms_float_array; std::vector > uniforms_vec2_array; + std::vector > uniforms_vec3_array; std::vector > uniforms_vec4_array; std::vector > uniforms_mat3; friend class EffectChain;