Results 1 to 2 of 2

Thread: depth, mouse clicks and x,y space

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2009
    Posts
    21

    depth, mouse clicks and x,y space

    In orthographic projection, i received a mouse click. Because my glOrtho() call used the width and height of my view, i knew exactly where to draw an object (ie the mouse click x,y and my z could be anything)

    Now that I'm working with a frustum, I'm not sure where to draw an object based on the input of a mouse click. I don't seem to understand what my x/y coordinate space is at a given z.

    Can someone help me understand or tell me where i'm thinking about it wrong?

  2. #2
    Senior Member OpenGL Pro dletozeun's Avatar
    Join Date
    Jan 2006
    Location
    FRANCE
    Posts
    1,367

    Re: depth, mouse clicks and x,y space

    Look at the gluUnproject function. It should help to start.

Similar Threads

  1. passing coordinates from mouse clicks
    By Jaymz in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 09-18-2011, 04:04 PM
  2. Mouse Clicks
    By Erin C. in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 10-28-2008, 07:32 AM
  3. Drawing a rectangle using two mouse clicks
    By kiock in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 08-18-2006, 11:18 PM
  4. About Mouse clicks and rectangles
    By DeSeis in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 12-01-2001, 09:46 AM
  5. Testing for Mouse Clicks
    By jeremyp in forum OpenGL: Basic Coding
    Replies: 12
    Last Post: 04-14-2001, 10:23 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