Convert windows mouse coordinates to opengl coordinates
Currently I am trying to click and drag drawings around in my opengl window however I don't know how to convert to opengl coordinates. I'm making a windows application so I don't want to use external libraries such as glut so I'll learn how to do this in c++. I'm currently getting the mouse position GET_X_LPARAM(lparam), GET_Y_LPARAM(lparam).
Can anyone help?
If you don't want to use libraries (not sure why glm is operating system independant) then you have to reverse this logic http://www.songho.ca/opengl/gl_transform.html