I have a C++ / OpenGl / Glut application that has an orthographic projection.
The window is 500 x 500 pixels wide. Currently when a mouse click occurs, the point will be between (0,0) and (500, 500).
I would like to either take that point and convert it to be between (0,0) and (0,1) (normalize it), or request the glutMouseFunc() send back x and y values in the range [0,1]. Is this possible? Or should I look at a more mathematical way to convert the x and y values one at a time to a normalized value?
take window size and divide it by mouse coordinates.