Results 1 to 3 of 3

Thread: gluUnProject?

  1. #1
    Senior Member Regular Contributor
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    102

    gluUnProject?

    I have a glutSolidSphere that I wish to disappear if I click it, but then I have to translate the worldcoordinates to x, y coordinates. And how do I do that? With gluUnProject, and in that case, how???
    CyBBe

  2. #2
    Senior Member Regular Contributor
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    102

    Re: gluUnProject?

    Or should I do this with glReadPixels, but then I won't be able to change the color of the thing I wish to "click", or will I?
    CyBBe

  3. #3
    Senior Member Frequent Contributor
    Join Date
    Apr 2000
    Location
    Adelaide, South Australia, Australia
    Posts
    763

    Re: gluUnProject?

    well, translating world coordinates to xy coordinates is projection, so you'd use gluProject. glu*UN*project reverses that process, and converts xy screen and z coordinate into its corresponding world coordinate.

    if you want to know if you're clicing the sphere, i'd guess you'd use the selection mode

    hope this helps
    John

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