OpenGL 1.1 scene coordinates to screen coordinates

224 Views Asked by At

I know OpenGL 1.x is more than only outdated but due to the required target hardware which lacks better OpenGL drivers, I'm bound to this kind of legacy code. Or in other words: people pay for support of this old crap and who pays is the boss...

My problem: Before sending my objects coordinates, I set some transformation with functions glLoadIdentity(), glTranslatef(), glScaled(), glRotatef() to change the view to my objects by translating/zooming/rotating.

These parameters can be changed by the user to get a different view to the scene (by dragging the mouse on the related window).

My problem: how can I convert between the scene-coordinates (based on the transformation done by the functions described above) and the draw-canvas coordinates (means position of the mouse on the window that displays the scene)?

Thanks!

0

There are 0 best solutions below