Transparent Color in blitting with X11

Rashid rashid at milacom.de
Wed Jul 28 02:44:05 PDT 2010


hi guys 

I want to do the following: i got a freerunner smart phone. 
it can use accelerated blitting. its working and its fast but only under
xlib not under sdl (sdl 3 frames per second, xlib 50). 

but xlib doesnt support an alpha channel (and the freerunner has only 16
bits per pixel). is there an easy way to do transparency (one
transparent color is enough) with xlib or a toolkit which builds on it?

In short: how can I get a transparent color in xlib or a toolkit which
uses xlib and use accelerated functions via the gpu?

im doing the the blitting this way:

XCopyArea(bgwindow->display, pm, buffer, gcbuffer, 0, 0, bgtree.width,
bgtree.height, b , a);

Btw. im doing the double buffering in a very stupid way.

I write everything to a buffer and then copy the buffer to a window. Is
there a faster and more clever way?

//writing the background to the buffer
XCopyArea(bgwindow->display, pm, buffer, gcbuffer, 0, 0, bgtree.width,
bgtree.height, b , a);


//copy the buffer to the backgroundwindow
XCopyArea(bgwindow->display, buffer, bgwindow->window, bgwindow->gc, 0,
0, bgwindow->width, bgwindow->height, 0 , 0);		

If Im writing on the wrong mailing list can you tell me a list where to
ask? Or a good tutorial for my problems?

Greetz
rohezal




More information about the xorg mailing list