I'm used to using SDL for C++ but I heard that SFML is better so I tried it. I tried to render a basic sprite and that didn't work. Then I tried to clear the window to a different colour and that didn't work. It's simple code so what is going on? (Spacing is a little off for some reason, sorry)
#include <iostream>
#include "SFML/Graphics.hpp"
int main(){
sf::RenderWindow window(sf::VideoMode(640, 480), "It worked");
sf::Texture boxTexture;
boxTexture.loadFromFile("box.png");
while (window.isOpen()){
window.clear(sf::Color::Blue);
sf::CircleShape circle;
circle.setRadius(10);
circle.setPosition(1, 1);
circle.setFillColor(sf::Color::Blue);
window.draw(circle);
window.display();
}
return 0;
}
All this does is display a white screen... It won't change the background to blue. Does anyone know what I am doing wrong?