PDA

View Full Version : Any problems not using GLUT events?



cronodragon
29-10-2007, 09:00 PM
Just wanted to know your opinions/experience about dropping GLUT events, and instead manually calling everything from a threaded loop.

According to GLUT documentation, gluMainLoop() starts the event processing loop, but I want to use my own loop which is inside a thread. Is it really necessary to call this function?

I have found several drawbacks with the GLUT event system:

1. It requires to call Halt(), which might create problems to release resources (even in managed environments you must be careful about releasing resources properly). There doesn't seem to be a function to quit the loop, and continue with the finalization code.

2. In my tests and running the samples, I found the user can close the application with the window bar, and it will remain in memory. I haven't found an event that triggers when the window, created by GLUT itself, has been closed.