[SDL] Surface conversion

Lilith Calbridge lilith at dcccd.edu
Wed Jul 19 10:58:32 PDT 2006


Okay, so the format that I point to, in this instance, would be the
format of the 32 bpp surface I'm eventually looking to blit to?

Thanks,
Lilith

>>> On 7/19/2006 at 12:38 PM, in message
<1237.141.99.122.11.1153330710.squirrel at mail.syntheticsw.com>,
wizard at syntheticsw.com wrote:
> Hello !
> 
> 
>> I'm not sure I understand the SDL_ConvertSurface function.  The
>> documentation says it "Converts a surface to the same format as
another
>> surface." But it also says, "Creates a new surface of the specified
>> format,".  How can you convert a surface that's new?
> 
> 
> This means it converts a surface to another format,
> by creating a new Surface with the wanted format and
> blit the old surface contents to the new surface.
> 
> One reason for using the same format across
> surfaces is simple the blitting speed is better.
> 
> 
> CU
> 
> 
> _______________________________________________
> SDL mailing list
> SDL at libsdl.org 
> http://www.libsdl.org/mailman/listinfo/sdl




More information about the SDL mailing list