XForms: Flushing events

Mike Blackwell (mkb@cs.cmu.edu)
Wed, 11 Mar 1998 12:36:15 -0500

# To subscribers of the xforms list from Mike Blackwell <mkb@cs.cmu.edu> :

I have an application that draws graphics in a GL canvas.
Typically it draws a static scene, the user hits a "next"
button, and it goes on to draw the next scene. That works
fine.

What I want to add is a way to cycle through a bunch of scenes,
rendering them to the canvas, then dumping the canvas to
a file, which can later be used to create a movie.

The problem I'm having is that it merrily chugs away, renders
a scene, does a glFinish and glXSwapBuffers, writes out
the canvas, and goes on to the next scene. But because it's not
in a normal xforms event loop, the canvas doesn't get an expose
event and isn't actually updated, so I wind up with all black
canvases...

I've tried calling fl_check_forms until it returns NULL after
I render a scene, and that almost works, but not always.

Is there a way to instruct xforms to process all pending events?
Would I also need to XSync after that?

Mike Blackwell
mkb@cs.cmu.edu
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/