X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Finstancescene.cpp;fp=source%2Finstancescene.cpp;h=7b0979c8f5c0923d523e09a614a5acd977914fc9;hb=db498c7e634fa999cf4b4a8b67c49813009b1790;hp=6ddfa0d2c5a2dd44cf2e33e6980b98466a15caa5;hpb=ab59f5a9e66b3fc7872ad96ec7949940189f0819;p=libs%2Fgl.git diff --git a/source/instancescene.cpp b/source/instancescene.cpp index 6ddfa0d2..7b0979c8 100644 --- a/source/instancescene.cpp +++ b/source/instancescene.cpp @@ -22,6 +22,20 @@ void InstanceScene::remove(const Renderable &r) } } +void InstanceScene::setup_frame() const +{ + for(InstanceMap::const_iterator i=renderables.begin(); i!=renderables.end(); ++i) + for(RenderableSet::const_iterator j=i->second.begin(); j!=i->second.end(); ++j) + (*j)->setup_frame(); +} + +void InstanceScene::finish_frame() const +{ + for(InstanceMap::const_iterator i=renderables.begin(); i!=renderables.end(); ++i) + for(RenderableSet::const_iterator j=i->second.begin(); j!=i->second.end(); ++j) + (*j)->finish_frame(); +} + void InstanceScene::render(Renderer &renderer, const Tag &tag) const { for(InstanceMap::const_iterator i=renderables.begin(); i!=renderables.end(); ++i)