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

Author Topic: Window stops updating when dragged to a different screen, common problem?  (Read 2441 times)

0 Members and 1 Guest are viewing this topic.

TobinTelder

  • Newbie
  • *
  • Posts: 1
    • View Profile
System specific behavior. Basically I'm using a laptop with two graphics cards, one which apparently handles my second monitor. Normally the more powerful graphics card takes over the main laptop screen but for whatever reason doesn't judge my program important enough so leaves it to the Intel Integrated Graphics whic stops sending updated draws when the window gets too far away from it's domain. It's a screwy edge case but everything works fine if I force the program to run on the dedicated graphics card.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
It's more an excuse than a real reason, but since SFML doesn't support multiple monitors at the moment, this use case of moving windows around isn't really covered. :D
However even if it was, I'm not sure we can do much about your Intel GPU not rendering the window on the second monitor. You'll probably experience the same issue with other games if you force them to run with the Intel chip.

My recommendation is to place SFML_DEFINE_DISCRETE_GPU_PREFERENCE in the global scope of a source file that will be linked into the final executable. Typically it is best to place it where the main function is also defined.
This will tell your system to prefer the discrete GPU over the integrated chip, see also: https://www.sfml-dev.org/documentation/2.5.1/GpuPreference_8hpp.php
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/