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.
20 // Convenience functions that deal with prepending the prefix.
21 GLint get_uniform_location(GLuint glsl_program_num, const std::string &prefix, const std::string &key);
22 void set_uniform_int(GLuint glsl_program_num, const std::string &prefix, const std::string &key, int value);
23 void set_uniform_float(GLuint glsl_program_num, const std::string &prefix, const std::string &key, float value);
24 void set_uniform_vec2(GLuint glsl_program_num, const std::string &prefix, const std::string &key, const float *values);
25 void set_uniform_vec3(GLuint glsl_program_num, const std::string &prefix, const std::string &key, const float *values);
26 void set_uniform_vec4(GLuint glsl_program_num, const std::string &prefix, const std::string &key, const float *values);
27 void set_uniform_vec4_array(GLuint glsl_program_num, const std::string &prefix, const std::string &key, const float *values, size_t num_values);
28 void set_uniform_mat3(GLuint glsl_program_num, const std::string &prefix, const std::string &key, const Eigen::Matrix3d &matrix);
30 #endif // !defined(_MOVIT_EFFECT_UTIL_H)