I have been trying to get world coordinates of the cursor position for a program by:
- getting the top and left position of the client of the window
- getting the global position of the cursor (GetCursorPos())
- cursor x - client left and cursor y - client top
- zoom x and y = client width and height / 100 (the openGL world size in the program)
- divide cursor pos x and y by zoom x and y
I made it up myself so it may have major errors.
it doesn't work, but am I along the right lines or is there an obvious reason for it not working?