GLUT or not GLUT

Hi!
I need some specefic information abot usability of glut. Is it is feasible to use glut in heavy software? is it right to use glut in 3d game engine?

I developed a project on lens experiment. I used both glut and the windowing system from NeHe. I found second one is faster then the glut system. is it really or not?

Is it usable to handle with glut while develoing game engines?

I use GLUT for my 3D game engine and it runs pretty fast (I have a p233 MHz with 64 MB RAM). I’ve not tested it without GLUT, and I’m not really going to do so, because GLUT is portable and I want my programs (and even games) to compile well under at least both Win32 and Linux.

For desktop applications like model and map editors or something similar, you shouldn’t use it (because of the flexibility), but for game engines and effects (screen savers for example) you should use it.

Hi !

You shouldn’t find any (or very little) difference in performance.

If you want GUI stuff (except for menus) you should use something else, also with a glut application there is no way to stop the user from terminating the application without you being able to for example save something to disk.

Many games use GLUT, I would suggest that you have a look at SDL, it’s also very protable and give you sound support and multithreading in a portable way to.

Mikael

Originally posted by mikael_aronsson:
… also with a glut application there is no way to stop the user from terminating the application without you being able to for example save something to disk.

There is:

#include <gl/glut.h>
#include <stdlib.h>

void exitfunc() {
/* … */
save_current_game();
*/ … */
}

int main(int argc,char argv[]) {
/
/
atexit(exitfunc);
/
… */
glutMainLoop();
return 0;
}

Now that is truly clever