Take care when you are defining a floating point number as a constant. 0.0 is a double by default for the compiler (i.e 64 bit) . Add an f after each of your floating point number, so the compiler know that you want a float (32bits), and your code should compile. Because glm::vec2 contain 2 numbers of type float, not double. The overloaded / operator with double is not defined for glm::vec2. As an advice, try to avoid mixing floating point data type when you are doing floating point arithmetic.