The documentation says that screen coordinates are not necessarily measured in pixels. It also says that functions that return mouse cursor position operate in screen coordinates. So if I understand correctly, if I want to translate cursor positions into world coordinates of whatever I’m rendering in OpenGL, I should first convert the cursor position from screen coordinates to pixels. However, every example that I came across seems to feed cursor positions directly to OpenGL transforms as if they were already in pixels.
Am I right that a conversion is needed? If so, what is the correct way to do it? Do I just compute it manually based on the ratio between window size and framebuffer size?