"Flark" <flarkino@[EMAIL PROTECTED]
> wrote in message
news:3373e0ad-ad76-4f63-88cb-c6c2c411b51b@[EMAIL PROTECTED]
>
> Incidentally what I am trying to do is
> cause a redisplay of a GLUI static text item
> from within a callback before returning to
> the GLUT event loop. I need to display
> some information, then do some work,
> then return to GLUI, preferably without
> switching to a multithreaded approach.
>
No can do. glutPostRedisplay just queues a redisplay for the glutMainLoop,
it doesn't immediately cause a redraw.
"glutPostRedisplay marks the normal plane of current window as needing to
be
redisplayed. glutPostWindowRedisplay works the specified window as needing
to be redisplayed. After either call, the next iteration through
glutMainLoop, the window's display callback will be called to redisplay
the
window's normal plane."
You need to queue the redisplay, return to glut main loop, when the
redisplay happens, then fire the work proc. This is the classic "progress
meter" mistake.


|