Re: XForms: flickering images

Steve Lamont (spl@szechuan.ucsd.edu)
Mon, 19 Apr 99 06:44:42 PDT

# To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :

> Ok, so how do I write to each buffer and how do I tell it to flip buffers?
> (aka glXSwapBuffers in Mesa/OpenGL)

XForms handles the buffering for you.

Just feed the Pixmap to the object as normal and XForms will handle
the buffer swap for you when you return from your callback (or do
fl_check_forms()).

> > In a Canvas object you need to handle all buffering yourself, either
> > by one of the Xlib functions, such as XCopyArea(), or indirectly through
> > an API such as Mesa3D.
>
> Is this also true of canvas's if I'm using the 'background_pixmap'
> attribute to display the image (as you suggested a few days ago).

No. If you use the `background_pixmap' attribute, you just do

XClearWindow( fl_get_display(), FL_ObjWin( canvas ) );

and the server will handle the buffer swap.

This is my favorite way of dealing with images of this sort since the
server takes care of dealing with any expose events for me.

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