Transparent SMFL screen

Asked

Viewed 21 times

1

I just installed SFML, I did everything correctly as it seems, because the program does not indicate errors and I repeated the process carefully 3 times in codeblock and twice in visual studio (2017). I can compile the program that is used as an example on the site:

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

This program should show a green circle, however it is opening a window of the transparent

Janela ao lado do compilador com o título SFML...

Does anyone know the cause of this and how to fix it? If you can help, thank you.

No answers

Browser other questions tagged

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