Jump to content
  • Advertisement

Archived

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

Andre the Giant

to glut or not to glut

This topic is 6013 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

Hello, Im going to add mouse support to my opengl app. I think It would be rather simple to do so using the GLUT library, but Im not sure if that is the best way to go. Can''t I do the same thing through windows api? Is glut not platform independant? Is there disadvantages to using glut (not just with respect to mouse input)? Id like to hear the pros and cons of glut. Thanks. Its not my fault I''''m the biggest and the strongest; I don''''t even exercise.

Share this post


Link to post
Share on other sites
Advertisement
in the windows api for the mouse stuff :
GetCursorPos,SetCursorPos to get/set the cursor position (for details go to MSDN)

Whenever a mousebutton get''s pressed you''re app will get a message
(WM_LEFTMOUSEBUTTONDOWN or something like that, again use the MSDN)

I dunno about glut, never used it.
I use SDL for this kinda stuff.


Share this post


Link to post
Share on other sites
I tried using Glut, but got so many problems getting it to actually work I scrapped the platform independance and stuck with MS API. I hate Windows.

Share this post


Link to post
Share on other sites
If you use the win32 API, your program isn''t portable... which isn''t a problem a lot of the time. Why not use glut though? If it works correctly, use it. Don''t use the looping functions that it has though.

Share this post


Link to post
Share on other sites
GLUT is awesome for things like small games or demos, or simply testing things out. If you''re working on a larger project in which you may need more control over certain elements (like more efficient input, control over device contexts, ect) I do not recommend it. If you''re simply testing some non-platform-specific GL-related thing or none of the abstractions presented by GLUT effect your applications performance or flexibility, by all means use it.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!