[SDL] Problem with update
Sam Lantinga
slouken at devolution.com
Mon Jul 21 22:26:01 PDT 2003
> Hi everybody,
> I have create a black rectangle for the background in my game.
> But this rectangle isn't update when I call the SDL_UpdateRect.
> Follow you can read my lines for create and update the background
> SDL_Surface *background;
> SDL_Rect backrct;
> backrct.x = 0;
> backrct.y = 0;
> backrct.w = 320;
> backrct.h = 240;
> SDL_FillRect(background->screen, &backrct, SDL_MapRGB(background->screen->format , 0, 0, 0));
Don't you want to fill the screen, rather than the background?
See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment
More information about the SDL
mailing list