X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=util.h;fp=util.h;h=f57af77691befa0afa80bb943f7d11a6e54aeadd;hp=e4474d375eb0fae524c39ea5f0b92adc42815525;hb=d88ed3150376693000665b9016c0350d5d90e9e1;hpb=8ae12f557394d1745f39c843d56fc4cf75167266 diff --git a/util.h b/util.h index e4474d3..f57af77 100644 --- a/util.h +++ b/util.h @@ -38,6 +38,10 @@ 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 2-length and 3-length vector declarations. +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);