9

I am new to OpenGL and I have been doing some tutorials utilizing GLUT.

GLUT seems to be quite clunky and "old-fashioned" (if you know what I mean :D) so I am asking if there are a bit more straightforward and easier (perhaps more intuitive) libraries to substitute GLUT functionality?

GLnewb
  • 93
  • 5

2 Answers2

12

Sounds like GLFW is what you are looking for. It is pretty simple library but much more intuitive than GLUT. It has basic support for keyboard, mouse and joystick inputs too.

It is also a pretty small library so it does have small overhead too. Typically GLFW adds only 20-30kb overhead if linked statically. Portability is excellent too, platform support includes all major desktop platforms (Windows, Mac OS X, Unix like system with X Window System such as FreeBSD and Linux).

Athabaska Dick
  • 3,855
  • 3
  • 20
  • 22
  • 1
    That looks very promising. Thank you. I am still waiting for more alternative answers before I tag this accepted answer. – GLnewb Apr 20 '11 at 15:00
  • 1
    +1 on GLFW. This is one of the few "plug in, and no worries, no pain" solutions. I sometimes wish more things worked like that. – Damon Apr 20 '11 at 19:30
6

I use SDL for this. It is a cross platform library that allows me to create an OpenGL window and rendering context and it also handles mouse, keyboard and joystick input. It supports sound output and some addon libraries like SDL_mixer for easier audio support and SDL_ttf for TrueType font support.

Starting with SDL 1.3 it is also possible to specify which OpenGL Version the created OpenGL context is supposed to support and using SDL 1.3 I can have the same code work on Windows, Linux and my Android Phone. SDL 1.3 also seems to include some mouse and touch gesture recognition stuff.

trenki
  • 7,133
  • 7
  • 49
  • 61
  • 1
    Excellent. Unfortunately there is no possibility to tag two accepted answers so I must go for the first one despite the fact I will probably use both SDL and GLFW in my future projects. Thank you. – GLnewb Apr 20 '11 at 15:57