Re: Animation in GTK



CyborgHead netscape net writes: 
> This doesn't work, it flickers continully.
> I then tried to place the onscreen image in a pixmap, but this is to
> slow. I think that pixmaps are only supposed to be used for static
> images, not realtime movement. The position if the tanks is updated
> many times a second by a idle function.

The pixmap shouldn't be too slow, if the raw drawing is fast
enough. Using a backing store as in the "scribble" example in the
tutorial has very little overhead.

> Does anyone know how to get smooth fast animation using GTK. It does
> not have to look great, just once you can see what is going on.
> 

As Timothy suggests, OpenGL or SDL or another game/graphics library
may be of interest. You can create a drawing area for the graphics lib
inside a GtkWindow, and use GTK for dialogs and menus and such.

Havoc




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]