clicky mouse

Started by
1 comment, last by vgmtech 18 years, 8 months ago
ok.. im trying to create a model editor program but i dont really know how to go about it.. so im just guessing as i go. im trying to work on getting mouse clicks to register on things in the editor. ive added an alert to the windows message loop in my program that sees when the mouse is clicked and where it is on the x and y positions at the time.. BUT.. i dont know how to make this relative to opengl. the more i zoom out/in.. the more the difference between the mouse and opengl coordinates change.. frankly im sure im going about it entirely the wrong way but nevertheless if anyone knows how i can convert the mouse position to opengl x,y positions relative to how far in or out of the screen the current view is.. that would be great... alternately, anyone who can point me in a better dirrection on how to go about this problem.. that would also be appreciated.
Advertisement
If I understand your question, you may want to look into the gluUnProject() function.
And see some nehe's Articles...
http://nehe.gamedev.net/data/articles/article.asp?article=13

This topic is closed to new replies.

Advertisement