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.


Topics - Ocordu

Pages: [1]
1
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;
}
 

2
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