View Full Version : Don't use Glut !

10-13-2000, 04:30 AM
Yeah ...
Glut seems to be a really cool os-independant alternative but ... it sucks like hell !
This main loop which never exits and the lack of callback for window closing makes it unusable for really serious usage.
Boycott is, i lost 2 days trying to use that crap !

10-13-2000, 04:57 AM
GLUT is basically used for testing/showing off some effects quickly... You do not have to set up loads of things before compiling... Moreover, you can compile on many different platforms if you want to run comparative tests....

GLUT has never been designed for rewriting 3D Studio Max or Quake 3...

If you had asked, we would have told you...

Sorry for your 2 days lost...



P.S. : writing that in the Advanced forum is really pointless........

Mitchell Hayenga
10-13-2000, 03:37 PM
Ever hear of a program called "Blender"...? Looks like it uses glut... it is platform independent and it is a really good program... www.blender.nl (http://www.blender.nl)

10-14-2000, 12:00 AM
Mitchell, just a remark here : they say on their website that they made quite a lot of modifications to the original GLUT library in order to use it in Blender...


10-14-2000, 05:33 AM
I'm also trying to avoid working with Glut, because whenever I do something wrong with it, my application crashes and VB6 also crashes.

Speaking about glut, does anybody know how to easily retrieve vertices of all the glut-objects ?

10-15-2000, 07:15 AM
tuxracer uses glut, so it CAN be used for serious stuff http://www.opengl.org/discussion_boards/ubb/biggrin.gif

10-15-2000, 02:08 PM
People seem to be on 'a downer' about GLUT. What does everyone think is so about about it?


10-15-2000, 02:34 PM
I'm sorry but I can't resist. GLUT is great. It serves a purpose and it is the best door into the OpenGL world, IMHO.

Antonio www.fatech.com/tech (http://www.fatech.com/tech)

Mitchell Hayenga
10-15-2000, 04:34 PM
oh yeah, tux racer... thanks...
I googled myself there, and its great...

10-15-2000, 11:04 PM
Tux is on Linux, true ?
So maybe it's the windows version of glut which is buggy...
How can i free my memory stuff when the user clicks the window close button?
Catching the exit function don't work.

10-16-2000, 12:03 AM
If you dont suggest GLUT,
what do you suggest to use


10-16-2000, 05:27 AM
well, in the glut specs you can read that you should terminate glut programs using ANSI C's exit() and that you can install exit functions using onexit() (should this be atexit() ?)

anyway, this doesn't work if the user presses the window close button, probably because glut calls ExitProcess() instead of exit() or something.

thanks to glut, tuxracer is available for linux and windows http://www.opengl.org/discussion_boards/ubb/smile.gif

glut is really not suitable for big programs (not if you need a fat gui) and is not intended for such stuff anyway. for such stuff you need to **** around with the wglBla functions yourself (win32)

personally i like glut, it is cool for quick hacks or small games etc...


10-16-2000, 05:33 AM
oh and yes, you can get the modified glut
they used for blender from here :

Kilam Malik
10-16-2000, 06:21 AM
By the way... the screeshots of tuxracer looks fine... but it crashes my w2k!
GLUT is IMHO (and as Eric said before) for testing issues.


10-16-2000, 08:59 AM
I have been playing tuxracer on my Win2K box all weekend. Great game!

Mitchell Hayenga
10-16-2000, 01:07 PM
Tux Racer works fine here...

PII 400
128 Meg Ram

10-16-2000, 01:23 PM
Originally posted by d_christop:
If you dont suggest GLUT,
what do you suggest to use


I've tried SDL (under Linux) and it seems to be nice. Unfortunately, the opengl version is still an "odd number" release :-(


10-16-2000, 04:12 PM
Even though odd numbered releases are considered 'beta' or 'development' releases, I can whole-heartedly vouche for the stablility of SDL 1.1.x... I use it for my engine and gui, and Unreal TE runs GREAT. Have yet to have a single problem with it.

BTW: Tux racer uses SDL as well as GLUT.

10-17-2000, 05:10 AM
I'd have to agree with Fenris. SDL is a great library for my cross-platform deveopment so far. http://www.libsdl.org/ It handles input, audio, video, OPENGL, and much more.

10-17-2000, 07:36 AM
yet another recursive acronym :
SDL is DirectX for Linux ;-)

Colin Peart
10-17-2000, 11:04 AM
So be it. You don't like glut.

There are other options.

sdl www.libsdl.org (http://www.libsdl.org) is similar to glut in that it is OS independent. The list of ports is growing, but you can count on mac/windows/linux/beos/other unix.

However, SDL was designed from the ground up to be a powerful library.

It also handles cd-audio, sound, threading, 2D graphics, input, etc. I had my first libsdl gl program running in under 3 hours from the docs they provide.

Best of luck.

Colin Peart
10-17-2000, 11:07 AM

Originally posted by Allergy:
yet another recursive acronym :
SDL is DirectX for Linux ;-)

Try Simple Direct media Layer

Please don't suggest that we would even want directX under linux http://www.opengl.org/discussion_boards/ubb/wink.gif

***Note: This message meant in good humor, not zealotry, or for the sake of trolling. Laugh, why don't you.

10-18-2000, 01:29 AM
Where can I get de source code for glut and glu? I've seen demos where people say they have taken some piece of code from glu or glut, so....... direct me or send me that code if you have it. http://www.opengl.org/discussion_boards/ubb/wink.gif