glut vs. windows programming

What are the pros/cons of using glut for window creation and management as opposed to Windows programming? In other words, NeHe’s method (and most other tutorials out there) versus red book.

glut exists for almost every platform one can think of :wink: ie Mac, Linux…

if you do just pure w32 and require more perfomance, probably better to do all yourself, like NeHe…

GLUT is useful for demonstrating OpenGL example functionality. It doesn’t provide a full-feature GUI toolkit (e.g. widget hierarchy, textfields, tabs, togglebuttons, etc.). Your application requirements should determine whether or not GLUT suffices.

Doing it the w32 style (like NeHe) is usually not a good solution, since you basically have to build your own toolkit (like GLUT) yourself to get all the functionality you need. There is usually no reason to choose Win32 over a toolkit for speed (the OpenGL RC shouldnt work any different wether it’s created with Win32/WGL or a toolkit, which obviously has to use Win32 too). However I have learned that GLUT does some strange things in certain modes, that actually affects speed. You may want to look at GLFW or SDL for alternatives to GLUT, since they do not affect OpenGL perfomance.

As an alternative to GLUT, try OpenGLUT,
a fresh new implementation based on


Nigel Stewart

I’d recommend SDL ( which is portable and seems to very more powerful than glut.