[SDL] Transparent Surfaces

Gorka olsago at jet.es
Tue Aug 24 15:46:32 PDT 1999


You have to put the color you are using but converted to the pixel format
you are working.
I use bright pink (R255,G0,B255) for tranparent pixels so I have to put
this in SDL_SetColorKey function:

SDL_SetColorKey(surface, SDL_SRCCOLORKEY, 0xF81F);

Hope it helps
--
     ||| 
    (o -)
 oOOo(_)oOOo-----------------------------
|  " Real users hate Real programmers "  |
|----------------------------------------|
| olsago at jet.es                          |
| http://personales.jet.es/olsago/       |
| http://fly.to/luzluciernaga	         |
 ----------------------------------------

On Thu, 26 Aug 1999, Víctor Romero wrote:

> 
> 	Hi all.
> 
> 		I need to make a surface already converted to a 16bit
> display transparent. I've tried it with SDL_Key but doenst work.
> 
> 	Only works with palettized surfaces ??
> 
> 	Thanks by all.
> 
> 
> 




More information about the SDL mailing list