Jump to content

  • Log In with Google      Sign In   
  • Create Account


GLUT v freeGLUT v SDL v SFML for OpenGL


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 Cdrandin   Members   -  Reputation: 443

Like
0Likes
Like

Posted 05 December 2012 - 01:13 AM

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.

Sponsor:

#2 jbadams   Senior Staff   -  Reputation: 18224

Like
1Likes
Like

Posted 05 December 2012 - 02:35 AM

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.


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.

#3 wqking   Members   -  Reputation: 756

Like
0Likes
Like

Posted 05 December 2012 - 02:46 AM

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. :)

http://www.cpgf.org/
cpgf library -- free C++ open source library for reflection, serialization, script binding, callbacks, and meta data for OpenGL Box2D, SFML and Irrlicht.
v1.5.5 was released. Now supports tween and timeline for ease animation.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS