X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fsimplescene.cpp;fp=source%2Fsimplescene.cpp;h=b410374e68de5b18b7e52ae10c45fc083a03903a;hp=0000000000000000000000000000000000000000;hb=9addd3d476245415244e59333a36a8fc0eae42bf;hpb=6fa59eb26c39443eb44feecd17b7a8ea45411730 diff --git a/source/simplescene.cpp b/source/simplescene.cpp new file mode 100644 index 00000000..b410374e --- /dev/null +++ b/source/simplescene.cpp @@ -0,0 +1,30 @@ +/* $Id$ + +This file is part of libmspgl +Copyright © 2010 Mikko Rasa, Mikkosoft Productions +Distributed under the LGPL +*/ + +#include "simplescene.h" + +namespace Msp { +namespace GL { + +void SimpleScene::add(const Renderable &r) +{ + renderables.insert(&r); +} + +void SimpleScene::remove(const Renderable &r) +{ + renderables.erase(&r); +} + +void SimpleScene::render(const Tag &tag) const +{ + for(RenderableSet::const_iterator i=renderables.begin(); i!=renderables.end(); ++i) + (*i)->render(tag); +} + +} // namespace GL +} // namespace Msp