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 2 of 2

Thread: Strange value from gluUnProject

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

    Strange value from gluUnProject

    Dears,

    I am developing an application that allow user draw in 3D scene. I start
    with a small program: track the mouse click to receive the coordinate (x,y,z)
    I wrote in the function OnLButtonDown
    (as Martinijy's solution ) :

    GLdouble model[16];
    double x;
    double y;
    double z;
    GLdouble proj[16];
    GLint view[4];
    glGetDoublev(GL_MODELVIEW_MATRIX, model);
    glGetDoublev(GL_PROJECTION_MATRIX, proj);
    glGetIntegerv(GL_VIEWPORT, view);
    gluUnProject((GLdouble)point.x, (GLdouble)point.y, (GLdouble)0, model, proj, view, &x, &y, &z );

    But the result shock me ! They produce some great values, I can't
    continue processing with them.

    Please help me to solve this prolem !
    Thanks.

  2. #2
    Junior Member Newbie
    Join Date
    Dec 1969
    Location
    Munich,Germany
    Posts
    15

    Re: Strange value from gluUnProject

    hmm do a search on picking in this forum, there are lots of posts...


    (fourth time wirting this comment in 2 days...gee people search in here before asking..)

    Chris
    yes

Posting Permissions

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