Hi,
I’m using gluUnProject to get world coordinates in my app. Let’s assume that my rendering window is 100x100, i.e. the mouse position coordinates will range from 0 to 99. As OpenGL has its origin in the bottom left corner I need to do:
mousePnt.y = winSize.y - mousePnt.y
before using gluUnProject. But shouldn’t it really be:
mousePnt.y = winSize.y - mousePnt.y - 1
In all tutorials and posts I’ve seen, people don’t have the -1. Maybe I’m just a bit daft…