[SDL] converting 8bit surface to 32bit surface

matt hull mattmatteh at mac.com
Tue Sep 25 00:34:15 PDT 2007


i am working with an 8 bit surface for part of my application.  the  
8bit surface needs to be blitted or drawn to the 32 bit surface about  
60 frames per second.  i was trying to use SDL_BlitSurface without  
converting but was getting an error.  then i added SDL_DisplayFormat  
right before and it worked.  do i need to do that or is there a  
better way, perhaps an sdl function that does that in one step so i  
dont have to ?

how efficient or inefficient is sdl with 8 bit surfaces ?

i was using them so i could easily change the palette, if i use a 32  
bit surface i would have to do more blits or color changes with each  
palette change.

thanks

matt



More information about the SDL mailing list