[SDL] SDL_OPENGLBLIT + SDL_SetColorKey()

Mattias Engdegård f91-men at nada.kth.se
Tue Aug 21 02:18:01 PDT 2001


"Fabio 'SnowDruid' Franchello" <snowdruid at libero.it> wrote:
>Logo: after SDL_SetColorKey:
>Video Flags: SDL_SRCCOLORKEY|SDL_RLEACCELOK
>
>Surface = 8199856 [0]
>palette: NULL
>BitsPerPixel: 24
>BytesPerPixel: 3
>Rmask: 16711680
>Gmask: 65280
>Bmask: 255
>Amask: 0

Now this makes more sense, but it is completely different from what
you said last time --- you claimed that the logo had an alpha channel
even when you didn't use DisplayFormat(), which is clearly not true.
Please be more careful when reporting bugs, or it is impossible to
help you

As you can see, DisplayFormat gives an alpha channel to the logo; for
some reason it also sets SRCALPHA while retaining SRCCOLORKEY.
Try removing SRCALPHA by calling

SDL_SetAlpha(Logo, SDL_RLEACCEL, 255);

Alternatively, try converting the colourkey to an alpha channel by
calling SDL_DisplayFormatAlpha (instead of DisplayFormat) after having set
the colourkey





More information about the SDL mailing list