Results 1 to 2 of 2

Thread: gluUnProject

  1. #1
    Junior Member Newbie
    Join Date
    May 2001
    Location
    France
    Posts
    9

    gluUnProject

    I want to draw an object exactly where the user clicked with the mouse, so I need to convert the x,y window coordinates plus the z depth into xyz object 3D coordinates. I suppose the standard way of doing this is to use the gluUnProject function, which requires the viewport, modelview and projection data, plus the x,y,z window coordinates.

    I am using Mesa 3.0 and Mesa 3.4, and the problem is,
    I keep obtaining weird values for x,y object coordinates (the z coordinate seems all right). I am sure the viewport and projection information is right, and I am almost sure the modelview data is also ok. I am using a perspective projection, and so far I am not changing the default depth values (no DepathRange calls). The blue book talks about gluUnProject4, to be used when near is different from 0 and far is different from 1, which is defined only in GLU 1.3...

    Could someone show me the light? This is a long standing problem for me, and hits me because the natural way of creating some objects cannot work without this. Thanks for all help!

    Carlos

  2. #2
    Junior Member Newbie
    Join Date
    May 2001
    Location
    France
    Posts
    9

    Re: gluUnProject

    I found the problem, a type conversion or something...

Similar Threads

  1. gluUnProject
    By Raiden in forum OpenGL: Linux
    Replies: 1
    Last Post: 04-11-2005, 09:33 AM
  2. gluUnProject
    By Amir in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 12-10-2004, 01:53 PM
  3. Example of gluUnProject
    By jirkamelich in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 12-11-2002, 08:53 AM
  4. gluUnProject
    By mphanke in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 05-24-2002, 08:28 AM
  5. Once again, gluUnProject...
    By Tanus in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 09-08-2001, 05:35 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