From: Guus Sliepen Date: Sat, 21 Nov 2015 19:38:43 +0000 (+0100) Subject: Call SDL_RenderClear() after every frame. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=cf2524c90dbc915f8a7f41a6ae7f9c84b3f6b0e7;p=quix0rs-blobwars.git Call SDL_RenderClear() after every frame. This ensures there is no cruft visible when resizing the window or toggling fullscreen mode. --- diff --git a/src/CGraphics.cpp b/src/CGraphics.cpp index cde769d..14e9c53 100644 --- a/src/CGraphics.cpp +++ b/src/CGraphics.cpp @@ -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) {