Create an empthy surface in SDL

How can I create an empthy surface in SDL? Is something like the following possible?

1
2
3
4
5
6
7
8
9
10
SDL_Surface *mySurface;
//create an empthy surface, setting the width and height
mySurface = CreateSurface (400,500); 

//perform some actions with the surface:
SDL_FillRect(mySurface, &mySurface->clip_rect, SDL_MapRGB(255,0,0); //draw red
apply_surface(20,20,someSurface,mySurface); //blit another surface to it

//blit surface to the screen
apply_surface(0,0,mySurface,screen);
See a reply to your other post on same subject.
Topic archived. No new replies allowed.