[SDL] Help with SDL_Convert
Ulrich Eckhardt
doomster at knuut.de
Mon May 14 11:14:11 PDT 2007
I'll assume you mean SDL_ConvertSurface.
On Monday 14 May 2007 18:38:32 Lilith Calbridge wrote:
> The name SDL_Convert implies that one surface is being converted to
> another's format. But in fact it returns a new surface.
Right, as the documentation says.
> My situation is that I have a surface that's a fraction of the size of
> my display surface. But apparently I need to convert the surface so that
> when I blit it to the display surface it matches format.
I don't think so, but for performance reasons I would always convert loaded
images to the display's format. Other than that, I think that you can also
blit between surfaces of different formats, it then does the conversion on
the fly.
> Does that mean that surface designated as "src" in the documentation should
> be the non-display surface that I need converted to the display surface
> format?
Yes. You call it with the surface you want to blit to the screen but with the
screen's format.
Uli
More information about the SDL
mailing list