SFML 2.3 Window doesn't display anything

474 Views Asked by At

I just set up my SFML 2.3 project using the official tutorial from sfml website. Everything runs but the window doesn't display that green circle. The picture below describes the problem clearly. The window just stays like that.

I used the code from the sfml tutorial on their website. Its the one from Learn -> SFML 2.3 -> SFML with Visual Studio. http://www.sfml-dev.org/tutorials/2.3/start-vc.php

#include <SFML/Graphics.hpp>

int main()
{
    sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
    sf::CircleShape shape(100.f);
    shape.setFillColor(sf::Color::Green);

    while (window.isOpen())
    {
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed)
                window.close();
        }

        window.clear();
        window.draw(shape);
        window.display();
    }

    return 0;
}

I tried using SFML 2.1 and it works well. What could it be? My graphics card is an Intel GMA 3150, it does suppot OpenGL up to 1.4. My buid runs on 32bit Windows 7.

1

There are 1 best solutions below

1
On BEST ANSWER

SFML 2.3 has added support for OpenGL 3. Probably SFML is defaulting to OpenGL 2 or 3. SFML Changelog 2.3