Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

i need to port my game project from Android (written in C, OpenGL ES 2.0, thanks to NDK) to Windows and Linux platforms. Of course i will need to rewrite some platform depended code, but now i stuck with question which library for creating OpenGL and input handle use.

Just a quick googling get me 3 candidates:

1) Freeglut - rewrited and free good old GLUT.
2) SDL - most well know one lib, used in many games.
3) GLFW - some kind of new, but simple and functional.

I just quite new to PC develop and don't see any significant differences beetweem them. Can you help me which one to choose? I clearly need just core mouse/keyboard input and creating of OpenGL context, also i will use GLEW to get to modern OpenGL with easy.

share|improve this question
2  
The answer will be highly opinionated and is not really a good question for the SE format. That said, my highly opinionated answer -- having used all three for real projects, and a few others like SFML, GLUT, Qt, and hand-rolling a solution -- is that SDL gives a good mix of features, stability, and ease of use. I especially recommend the pre-release 2.0 versions (only available by checking out the Mercurial repo and building yourself, but that's quite easy). Second to that, SFML is pretty good. I found too many bugs in GLFW, GLUT is bad for games, and hand-rolling is lots of works. –  Sean Middleditch Jul 19 '12 at 7:35
    
Helpful, thanks –  user14832 Jul 19 '12 at 8:13
    
I personally would recommend SDL because it handles all parts of a game from input to the graphics to the audio and input. However, it can be limiting, but since you're coming from an already developed game for a more limited platform, i think it would be a fine choice. –  CobaltHex Jul 19 '12 at 8:20
    
Yeah, its a poll. My vote is GLFW, simple, easy, never had any issues that weren't resolved. It is super light weight and easy to compile as well. –  Daniel Jul 19 '12 at 8:56

1 Answer 1

up vote 17 down vote accepted

GLFW is modern and has a very well defined scope. It's also under very active development.

SDL on the other side is rock solid and has a lot features in different scopes but is somewhat lacking in all of them (for example: SDL can do audio, but you might prefer using OpenAL because its far superior in that matter). It might be notable that SDL was ported to many different platforms, unlike GLFW which is only for desktop platforms (win/linux/mac).

GLUT, well, should be avoided. There simply isn't really anything about it what makes it good.


In my opinion as perfectionist GLFW is the better choice. Because it does exactly what one wants, nothing less nothing more. The very active development is also a good sign for long term projects because it usually means that bugs will be fixed, that new features will be added, it will keep up with newer standards and that it won't be abadoned anytime near. This isn't important for a quick port or a 6-month game, but for a engine or a library you want to reuse I would keep that in mind.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.