Catching the mouse coordinate and show them with a label i easy. But what if one want the glscene coordinates to label with instead.
Is there some way to transform from screen coordinates to glScene coordinates.
Thanks Jakob
Catching the mouse coordinate and show them with a label i easy. But what if one want the glscene coordinates to label with instead.
Is there some way to transform from screen coordinates to glScene coordinates.
Thanks Jakob
There’s a function in the GLU library that converts 2D screen coords to 3D scene coords. It is : gluUnProject. I’ve never used it, but a search on this board will certainly be fruitful. You could also look for help about gluUnProject in the MSDN collection or on this site. Here’s a link I’ve found by searching for gluUnProject at the opengl.org homepage :
http://www.opengl.org/developers/faqs/technical/glu.htm?gluUnProject#first_hit
Hope this helps