Re: Pixmaps are crashing?!

Steve Lamont (spl@szechuan.ucsd.edu)
Sun, 23 Feb 97 19:25:18 PST

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

> I implemented "animated pixmaps" in my XForms application. The
> way I did this was to simply call fl_set_pixmap_data() to have the pixmap
> data pointed to by a Pixmap object point to another pixmap of another
> frame of animation (BTW - the animation in question is composed of 23
> frames).
> [...]
> I'm wondering ... is the way I implemented animated pixmaps the
> correct way? Or should I instantiate 23 pixmaps objects for each of the
> 23 frames of animation, and just hide/unhide the individual objects?

What I'd do is to create 23 Pixmaps and commutate between them using
fl_set_pixmap_pixmap() rather than fl_set_pixmap_data(). That way you
don't suffer the overhead of having to interpret the Xpm data every
time.

I have also suffered unexplained server crashes (actually, the server
wedges up for about a minute and then dumps me back into xdm) using
a large number of XForms Pixmap objects (buttons in my case, not being
commutated -- just a whole slug of them). Since there was never a
core dump of either the server or the program it was really difficult
to track down. I finally ended up reducing the number of Pixmaps and
the problem went away so I didn't actually solve it. I suspect a
server problem -- this happened on an X11R5 server. My R6 server
never has given me a problem in this respect.

I do animate a large number of Pixmaps using OpenGL/Mesa and don't
have any problem with either server crashes or coredumps doing things
that way.

spl
_________________________________________________
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/xforms-archive/