Hello all,
I have find a problem in a code I did and even I have solved it, I would
like to know what do you think about it.
Ok, I let a file reproducing the same problem attached so you can follow
me (the latter code doesn’t work until
the changed suggested in this e-mail are done).
In line 58 we have:
SDL_Surface *temp =
SDL_CreateRGBSurface( SDL_HWSURFACE | SDL_SRCALPHA,
w, h, 24, rmask, gmask, bmask, amask );
If we change it for the next:
SDL_Surface *temp =
SDL_DisplayFormatAlpha( SDL_HWSURFACE | SDL_SRCALPHA,
w, h, 24, rmask, gmask, bmask, amask );
it stills doesn’t work, but if you use SDL_DisplayFormat instead of
SDL_DisplayFormatAlpha it works perfectly.
It seams rare to me, that if the source surface has been formatted with
SDL_DisplayFormatAlpha, the destiny
surface needs to be formatted with SDL_DisplayFormat.
BTW, SDL_BlitSurface doesn’t complain about the fact that you are
blitting surfaces with different format.
I use Ubuntu 10.10 and GCC version 4.4.3.
I hope you understood my perfect English.
Thanks.
Zaka.
-------------- next part --------------
A non-text attachment was scrubbed…
Name: pru_sdl.cpp
Type: text/x-c++src
Size: 2278 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20110208/ff04e371/attachment.cpp