[ACCEPTED]-glm::rotate() call fails to compile?-glm-math

Accepted answer
Score: 24

I don't know enough about templates to give 7 you a great answer, but I believe from my 6 memory of GLM is that it was very picky 5 about types.

Can you try explicitly changing 4 45 to 45.f to see if it accepts that? I think 3 you need to have consistent parameters (float 2 matrix, float, float vector). I think the 1 int confuses it somehow.

Score: 2
glm::rotate(Model, (glm::mediump_float)45, glm::vec3(1,0,0));

I found that this cast is helping because 3 of the type used in glm::vec3 as template.

This function 2 is that defined:

glm::detail::tmat4x4<glm::lowp_float> glm::rotate<glm::lowp_float> ( const glm::detail::tmat4x4<glm::lowp_float> &m, const glm::lowp_float &angle, const glm::detail::tvec3<glm::mediump_float> &axis)

So you must use appropriate 1 type in your angle value.

More Related questions