[SDL] Weird behaviour on the Raspberry Pi

rtrussell news at rtrussell.co.uk
Wed Sep 28 08:59:48 PDT 2016


Andreas Falkenhahn wrote:
> Is that a bug in my code or in SDL's Pi backend?

One thing I would question is that there's no SDL_RenderClear().  The docs say "You are strongly encouraged to call SDL_RenderClear() to initialize the backbuffer before starting each new frame's drawing".  Does it make any difference if you change it as follows:
 

Code:
		SDL_SetRenderTarget(renderer, NULL);
		SDL_SetRenderDrawColor(renderer, 0, 0, 0, 255);
		SDL_RenderClear(renderer);
		SDL_RenderCopy(renderer, texture3, NULL, NULL);
		SDL_RenderPresent(renderer);


Richard.




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20160928/cebdb3f4/attachment-0001.htm>


More information about the SDL mailing list