Hi again

I have decided to spend some time making the X11 system work better.
My ambition is to see if I can get all of "DirectFB-examples" to work!
I think I will be happy if they just work with X11 runnning in using 4 bytes per pixel!

Does X support alpha? And do I need to destinguish between RGB bit (which seems to use 4 bytes)
and ARGB which - well also use 4 bytes per pixel?

And what about the setting in .directfbrc?
Right now when X is runnning some 4 bytes per pixel mode and I set the same in .directfbrc like :
pixelformat=RGB32
pixelformat=ARGB

A lot of the examples works quite OK ... I think :)
Some of those that do not work properly are those not using 32 bit color like "df_fire", that looks very wrong and spawns an extra X-window ! "df_window" also spawns an extra X-window but beseides that I looks OK, but there are probably some problems I havent noticed. Should it be necessary to set pixelformat to an 8 bit one in .directfbrc when running fx. "df_fire" ?

I have copied the SDL system, which I have been told is not the best, but what else can You suggest?

I know that one problem is in my :
static DFBResult update_screen( CoreSurface *surface, int x, int y, int w, int h )
in particular in this area:

        dst = xw->virtualscreen;

        src += DFB_BYTES_PER_LINE( surface->format, x ) + y * pitch;
        dst += DFB_BYTES_PER_LINE( surface->format, x ) + y * 
xw->ximage->bytes_per_line;

        *for* (i=0; i<h; ++i) {
                direct_memcpy( dst, src, DFB_BYTES_PER_LINE( surface->format, w 
) );

                src += pitch;
                dst += xw->ximage->bytes_per_line;
        }

When running fx. df_fire there is a factor 4 in difference between my destination lines and the source lines because it's a 8 bit palette. In df_window the result of DFB_BYTES_PER_LINE( surface->format, x ) seems to vary when I move the mouse around .... I find that quite strange, but maybe You know why? How can I make sure the correct palette conversions take place? i don't suppose direct_memcpy does that ... But I have a memory of some comment stating that there was a DirectFB function designed to help out with this kind of problem ... Is that so?

Regards Martin Lütken






_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to