Re: GTK+ back buffers?



> Hi,
> 
> I'm trying to do some fast graphical stuff, and I need to implement a fast
> off-screen double buffer.  Since I also need portability with other
> platforms, the backbuffer is an "unsigned char *" and can be configured to
> be either 16 or 24 bit (or 8 bit with a certain fixed palette - not really
> applicable in X since you can't change the whole palette). 
> 
> My question is this:  How do I copy the "unsigned char *" buffer to a
> format that can be flipped to a window without having to do a put_pixel
> call for each pixel in the image?

try to use gdk_imlib. You can use GdkImlibImage. It can be created from 
unsigned char * data + unsigned char * alpha

when it is slow for you, I mean you may use XImage, but this way isn't
so easy.

Radek



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