Calculate mouse position in opengl

Posts: 21
Joined: 2004.11
Post: #1
I'm having trouble with convert a clicked position into opengl 3d coordinates.
How do I do that?

I will be using it for dragging objects, not opengl picking.
The camera can be rotated, and thats where the hard part is.
When the user drag the mouse horizontal, I want the object to be dragged with the mouse.

Quote this message in a reply
Posts: 1,140
Joined: 2005.07
Post: #2
Check out gluProject and gluUnProject.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  new position with vector pander007 3 5,172 Oct 13, 2007 11:49 AM
Last Post: Nevada
  Best way to calculate framerate ferum 18 29,995 Sep 7, 2006 11:05 AM
Last Post: TomorrowPlusX
  Using a matrix to generate a new vector position imikedaman 6 7,325 Jul 16, 2006 01:17 PM
Last Post: imikedaman
  geting window position marko 2 4,117 Jul 24, 2005 02:32 AM
Last Post: marko
  Mouse events for an openGL window majestik666 5 9,429 Jul 5, 2005 06:15 PM
Last Post: majestik666