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

Pages: [1]
1
General / Re: setFramerateLimit doesn't work
« on: February 09, 2014, 07:50:05 pm »
Try at least with a call to game.display()

[edit]oops, didn't see it was a double post...: http://en.sfml-dev.org/forums/index.php?topic=14364

Thanks  :)

2
Window / Re: setFramerateLimit doesn't work
« on: February 09, 2014, 07:49:40 pm »
you need to use
game.display();

Thanks  :)

3
General / setFramerateLimit doesn't work
« on: February 09, 2014, 07:07:44 pm »
My application uses a large amount of CPU regardless of if it's set or not.

#include <SFML/Graphics.hpp>

int main() {
    sf::RenderWindow game(sf::VideoMode(800, 450), "Survive++");
    game.setFramerateLimit(60);
    while (game.isOpen()) {
        sf::Event event;
        while (game.pollEvent(event)) {
            if (event.type == sf::Event::Closed) {
                game.close();
            }
        }
    }
    return 0;
}
 

4
Window / setFramerateLimit doesn't work
« on: February 09, 2014, 06:52:00 pm »
My application uses a large amount of CPU regardless of if it's set or not.

#include <SFML/Graphics.hpp>

int main() {
    sf::RenderWindow game(sf::VideoMode(800, 450), "Survive++");
    game.setFramerateLimit(60);
    while (game.isOpen()) {
        sf::Event event;
        while (game.pollEvent(event)) {
            if (event.type == sf::Event::Closed) {
                game.close();
            }
        }
    }
    return 0;
}
 

Pages: [1]
anything