So basically i dont know how to draw one layer on another in SFML. Ive got a layer of sf::ConvexShape
, and know i want to draw sf::CircleShape
randomly on it, the problem is that I cant draw it OLNY on that layer.
And the question is now, how to make a mask to draw ONLY on one or more (vector) layers. I already tried to make a border form one corner of tree segment to another but it doesnt work at all.
for (int i = 0; i < Swiatelka.size(); ++i)
{
if (Swiatelka[i].getPosition().x == (info.winWidth/2) - (choinka[1].getLocalBounds().width/2) || Swiatelka[i].getPosition().x == (info.winWidth / 2) + (choinka[1].getLocalBounds().width / 2))
{
continue;
}
else
{
window.draw(Swiatelka[i]);
}
}