Sign in to follow this  
Christoher Randin

GLUT v freeGLUT v SDL v SFML for OpenGL

Recommended Posts

SO, like the title says. Which should I use when using OpenGL? I understand all can get user input and create windows, but SDL and SFML are more generalized APIs. What are the differences between each API and what makes one preferable over another?
From what I understand SDL and GLUT, pretty 'old' per se, using C whereas freeGlut and SFML are newer and maintained, as well as SDL, but from what I have read GLUT isn't maintained.

Just curious as to which to use.

Also, I am curious. I have seen nice simple graphics using OpenGL, but is it directly used to make games or play with graphics? I have seen youtube videos of people posting simple games with cubes and spheres, but can it make a simple human model or a simple architectural building just using OpenGL itself or is it an extreme amount of work to accomplish. I am wanting to understand the dirty, 'close to the metal' parts of how 3D graphics work.

Share this post

Link to post
Share on other sites
jbadams    25677
Any of those libraries will be perfectly capable of filling your needs.

GLUT and Freeglut are more basic, providing only lower-level functionality. Of the two you should probably try the actively maintained Freeglut.

SDL and SFML (as well as Allegro) provide some slightly more complex functionality, although it's worth noting that if you're planning to use them with OpenGL you might not actually use much of that functionality. SDL is a more C-based API. It's older, more mature, and is significantly more portable than SFML. There's also a much more modern version in the works; it's unclear when this might reach a state where the author is happy to make a stable release, but the most recent development version is relatively functional and stable if you wanted to use it. SFML is a more modern C++-based API, is very stable and is actively maintained.

It really doesn't particularly matter which you use -- I'd advise taking a look at some code samples and some of the reference materials for each and choosing whichever strikes you as the most pleasing, but if you don't want to take the time to investigate you wouldn't be harming yourself by simply picking one from a hat.

[quote name='Cdrandin' timestamp='1354691616' post='5007323']
can it make a simple human model or a simple architectural building just using OpenGL
OpenGL provides functionality for talking to the graphics hardware. In theory you could enter a whole series of commands in order to create a complex model, but that would be tedious and inefficient, and the normal practice is to instead load a model created using a modelling package such as Maya or Blender, which is then drawn using the relevant OpenGL API calls.

Share this post

Link to post
Share on other sites
wqking    761
It depends on what you want to do.

If you want to learn OpenGL, go with the low level library, such as Freeglut. Thus almost all your code is using OpenGL directly, plus some low level support such as simple window management.

If you want to develop using OpenGL, go with higher level library, such as SFML. Then you can focus on your task itself than OpenGL itself. For some more higher library, such as Irrlicht, the library wraps the undelying graphics driver so well that you can switch between DirectX and OpenGL freely.

Just my suggestions. I have no particular recommend on which library to use since I'm not expert on graphics engines. :)

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