]> git.tdb.fi Git - libs/gl.git/blob - source/orderedscene.h
Do not attempt to legacy-bind texture targets which do not support it
[libs/gl.git] / source / orderedscene.h
1 #ifndef MSP_GL_ORDEREDSCENE_H_
2 #define MSP_GL_ORDEREDSCENE_H_
3
4 #include <list>
5 #include "scene.h"
6
7 namespace Msp {
8 namespace GL {
9
10 /**
11 A scene that renders its contents in a specific order.  Inserting Renderables
12 in the middle and removing them are O(N) operations.
13 */
14 class OrderedScene: public Scene
15 {
16 private:
17         typedef std::list<Renderable *> RenderableList;
18
19         RenderableList renderables;
20
21 public:
22         virtual void add(Renderable &);
23         virtual void remove(Renderable &);
24         void prepend(Renderable &);
25         void insert(unsigned, Renderable &);
26         void insert_after(Renderable &, Renderable &);
27
28         virtual void setup_frame(Renderer &);
29         virtual void finish_frame();
30
31         using Scene::render;
32         virtual void render(Renderer &, const Tag & = Tag()) const;
33 };
34
35 } // namespace GL
36 } // namespace Msp
37
38 #endif