Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: convert window coordinates to OpenGL coordinates

  1. #1
    Intern Newbie
    Join Date
    May 2001
    bogota, colombia

    convert window coordinates to OpenGL coordinates

    How can I do to convert my coordinates I get from the mouse into the coordinates used in my OpenGL window...

    I want to add objects to another object at the point I define with a mouse click, but in an environment where one can rotate the object where I add my second object.

    It works fine to convert the coordinates if I donīt rotate the first object, but if I rotate, everything goes wrong (naturaly)

    Thanks in advance!!


  2. #2
    Senior Member OpenGL Pro
    Join Date
    Jun 2000
    Shreveport, LA, USA

    Re: convert window coordinates to OpenGL coordinates

    Read up on gluUnproject. It is expressly for the purpose of converting window coordinates to object coordinates.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts