Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: White flicker at the window opening.  (Read 1431 times)

0 Members and 1 Guest are viewing this topic.

Putarda

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
White flicker at the window opening.
« 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();

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
White flicker at the window opening.
« Reply #1 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.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/