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
    Senior Member Regular Contributor
    Join Date
    Jul 2001
    Posts
    442

    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
    Senior Member Regular Contributor
    Join Date
    Jul 2001
    Posts
    442

    Re: need some very basic help

    gluUnProject (I mean) - not glUnproject!!

Similar Threads

  1. Basic VBO Help
    By dotcom in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 02-21-2015, 03:32 PM
  2. Basic Question
    By Limas in forum OpenGL: GLSL
    Replies: 2
    Last Post: 11-13-2010, 02:30 PM
  3. Basic Glut Help
    By monkfish in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 08-07-2005, 08:47 AM
  4. Basic is basic
    By snipe in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 11-27-2000, 07:15 AM
  5. Basic 3D Engine
    By pj in forum OpenGL: Basic Coding
    Replies: 20
    Last Post: 06-26-2000, 01:42 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean