To GLUT or not to GLUT

Started by
11 comments, last by Adam Hamilton 17 years, 1 month ago
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 ;)
My name is "Todd". Drop the "T" and it explains sooooooo much! :P
Advertisement
GLUT is not made for games (its easy to use + cross-platform but slow). You can find out how to start OpenGL natively, or take a look at SDL.
Possible, but I hear that SDL is also notoriously slow in most cases, or is that information incorrect?
My name is "Todd". Drop the "T" and it explains sooooooo much! :P
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).
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.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~I program in C++, on MSVC++ '05 Express, and on Windows. Most of my programs are also for windows.


surely for a beginner the speed isnt gonig to be such a big deal for you right now.

what is important is jsut getting results from yourself to spur (< how do you spell that?) you on.

Nx
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 :)
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
I'd recommend SDL or GLFW. SDL has a bif DLL that sometimes gets people off. GLFW can also be linked as a static lib (about 40kb only). Either one is fast enough.
Hi.
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!

This topic is closed to new replies.

Advertisement