Sign in to follow this  
Charabis

To GLUT or not to GLUT

Recommended Posts

Think the title really says it all. How necessary is GLUT to using OpenGL for games? If it's pretty much mandatory, then I hope someone can provide a comparison of the alternatives (GLUT, OpenGLUT, freeGlut). I promise, this is the last question...for tonight anyway ;)

Share this post


Link to post
Share on other sites
Quote:
Original post by Charabis
Possible, but I hear that SDL is also notoriously slow in most cases, or is that information incorrect?
Yes, that's incorrect, at least as far as using it with OpenGL goes (I haven't used SDL's software rendering features, so I can't comment on that).

Share this post


Link to post
Share on other sites
Not to GLUT. It's generally considered fairly outdated, in my experience.

Some alternatives: SDL (easy), GLFW (never used it, looks easy), and native (tough and not cross-platform). I'd prolly suggest SDL.

Share this post


Link to post
Share on other sites
GLUT from my experience is not right for games - Although there is a function called EnterGameMode() which is fullscreen GLUT but the problem I find with GLUT is that I can't (or don't know of any way to) take control of the message loop to process a game loop so to speak.

GLUT does offer an Idle function which is called when no other messages need to be dispatched but I think this would be rather slow for a game loop.

SDL is easy to learn and you can take control of how messages are handled which is very important for performance.

Good luck in your learning :)

Share this post


Link to post
Share on other sites
I recommend that you go for native windows in the beginning, so that you learn how to handle and event structure and all the other stuff that sdl or any other lib will give you for free.

Also, building a nice window class for opengl gives you more specified controll of the window that sdl will give you

Share this post


Link to post
Share on other sites
I Think that GLUT isn't so bad.
It is probably slower than native, but it is pretty simple and very good choice for beginners.

So, my answer is:
GLUT for beginners, but not for experts!

Share this post


Link to post
Share on other sites
Do yourself a favor and don't GLUT. I started using GLUT and then later realized that when you encounter a problem with GLUT you don't find a solution. It seems that most people have moved on to using something else and don't know how to solve your problems with GLUT. And since GLUT is closed source and doesn't have the greatest documentation in the world, it isn't exactly easy to find the answer for yourself. Save yourself a lot of time and use SDL instead. Of course, still use OpenGL to render, though. SDL shouldn't cause any issues with speed unless you are plans are pretty ambitious.

Share this post


Link to post
Share on other sites
I also do suggest SDL. SDL is not slow, when it is just using it with OPenGL to create a window and that stuff.

Heck. Want a example of why it is not? How about the Quake series? It uses SDL for window creation and input on linux I believe. It has also been used on other games, that are multipule platforms.


Chad.

Share this post


Link to post
Share on other sites
Quote:
Original post by DoubleM
I Think that GLUT isn't so bad.
It is probably slower than native, but it is pretty simple and very good choice for beginners.

So, my answer is:
GLUT for beginners, but not for experts!


GLUT is just as native as SDL. The problem I noted before was with the message loop.

GLUT could be used for testing a simple concept but it is all beside the point. The question that was originally asked was "How necessary is GLUT to using OpenGL for Games"

The simple answer is that it is not necessary. There are other libraries out there that are just as simple and easy to use.



Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this