I have a base class Entity : public sf::Drawable, public sf::Transformable
I have 2 derived classes Player and Silhouette
Player owns a singular Silhouette object and a deque of Silhouette objects.
I apply a shader to both the singlular object and the deque.
The singular object's shader works fine, the deque's shader has no effect.
Some of the code:
for (auto const& s : Subjects) // Subjects has a Player pointer
{
if (s->is_silhouette()) // not relevant
{
WINDOW.draw(s->objSilhouette, &shColor); // works fine
}
}
for (auto const& s : Subjects)
{
for (auto const& e : s->Trail) // Trail is the deque of Silhouette objects
{
WINDOW.draw(e), &shColor; // doesn't work!
}
}