Can i create a SDL_Surface as i do with Allegro?

Posted by Petris Rodrigo Fernandes on Game Development See other posts from Game Development or by Petris Rodrigo Fernandes
Published on 2012-03-18T17:07:55Z Indexed on 2012/03/18 18:24 UTC
Read the original article Hit count: 274

Filed under:

First of all, I'm sorry about my english (Isn't my native language)

Using allegro I can create a Bitmap to draw just doing:

BITMAP* bmp = NULL;
bmp = create_bitmap(width,height); // I don't remember exactly the parameters

I'm using SDL now, and i want create a SDL_Surface to draw the game level (that is static) creating a SDL_Surface, drawing the tiles on it, then i just blit this surface to the screen instead of keep drawing the tiles directly on screen (i believe this will require more processing);

There a way to create a blank SDL_Surface as i did with Allegro just do draw before blit it?

© Game Development or respective owner

Related posts about sdl