I just switched to Ubuntu and tried using SFML, however my RenderWindow only updates when I move the mouse cursor over it.
I use the code from the tutorial about Sprites and move the sprite by a tiny amount each frame. If I move the mouse for a few seconds the window keeps updating after I stop moving it, but after a few seconds the window stops updating.
#include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow App(sf::VideoMode(800, 600), "SFML window");
sf::Image Image;
Image.LoadFromFile("data/circle.png");
sf::Sprite Sprite(Image);
while (App.IsOpened())
{
sf::Event event;
while (App.GetEvent(event))
{
if (event.Type == sf::Event::Closed)
App.Close();
}
sprite.Move(20 * App.GetFrameTime(), 0);
// Clear screen
App.Clear();
App.Draw(sprite);
// Update the window
App.Display();
}
return 0;
}