I am writing a simple code to zoom in on an image wherever the user clicks the left mouse-button

In my mouse-callback function, I am getting the window coordinates returned. The window size is (500,500). How do I convert the returned window coordinates into my world coordinates (gluOrtho2D)?

My initial world coordinates are set up as gluOrtho2D(-1.5,0.5,-1.25,1.25).

Is there an openGL call that will give me the world coordinates in the callback? Or should there be another approach?

Thanks in advance.

Lookup gluUnproject. This should give you the world coordinates that you desire.