uniforms_vec4.push_back(uniform);
}
+void Effect::register_uniform_float_array(const std::string &key, const float *values, size_t num_values)
+{
+ Uniform<float> uniform;
+ uniform.name = key;
+ uniform.value = values;
+ uniform.num_values = num_values;
+ uniform.location = -1;
+ uniforms_float_array.push_back(uniform);
+}
+
void Effect::register_uniform_vec2_array(const std::string &key, const float *values, size_t num_values)
{
Uniform<float> uniform;
uniforms_vec2_array.push_back(uniform);
}
+void Effect::register_uniform_vec3_array(const std::string &key, const float *values, size_t num_values)
+{
+ Uniform<float> uniform;
+ uniform.name = key;
+ uniform.value = values;
+ uniform.num_values = num_values;
+ uniform.location = -1;
+ uniforms_vec3_array.push_back(uniform);
+}
+
void Effect::register_uniform_vec4_array(const std::string &key, const float *values, size_t num_values)
{
Uniform<float> uniform;
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);
std::vector<Uniform<float> > uniforms_vec2;
std::vector<Uniform<float> > uniforms_vec3;
std::vector<Uniform<float> > uniforms_vec4;
+ std::vector<Uniform<float> > uniforms_float_array;
std::vector<Uniform<float> > uniforms_vec2_array;
+ std::vector<Uniform<float> > uniforms_vec3_array;
std::vector<Uniform<float> > uniforms_vec4_array;
std::vector<Uniform<Eigen::Matrix3d> > uniforms_mat3;
friend class EffectChain;
extract_uniform_declarations(effect->uniforms_vec2, "vec2", effect_id, &phase->uniforms_vec2, &frag_shader_uniforms);
extract_uniform_declarations(effect->uniforms_vec3, "vec3", effect_id, &phase->uniforms_vec3, &frag_shader_uniforms);
extract_uniform_declarations(effect->uniforms_vec4, "vec4", effect_id, &phase->uniforms_vec4, &frag_shader_uniforms);
+ extract_uniform_array_declarations(effect->uniforms_float_array, "float", effect_id, &phase->uniforms_float, &frag_shader_uniforms);
extract_uniform_array_declarations(effect->uniforms_vec2_array, "vec2", effect_id, &phase->uniforms_vec2, &frag_shader_uniforms);
+ extract_uniform_array_declarations(effect->uniforms_vec3_array, "vec3", effect_id, &phase->uniforms_vec3, &frag_shader_uniforms);
extract_uniform_array_declarations(effect->uniforms_vec4_array, "vec4", effect_id, &phase->uniforms_vec4, &frag_shader_uniforms);
extract_uniform_declarations(effect->uniforms_mat3, "mat3", effect_id, &phase->uniforms_mat3, &frag_shader_uniforms);
}
// changes, even within git versions. There is no specific version
// documentation outside the regular changelogs, though.
-#define MOVIT_VERSION 12
+#define MOVIT_VERSION 13
#endif // !defined(_MOVIT_VERSION_H)