SFML community forums

Help => Graphics => Topic started by: Putarda on November 20, 2016, 02:47:07 am

Title: White flicker at the window opening.
Post by: Putarda on November 20, 2016, 02:47:07 am
At the window opening, little white screen appears for a 0.1 seconds. That's not a big problem, but it irritates me. Is it because of debuging? Or maybe it's because startDraw and startRun functions start at the same time (code below).

                sf::Thread run_thread(&Engine::startRun, this);

                createWindow(window_build);

                run_thread.launch();

                startDraw();
Title: White flicker at the window opening.
Post by: eXpl0it3r on November 20, 2016, 07:18:49 pm
With the current implementation the window is white after creation. It will stay white until you do the first clear/display call. The more time you spend between creation and your game loop, the longer it will stay white.

A workaround is to clear/display the window right after its creation.