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 4,985 Oct 13, 2007 11:49 AM
Last Post: Nevada
  Best way to calculate framerate ferum 18 28,785 Sep 7, 2006 11:05 AM
Last Post: TomorrowPlusX
  geting window position marko 2 3,961 Jul 24, 2005 02:32 AM
Last Post: marko
  Mouse events for an openGL window majestik666 5 9,215 Jul 5, 2005 06:15 PM
Last Post: majestik666
  Cocoa - Reset Mouse Position to center of View CactusJack 6 7,978 Dec 11, 2002 08:51 PM
Last Post: CactusJack