1
Graphics / Are shapes even drawable in 2.0...?
« on: July 13, 2012, 04:11:59 am »
So I've had nothing but terrible luck with 2.0. I finally got some time to sit down and mess around with it again, and now I can't get anything to draw. According to the documentation, I'm doing nothing wrong (unless this is some linking issue which every bug seems to be related to).
I've tried it this way, tried giving it an initial position explicitly, tried creating it dynamically like that would help. All to no avail. And don't tell me to "search the forums". I have.
EDIT:
Had a piece of old code that made no sense. Not related to problem.
sf::CircleShape ball;
ball.setRadius(250);
ball.setFillColor(sf::Color::Red);
ball.setOutlineColor(sf::Color::Red);
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
{
window.close();
}
}
window.clear();
window.draw(ball);
window.display();
}
ball.setRadius(250);
ball.setFillColor(sf::Color::Red);
ball.setOutlineColor(sf::Color::Red);
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
{
window.close();
}
}
window.clear();
window.draw(ball);
window.display();
}
I've tried it this way, tried giving it an initial position explicitly, tried creating it dynamically like that would help. All to no avail. And don't tell me to "search the forums". I have.
EDIT:
Had a piece of old code that made no sense. Not related to problem.