Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: need some very basic help

  1. #1
    Guest

    need some very basic help

    hi,
    iam very new to opengl..pls help me with this basic Q.

    my question is this...

    we specify coord's through glVertex*() and this gets transformed and projected to window coord's.
    now, from the window coords how can i get the original vertex coords back ??

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Jul 2001
    Posts
    533

    Re: need some very basic help

    Hi,

    Do some reading on glUnproject. This will recover the x and y position, but you need to supply the z position because this is lost when the transform goes from 3d (world) to 2d (screen) space.

    So, given a z in 3d and a screen space position in 2d (x, y), it will find you the correct x, y for the given z.

    Hope this helps!

  3. #3
    Guest

    Re: need some very basic help

    thanx a lot.
    vily

  4. #4
    Advanced Member Frequent Contributor
    Join Date
    Jul 2001
    Posts
    533

    Re: need some very basic help

    gluUnProject (I mean) - not glUnproject!!

Posting Permissions

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