Results 1 to 3 of 3

Thread: MouseCoords

  1. #1
    Guest

    MouseCoords

    ok, when i get x,y coords from glutMouseFunc
    how can i convert it to 3d space coords, and how can i get z coord?

    trying to do this:
    i have many GL_QUADS(only x,z changes,y is the height of gl_quad,currently always 0.0f)

    when i get the x,y coords from glut i need to search for the right GL_QUAD and change that's y coord

    gl_quads are stored in mutated binary tree

    from my last post someone sayd to use gluUnProject but it doesn't return right values

  2. #2
    Guest

    Re: MouseCoords

    Check out gluUnProject.

  3. #3
    Senior Member Regular Contributor
    Join Date
    Jul 2000
    Location
    Augsburg, Germany
    Posts
    334

    Re: MouseCoords

    First get the z-value from the z-buffer with glReadPixels. Then use your (x/y/z-buffer) values as parameter for gluUnProject.

    Kilam.

Similar Threads

  1. MouseCoords
    By in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 07-12-2001, 05:45 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