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?
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.
– Leo