Hello,
I've currently a big and strange issue related to render textures and full-screen windows.
It's a really strange behavior : the render texture first "clear" or "draw" will cause the screen to blink for about 1s (the entire monitor, and even other monitors if using multiple monitors).
But only if the sfml window is full-screen and at topmost position.
Here is the minimal code where I was able to reproduce the problem:
#include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow window(sf::VideoMode(800, 600), "SFML window", sf::Style::Fullscreen);
sf::RenderTexture text;
text.create(100,100);
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
}
if (sf::Mouse::isButtonPressed(sf::Mouse::Left))
{
text.clear(); // First call will cause the screen to blink
}
window.clear(sf::Color::White);
window.display();
}
return 0;
}
When using render texture profusely it's a really big issue.
Somehow, I cant reproduce this behavior on every computers. In our offices, 3 out of 5 Windows computers are affected, but none with linux. It looks like a driver issue but I use the last AMD driver. I would love to know if it's a known issue and if there is a fix.
I tried some things and it appears that when the window is no longer foreground (if another window is above it), the monitor is no longer blinking.
Thanks !