[SDL] Faster way to do an SDL_BlitSurface

Manuel García Cabrera manugarciac5 at yahoo.com.ar
Fri May 4 13:55:39 PDT 2007


Manuel García Cabrera escribió:
> SkunkGuru escribió:
>> Manuel García Cabrera ha scritto:
>>>> Any ideas of what I could to do speed this up?
>>
>> are you using SDL_DisplayFormat on every SDL_Surface
>> you are using ?
>>
>>
> When I use that, it takes a bit longer so, no, I'm not.
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
> 
I do this:

-SDL_CreatRGBSurfaceFrom (from the pixel data of a bitmap. With this I
get a 24bit SDL_Surface)
-SDL_BlitSurface (I blit the 24bit surface on the SDL_Surface I setted
the Video Mode on)
-SDL_UpdateRect
-SDL_FreeSurface


When I set the Video Mode to 32 bits colorDepth, the blit eats my time,
Update is automatic. When I set it to 24 bits, the blit is automatic but
Update eats my time...

If the bitmaps were 32bit bitmaps would both of them go faster?


More information about the SDL mailing list