Hello there,
I try to develop some SFML app on Linux Mint but I get random offsets in my scene. I would like to know if this has something to do with SFML or maybe with my desktop manager.
Correct:
Wrong:
My code looks like this:
#include <SFML/Graphics.hpp>
#include <tmx/MapLoader.h>
int main()
{
sf::RectangleShape rect(sf::Vector2f(50,50));
rect.setPosition(sf::Vector2f(0,0));
sf::RenderWindow window(sf::VideoMode(640, 480), "SFML works!", sf::Style::Close);
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
}
window.clear(sf::Color(0,255,0,255));
window.draw(rect);
window.display();
}
return 0;
}
This problem occurs about half the time, no matter what configuration (Debug/Release).
Thanks for any help in advance.