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 - Grimnack

Pages: [1]
1
Window / Re: on start,window freezes
« on: April 06, 2021, 10:05:13 pm »
i dont have any particular reason to use sf::Window.Just following examples on the website.So i have no practical need to sf::Window?
sf::renderWindow would suffice for all my needs?

2
Window / Re: on start,window freezes
« on: April 05, 2021, 11:28:53 pm »
error: ‘class sf::Window’ has no member named ‘clear’.
I think those are for renderWindow class.

3
Window / on start,window freezes
« on: April 05, 2021, 09:27:33 pm »
So the window on starting,simply freezes.All i see is the border of the window and the desktop background.Even with the simplest example on this website,i get that rezult.

#include <SFML/Window.hpp>
int main()
{
    sf::Window window(sf::VideoMode(800, 600), "My window");
    // run the program as long as the window is open
    while (window.isOpen())
    {
        // check all the window's events that were triggered since the last iteration of the loop
        sf::Event event;
        while (window.pollEvent(event))
        {
            // "close requested" event: we close the window
            if (event.type == sf::Event::Closed)
                window.close();
        }
    }
    return 0;
}
Now this doesn't happen with renderWindow,but renderWindow starts and quits immediatly.
At least he starts....i get a glimpse of the window.
I use Ubuntu  Mate 20.04.2 LTS 64bit
latest sfml
gcc 9.3.0
Thoughts?

Pages: [1]
anything