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
    Senior Member Regular Contributor
    Join Date
    Dec 1969
    Location
    Munich,Germany
    Posts
    227

    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

Similar Threads

  1. How to use gluUnProject ?
    By jirkamelich in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 12-05-2002, 03:20 AM
  2. gluUnProject
    By Tim Stirling in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 03-22-2001, 12:40 PM
  3. How to use gluUnproject
    By Schlogenburg in forum OpenGL: Basic Coding
    Replies: 16
    Last Post: 12-11-2000, 10:47 AM
  4. gluUnProject
    By imported_Scott in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 10-28-2000, 01:29 PM
  5. gluUnProject
    By in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 07-19-2000, 12:56 AM

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