[SDL] Faster way to do an SDL_BlitSurface

Manuel García Cabrera manugarciac5 at yahoo.com.ar
Thu May 3 18:41:04 PDT 2007


I heard that with memcpy it should be faster, and it seems to be, but
the result is not good. This is what I'm doing:


memcpy (screen->pixels, image->pixels, resWidth*resHeight*colorDepth/8);
// /8 because the colorDepth is in bits



instead of:



SDL_BlitSurface(image, NULL, screen, NULL);




And this is the result:
http://img338.imageshack.us/my.php?image=dibujovf9.jpg



That's supposed to be a 1280x800 screen capture by the way... I really
need to maximize my speed, REALLY, and that line is the one eating most
of my time...


More information about the SDL mailing list