X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=util.h;h=e102f2115612ede741798f86e58fec3a718622a4;hp=e4474d375eb0fae524c39ea5f0b92adc42815525;hb=06ba8d86c019208682d8883dc7187df37b027814;hpb=185ced44b129739c9b5438da691e71d664d6443a diff --git a/util.h b/util.h index e4474d3..e102f21 100644 --- a/util.h +++ b/util.h @@ -38,6 +38,11 @@ void print_3x3_matrix(const Eigen::Matrix3d &m); // Output a GLSL 3x3 matrix declaration. std::string output_glsl_mat3(const std::string &name, const Eigen::Matrix3d &m); +// Output GLSL scalar, 2-length and 3-length vector declarations. +std::string output_glsl_float(const std::string &name, float x); +std::string output_glsl_vec2(const std::string &name, float x, float y); +std::string output_glsl_vec3(const std::string &name, float x, float y, float z); + // Calculate a / b, rounding up. Does not handle overflow correctly. unsigned div_round_up(unsigned a, unsigned b);