]> git.tdb.fi Git - libs/gl.git/blobdiff - source/simplescene.h
Change Scene into an abstract base class and add a few subclasses
[libs/gl.git] / source / simplescene.h
diff --git a/source/simplescene.h b/source/simplescene.h
new file mode 100644 (file)
index 0000000..b28b5c0
--- /dev/null
@@ -0,0 +1,37 @@
+/* $Id$
+
+This file is part of libmspgl
+Copyright © 2010  Mikko Rasa, Mikkosoft Productions
+Distributed under the LGPL
+*/
+
+#ifndef MSP_GL_SIMPLESCENE_H_
+#define MSP_GL_SIMPLESCENE_H_
+
+#include <set>
+#include "scene.h"
+
+namespace Msp {
+namespace GL {
+
+/**
+The simplest possible Scene.  Rendering order is unspecified.
+*/
+class SimpleScene: public Scene
+{
+private:
+       typedef std::set<const Renderable *> RenderableSet;
+
+       RenderableSet renderables;
+
+public:
+       virtual void add(const Renderable &);
+       virtual void remove(const Renderable &);
+
+       virtual void render(const Tag &tag = Tag()) const;
+};
+
+} // namespace GL
+} // namespace Msp
+
+#endif