3 This file is part of libmspgl
4 Copyright © 2010-2011 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
8 #ifndef MSP_GL_ORDEREDSCENE_H_
9 #define MSP_GL_ORDEREDSCENE_H_
12 #include <msp/gl/scene.h>
18 A scene that renders its contents in a specific order. Inserting Renderables
19 in the middle and removing them are O(N) operations.
21 class OrderedScene: public Scene
24 typedef std::list<const Renderable *> RenderableList;
26 RenderableList renderables;
29 virtual void add(const Renderable &);
30 virtual void remove(const Renderable &);
31 void prepend(const Renderable &);
32 void insert(unsigned, const Renderable &);
33 void insert_after(const Renderable &, const Renderable &);
36 virtual void render(Renderer &, const Tag & = Tag()) const;