2 #include "objectinstance.h"
3 #include "instancescene.h"
9 void InstanceScene::add(const Renderable &r)
11 renderables[r.get_instance_key()].insert(&r);
14 void InstanceScene::remove(const Renderable &r)
16 InstanceMap::iterator i = renderables.find(r.get_instance_key());
17 if(i!=renderables.end())
25 void InstanceScene::render(Renderer &renderer, const Tag &tag) const
27 for(InstanceMap::const_iterator i=renderables.begin(); i!=renderables.end(); ++i)
28 for(RenderableSet::const_iterator j=i->second.begin(); j!=i->second.end(); ++j)
29 (*j)->render(renderer, tag);