I'm reaching the conclusion that GLUT (a small cross-platform API for OpenGL windowing) is fatally flawed for anything other than small demo programs. First problem I found was with their main loop --there's no way to break out of it. Once you initialize everything and get the main loop started, the only way to quit is with exit(). Since your app doesn't get to drop out the bottom of main(), any objects allocated on the stack will never be destructed. I added a function to break out of the main loop, but that guarantees that I'll have to ship a proprietary GLUT32.DLL with my app. In addition, clicking the close-box on the window automatically calls exit() without allowing any cleanup at all. I can probably fix that too, but I wonder what other problems I will encounter.
I'm not saying that GLUT is a bad idea. To the contrary, I think it's great to have a dirt-simple framework for demo apps in OpenGL. That way, anyone showing off a technique can write an app to show it off using about 40 lines of code, and it'll run on any platform. I just think that it doesn't pass muster for non-trivial stuff.
Because of that, I'm taking a close look at wxWindows again. I was planning to re-do my 2D games under wxWindows a couple of years ago, but I was able to wheedle a cheap source-code license for my existing class library. It's one of the best GUI class libraries out there. The fact that it's free is icing on the cake. They've got an GLCanvas class already, so it's pretty-much ready for 3D games.
It does a ton of things that I'll probably never use, but that's OK. To quote my spiritual leader, J.R. "Bob" Dobbs. . .
"Too much is always better than not enough!"