From: Johannes Falk <hanno.falk@gm...> - 2007-03-21 22:05:53
on our new Linux workstation (Suse 10.2) I detected a strange behavior
in my interactive OpenGL animations using glutIdelFunc().
I am redirecting the OpenGL output to my HP-UX workstation or to a PC
running ReflectionX as usual and now get several messages, that freeglut
can not create a *direct* connection, stating that this may reduce
performance. These messages do not occur in all my older freeglut versions.
But in general the performance seems to be the same as before (hardware
accelerated), but it looks now as if the new freeglut version does not
wait for the glutSwapBuffers() function to finish and therefore calls my
glutIdelFunc much too rapidly (10 to 100 times more frequent than
before, resulting in up to 4000 calls/sec!). My Idelfunc recalculates
the (typically slowly rotating) view and calls glutPostRedisplay() which
leads to a call of my glutRedrawFunc that ends with a call to
This seems to fill up some display fifo with hundreds of updates! If the
user interacts, he has to wait several seconds for the buffer to drain
until his mouse motion events get visibly processed. The same
misbehavior seems to happen with very rapid mouse motions too, because
there is a noticeable inertness if the graphic is more complex.
All this does NOT occur if I execute my application on the older Linux
PC (Suse 10.0) or simply link it with my self made oldglut (glut.org
3.8). The same source compiles and runs fine under HP-UX 11.11 too -
without any inertness at all.
Has anyone (John Fay?) got an idea what is going wrong here?
From: Sven Panne <sven.panne@ae...> - 2007-03-22 18:03:59
On Wednesday 21 March 2007 23:05, Johannes Falk wrote:
> [...] Has anyone (John Fay?) got an idea what is going wrong here?
I don't think that anything is going wrong:
glutSwapBuffers() does an implicit glFlush(), not a glFinish(), i.e. it
doesn't wait for the completion of queued rendering commands. If it does
under special circumstances, this is just by luck because of the underlying
In general, I think that glutIdleFunc() is not a very good idea for
interactive programs, glutTimerFunc() is often much more appropriate IMHO.