[hatari-devel] use of SDL_RenderClear with SDL2

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hi

in the wrapper functions SDL_UpdateRects used only for SDL2, I see :

SDL_UpdateTexture(sdlTexture, NULL, screen->pixels, screen->pitch);
SDL_RenderClear(sdlRenderer);
SDL_RenderCopy(sdlRenderer, sdlTexture, NULL, NULL);
SDL_RenderPresent(sdlRenderer);

Why is there a call to SDL_RenderClear since we copy the texture on screen anyway just after ?

At least, if I comment SDL_RenderClear I still get correct results on screen. Maybe it's just to clear some parts of the screen near border and status bar, but isn't it too much to clear the whole screen on each frame ?

Or am I missing something ?

Nicolas



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/