]> git.tdb.fi Git - libs/gl.git/blob - source/simplescene.h
Change Scene into an abstract base class and add a few subclasses
[libs/gl.git] / source / simplescene.h
1 /* $Id$
2
3 This file is part of libmspgl
4 Copyright © 2010  Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
6 */
7
8 #ifndef MSP_GL_SIMPLESCENE_H_
9 #define MSP_GL_SIMPLESCENE_H_
10
11 #include <set>
12 #include "scene.h"
13
14 namespace Msp {
15 namespace GL {
16
17 /**
18 The simplest possible Scene.  Rendering order is unspecified.
19 */
20 class SimpleScene: public Scene
21 {
22 private:
23         typedef std::set<const Renderable *> RenderableSet;
24
25         RenderableSet renderables;
26
27 public:
28         virtual void add(const Renderable &);
29         virtual void remove(const Renderable &);
30
31         virtual void render(const Tag &tag = Tag()) const;
32 };
33
34 } // namespace GL
35 } // namespace Msp
36
37 #endif