1 #ifndef _MOVIT_EFFECT_UTIL_H
2 #define _MOVIT_EFFECT_UTIL_H 1
4 // Utilities that are often useful for implementing Effect instances,
5 // but don't need to be included from effect.h.
22 // Convenience functions that deal with prepending the prefix.
23 GLint get_uniform_location(GLuint glsl_program_num, const std::string &prefix, const std::string &key);
24 void set_uniform_int(GLuint glsl_program_num, const std::string &prefix, const std::string &key, int value);
25 void set_uniform_float(GLuint glsl_program_num, const std::string &prefix, const std::string &key, float value);
26 void set_uniform_vec2(GLuint glsl_program_num, const std::string &prefix, const std::string &key, const float *values);
27 void set_uniform_vec3(GLuint glsl_program_num, const std::string &prefix, const std::string &key, const float *values);
28 void set_uniform_vec4(GLuint glsl_program_num, const std::string &prefix, const std::string &key, const float *values);
29 void set_uniform_vec2_array(GLuint glsl_program_num, const std::string &prefix, const std::string &key, const float *values, size_t num_values);
30 void set_uniform_vec4_array(GLuint glsl_program_num, const std::string &prefix, const std::string &key, const float *values, size_t num_values);
31 void set_uniform_mat3(GLuint glsl_program_num, const std::string &prefix, const std::string &key, const Eigen::Matrix3d &matrix);
35 #endif // !defined(_MOVIT_EFFECT_UTIL_H)