# glm::perspective isn't working?

So I'm learning how to make games and program, and while trying to setup a projection camera using GLM in GFLW, this line of code refuses to work and I can't figuire out why. The code is in the image below. Thanks!

• Side note: Posting the code as text in the future would be helpful. – Luke Briggs Nov 20 '16 at 6:02

The message you're seeing is saying your argument types aren't right. As 3 of the arguments are float values and they correctly match, then that means m_windowWidth / m_windowHeight must be an integer when it needs to be a float. So, try:
glm::perspective(45.0f, m_windowWidth / static_cast<float>(m_windowHeight), 0.1f, 100f);

• @Alalayo that is not going to be 100% correct. m_windowWidth / m_windowHeight is an int expression which will be calculated as int (truncating the numbers after the decimal) and only after the truncation will the number be converted to floating point. Instead convert one or both of the variables to float. – ratchet freak Nov 21 '16 at 17:08