I've recently started learning SFML and I'm really happy with it myself. But, one of my friends reported that on his (pretty old) computer my programs are virtually unusable, with 5 frames per second (while on just a bit newer computers it ran at 200+ FPS).
That's the small program I've used to check which causes it:
#include <SFML/Graphics.hpp>
#include <sstream>
int main(){
sf::RenderWindow window(sf::VideoMode(800, 600), "");
sf::Texture texture; texture.loadFromFile("a.PNG");
sf::Sprite sprite(texture);
sf::Clock clock; float dt;
float square_x_position=0;
sf::RectangleShape rect(sf::Vector2f{100, 100});
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event)) {if (event.type == sf::Event::Closed) window.close();}
/* FPS counter */
dt = clock.getElapsedTime().asSeconds();
clock.restart();
std::ostringstream fps_counter;
fps_counter << 1/dt;
window.setTitle(fps_counter.str());
rect.setPosition(square_x_position++, 100);
window.clear();
window.draw(sprite);
window.draw(rect);
window.display();
}
return 0;
}
This program, which only rendered a 800x600 graphic and a moving square, ran at around 3-5FPS. When I removed the sprite/texture drawing part (and left only the screen clearing and drawing the rect), it jumped to 150-200FPS, still slower than I think it should be but at least usable.
May the main culprit here be the old video card? Radeon 9250 supports OGL 1.3 and DX 8.1 so it's pretty old, but it can run some other games much, much better than the computer which was able to run the sample program without problems. Is it simply an unavoidable compatibility issue?