From: John F. Fay <johnffay@cy...> - 2009-03-08 00:53:30
First, I would encourage you to try again with the latest SVN version of
"freeglut". There have been a lot of changes made since the 2.4.0 release,
although I do not know that anything has changed that will fix your
What you are describing sounds reasonable to the extent that if you have a
computer do a lot of stuff, performance is likely to suffer. The function
"glutMainLoop" is found in "freeglut_main.c" starting on line 1451 and it
calls "glutMainLoopEvent" which starts on line 951 of the same file.
Within the latter function there is a while loop (starting on line 969 for
X11 and on line 1419 for Windows) that continues to handle events as long
as the operating system continues to send them. This would explain the
pause in rendering if the event queues were flooded, but it doesn't explain
why the flooding would occur.
My first course of action would be to stick a "fprintf" statement in at
the beginning of the while-loop to see whether the queue is actually being
flooded, and if so with what.
From: Rolf Schneider
Sent: Friday, March 06, 2009 3:16 AM
To: FreeGLUT developers list
Subject: [Freeglut-developer] Event queue problem
there seems to be a problem with FreeGLUT's event queue.
We've developed a large application with a comprehensive GUI. In fact,
we developed an object oriented user interface kit featuring all kinds
of components (buttons, toggles, slider, menus, forms, panes, etc.)
which is entirely based on OpenGL/FreeGLUT...
It runs under Linux, Mac & Windows and the performance so far is great!
The problem is, as soon as our app must perform some complex tasks
(rendering 1000s of points/lines/polygons, glDrawPixels of highres
images >3k, doing some intensive background computations) while we feed
events into the queue using the mouse, the window rendering "hangs" for
a short moment. This does *not* happen, if we simply refresh the window
display without feeding event into the queue (e.g. playback a sequence
It seems that if the event queue becomes "flooded" with too many events,
it skips rendering until the queue is has been "flushed" again.
We see this behavior on all platforms!
Does this make sense to you? ...or does it sound familiar?
FYI, we use a modified version of FreeGLUT 2.4...
Any help would be great!
Thanks a lot,
S c i e n c e . D . V i s i o n s
Heiliger Weg 60
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco,
-OSBC tackles the biggest issue in open source: Open Sourcing the
-Strategies to boost innovation and cut costs with open source
-Receive a $600 discount off the registration fee with the source code:
Freeglut-developer mailing list