Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

sheker

Glut and mouselook is it possible?

This topic is 5300 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
I guess you want to move your mouse and camera at the same time, like quake style games do. Well, I''m affraid it''s impossible to do this under GLUT. There are two functions which are essential to perform this kind of movement that GLUT does not provide.
On one hand you should be informed when the mouse has moved, even if there''s no button pressed. On the other hand you should be able to change the mouse cursor position. None of them are possible under GLUT. Use Win32 instead (if you are using Windows).

Share this post


Link to post
Share on other sites
quote:
Original post by dslprog
On one hand you should be informed when the mouse has moved, even if there''s no button pressed. On the other hand you should be able to change the mouse cursor position. None of them are possible under GLUT. Use Win32 instead (if you are using Windows).


Errmmm.... BOTH of these are possible under GLUT.

I guess you never heard of glutPassiveMotionFunc() or glutWarpPointer().




Kami no Itte ga ore ni zettai naru!

Share this post


Link to post
Share on other sites
Really! I didn't know. So what's the problem now?
NOTE: It's also important to capture the mouse, and I think that it's not possible with GLUT, am I wrong?

[edited by - dslprog on April 17, 2004 6:06:04 PM]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:
Original post by dslprog
Really! I didn''t know. So what''s the problem now?
NOTE: It''s also important to capture the mouse, and I think that it''s not possible with GLUT, am I wrong?

<SPAN CLASS=editedby>[edited by - dslprog on April 17, 2004 6:06:04 PM]</SPAN>


There''s no problem. It''s easy to do Quake-style controls with GLUT using the two functions above. I''ve had it working for years.

Not sure what you mean exactly by "capture the mouse", but you can make the cursor invisible and keep it at the center (using glutWarpPointer).

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:
Original post by tangentz
quote:
Original post by dslprog
On one hand you should be informed when the mouse has moved, even if there''s no button pressed. On the other hand you should be able to change the mouse cursor position. None of them are possible under GLUT. Use Win32 instead (if you are using Windows).


Errmmm.... BOTH of these are possible under GLUT.

I guess you never heard of glutPassiveMotionFunc() or glutWarpPointer().

/quote]

I have completed my mouse look, yes u can do it with glut, and yes its with passivemotionfunc and glutwarppointer

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!