glm::ortho

Hey, can anyone spot this one? It's starting to frustrate me a little.

I'm using glm as a matrix library in my engine. It has it's own ortho function, similar to glOrtho. I was using it as such:

 
m_projectionMatrix = glm::ortho(0.f, static_cast<float>(m_windowWidth), static_cast<float>(m_windowHeight), 1.f, -1.f);


It worked fine. To be clear, the parameters passed in here would all be floats, which is what is required, and the assignment to the matrix, which is a glm::mat4 type, works fine.

However, I'm doing a bit of refactoring and have moved this to a different file. All of the types are the same and I'm including the same files. However, I'm getting a 'no viable overload' error for the assignment operator. Tried swapping out those casted floats to literal floats to see if it made any difference to no avail.

A bit stumped here. Was just wondering if had experienced anything similar using glm.
Last edited on
I'm a huge tool.

Accidentally put a const qualifier on the end of the function I'd move it to. That said, Xcode's error message was hardly indicative of the problem. o___o
Last edited on
Topic archived. No new replies allowed.