1
Graphics / Re: No content is drawn.
« on: June 26, 2013, 07:34:59 pm »sf::RenderWindow window(sf::VideoMode(800, 600),
"The great Journey");
sf::CircleShape shape;
shape.setFillColor(sf::Color(0,0,255));
shape.setPosition(20, 20);//<--- was setOrigin... :(
shape.setRadius(4);
while(window.isOpen())
{
sf::Event event;
while(window.pollEvent(event))
{
if(event.type == sf::Event::Closed)
{
window.close();
break;
}
}
window.clear();
window.draw(shape);
window.display();
}
"The great Journey");
sf::CircleShape shape;
shape.setFillColor(sf::Color(0,0,255));
shape.setPosition(20, 20);//<--- was setOrigin... :(
shape.setRadius(4);
while(window.isOpen())
{
sf::Event event;
while(window.pollEvent(event))
{
if(event.type == sf::Event::Closed)
{
window.close();
break;
}
}
window.clear();
window.draw(shape);
window.display();
}
That gives me the black screen, but with the little blue circle. I mismatched setOrigin with setPosition
But my other content is still not visible on the main application.
I think it is a big internal reference problem with my own code. The blue circle is visible now, so don't think that the problem is from SFML. Damn... even after nearly 8 years of experience I do that kind of simple failures...
Thanks for the support. Will post the possible solution later when I found it... maybe someone is interested.
EDIT:
Got the problem. The resize-event code is a bit different to SFML 1.6. I changed my own resize code to the SFML 2.0 supported one and the content is now visible.
Thanks for the support. Thread can be closed.