Problem with SFML in Code Blocks Windows 32 bits

Asked

Viewed 54 times

2

I installed SFML in Codeblocks using the instructions here

http://www.sfml-dev.org/tutorials/2.0/start-cb.php

So I compiled the sample code from there, which should display a window with a green circle:

#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;
}

The expected window appears, but without the green circle and it is transparent. What is wrong?

  • 1

    Prado, welcome to Sopt, go to Help and take the Tour. Avoid using links in questions, if used, use as "reference". You can edit it and put part of the code and explain your problem better. Green circle? If this is the case it is possible to paste figures or images, a "Printscreen", for example.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.