Original Post
🔒 Locked
Mouse Coordinates?
Advertisement
You don''t use OpenGL for that, you use other AP calls, like, for example, Win32, SDL, etc.
Height Map Editor | Eternal lands
Height Map Editor | Eternal lands
It isn''t clear what you''re refering to. Probably getting the X, Y coords of the mouse cursor? Like the previous poster said, use your API first (DirectInput, SDL etc), or if you''re not using one, try the Windows GetCursorPos function. (You pass a reference to a POINT struct of your own to the function. check the win32 api.) Other than that, use windows messages.
Otherwise, you could be refering to Selection & Picking, for which there is tons of info. Google it, check the Programmers Guide and the usual tutorial sites.
Otherwise, you could be refering to Selection & Picking, for which there is tons of info. Google it, check the Programmers Guide and the usual tutorial sites.
if your using the GLUT library then there are a few functions you can use,
glutMotionFunc - when you drag with the mouse
glutPassiveMotionFunc - when your moving mouse without any buttons depressed.
if you want to convert window coordinates into opengl world co-ordinates then search for info about glProject and glUnProject.
"Very funny, Scotty. Now beam down my clothes."
glutMotionFunc - when you drag with the mouse
glutPassiveMotionFunc - when your moving mouse without any buttons depressed.
if you want to convert window coordinates into opengl world co-ordinates then search for info about glProject and glUnProject.
"Very funny, Scotty. Now beam down my clothes."
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement