Code
//the classe function
GraphicInterface::draw( GraphicEngine * g)
{
loop_on_each_ressources
{
g->draw(&ressource);
}
}
//used in the game engine
Game::display()
{
current_interface.draw( &GraphicEngine );
}
Second one ( which i personnaly prefer .. ) is the Graphic engine taking a pointer to the interface , which has a function to return the ressources , and draw the ressources
Code
GraphicEngine::draw(GraphicInterface * gi)
{
some_iterator = gi.ressources();
looping_on_iterator
{
GraphicEngine::draw(iterator);
}
}
Failed so reposted ( can't edit .. sorry )