+/* $Id$
+
+This file is part of libmspgl
+Copyright © 2007 Mikko Rasa, Mikkosoft Productions
+Distributed under the LGPL
+*/
+
+#include "scene.h"
+
+using namespace std;
+
+namespace Msp {
+namespace GL {
+
+void Scene::add(const Renderable &r)
+{
+ renderables.insert(&r);
+}
+
+void Scene::remove(const Renderable &r)
+{
+ renderables.erase(&r);
+}
+
+void Scene::render() const
+{
+ for(set<const Renderable *>::const_iterator i=renderables.begin(); i!=renderables.end(); ++i)
+ (*i)->render();
+}
+
+void Scene::render(const string &pn) const
+{
+ for(set<const Renderable *>::const_iterator i=renderables.begin(); i!=renderables.end(); ++i)
+ if((*i)->has_pass(pn))
+ (*i)->render(pn);
+}
+
+} // namespace GL
+} // namespace Msp