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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Moldytzu

Pages: [1]
1
Window / Re: Window only updates when I move the cursor over it
« on: October 09, 2021, 09:17:46 pm »
Fixed. I had to add context settings to the window and then it worked. Strange but it works.

2
Window / Window only updates when I move the cursor over it
« on: October 09, 2021, 07:45:11 pm »
Hi guys!

I'm a beginner with SFML and I made a basic game. The problem is that window only updates when I move the cursor over it. The code in the main function is

int main()
{
    new (&window) sf::RenderWindow(sf::VideoMode(800, 600), "My ugly game made with SFML");
    sf::Clock clock;
    while (window.isOpen())
    {
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed)
                window.close();
        }

        window.clear();
        drawEvent();
        window.display();
    }

    return 0;
}
 

And also I'm running Ubuntu 20.04 LTS with Openbox and LXDE.

Pages: [1]
anything