Shall I use GLUT?

Started by
4 comments, last by megatron244 16 years, 10 months ago
Shall I use GLUT to make portable applications and for which plattforms is GLUT available?
Advertisement
Sure. Glut is a great library as it saves alot of time. All it does it setup opengl under your current windowing system. It also has support for handling user input in a portable cross-platform way.

It is supported under Windows, Linux and OSX, and maybe others. But thoes are pretty much the only platforms that matter.

Setting up the windowing system is tedious and requires many lines that are specific to each operating system.

You can always un-glut your application later without tossing any of your code (except for how you handle user input). You would simply insert the code required to setup gl for the current platform.

I currently use glut for all my apps.

I'd recommend SDL over GLUT for several reasons
1- It's more flexible(but may be lower level than glut) as it doesn't have the C callbacks thing.
2- Under constant development.
3- There are a lot of useful related libraries(SDL_image, SDL_mixer)
4- Contains other functionality required in game development such as Threads and Joystick

Note that GLUT and SDL are not quite similar as they don't provide the same functionality.
xee..
To learn, ok.
For serious stuff, no.
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);
I agree.

GLUT is my first choice for fast prototyping. Testing shaders, a simple model loader, a proof of concept.

SDL last time I tried it was consistently better. It both offered higher abstraction and more control. Last time I used it (admittedly a few years ago) it didn't stand against native API.

I am positive most projects could use SDL without too much hassle.

Previously "Krohm"

I have used both glut and SDL, and I would recommend SDL, since, like others have already stated, it is more powerful, yet it is not more complicated than glut (both are quite easy to use).

- Vince

This topic is closed to new replies.

Advertisement