Question

After reading a discussion on Ubuntu Forums concerning GLUT vs. FreeGLUT.

Is GLUT dead for graphics programming? Is SDL all the rage now for OpenGL programming?

Was it helpful?

Solution

In my opinion, GLUT is still great to learn programming OpenGL in. It is no longer maintained, as far as I know. Do look at : http://www.opengl.org/resources/libraries/glut/ for the official word

Extract from the above link - "The GLUT library has both C, C++ (same as C), FORTRAN, and Ada programming bindings. The GLUT source code distribution is portable to nearly all OpenGL implementations and platforms. The current version is 3.7. Additional releases of the library are not anticipated. GLUT is not open source. Mark Kilgard maintains the copyright."

Also look at : http://www.opengl.org/resources/libraries/windowtoolkits/ for alternatives.

You may also want to check out GLUX : http://code.google.com/p/glux/

As far as SDL being the rage, it is great for cross-platform stuff and many people are using it. I personally use Qt for my OpenGL work. Other windowing system alternatives also exist. It is also possible to program natively for windows or X.


Edit Feb 28 2017:


I should clarify that the student looking to jump into the practicalities of OpenGL would be better served by starting with SDL or Qt. As @TM rightly notes in his comment, using GLUT is far removed from the realities of programming a real world rendering application in OpenGL. My opinion that GLUT is good for learning comes from the thought that it is easier to learn when one separates the concern of learning an OpenGL from the concern of learning about the specifics of a Windowing system. Naturally, this may not match your needs.

OTHER TIPS

GLUT is rather simplistic for serious game development. SDL is used by numerous commercial game porting companies. GLUT happens to be good for studying OpenGL and for simple demos. Something like SDL is quite good for actual games.

SDL with its abstractions for other things, such as audio, and SDL's various addon libraries (SDL_image, SDL_mixer, ...) help a lot when writing a full game. Having control over the main loop is also pretty important.

If you are working on an OpenGL application which needs some native GUI as well (for example, a 3D modeler) you may be more interested in using wxWidgets or, as batbrat suggested, Qt.

GLUT is a very useful learning guide, but it's not full featured or useful enough for most real-world applications. I've also encountered minor issues with a few different GLUT implementations and support in some environments, so I've learned to stay away from it for anything but quick demos.

My OpenGL experience has generally been on embedded systems where I have complete control over the output, and there I use X Instrinsics to get the basic OpenGL Window up. It's a bit painful, but it's a small amount of code to get to OpenGL, where the bulk of the work is done.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top