]> git.mxchange.org Git - quix0rs-blobwars.git/commitdiff
Call SDL_RenderClear() after every frame.
authorGuus Sliepen <guus@debian.org>
Sat, 21 Nov 2015 19:38:43 +0000 (20:38 +0100)
committerGuus Sliepen <guus@debian.org>
Sat, 21 Nov 2015 19:38:43 +0000 (20:38 +0100)
This ensures there is no cruft visible when resizing the window or
toggling fullscreen mode.

src/CGraphics.cpp

index cde769d75013d580142c4fbc4c02c69087018fbc..14e9c5359c0ab2256d51d5e091aa47044c16f954 100644 (file)
@@ -195,6 +195,7 @@ void Graphics::updateScreen()
        SDL_UpdateTexture(texture, NULL, screen->pixels, screen->w * 4);
        SDL_RenderCopy(renderer, texture, NULL, NULL);
        SDL_RenderPresent(renderer);
+       SDL_RenderClear(renderer);
 
        if (takeRandomScreenShots)
        {