So I am back again after a few years with the same problem=/
I want to drawa bunch of dots connected by lines.
First the dots:
m_shape = Shape::Circle(pos, 5, Color(255, 100, 100));
m_shape.SetPosition(pos);
Then the lines:
Vector2f n1Pos = n1->GetPos();
Vector2f n2Pos = n2->GetPos();
m_shape = Shape::Line(n1Pos, n2Pos, 3, Color(200, 200, 200));
where n1 and n2 are two list iterators to dots and GetPos is defined as
return m_shape.GetPosition();
These are drawn like this:
//drawall edges
for(list<Edge>::iterator it = m_edges.begin(); it != m_edges.end(); it++)
{
m_app.Draw(it->GetShape());
}
//draw all Nodes
for(list<Node>::iterator it = m_nodes.begin(); it != m_nodes.end(); it++)
{
m_app.Draw(it->GetShape());
}
The problem is that all the lines are showing up fine but the dotsare not showing.
If i remove the
m_shape.SetPosition(pos);
from the dot constructor, it's the opposite