]> git.tdb.fi Git - libs/gl.git/blobdiff - source/render/orderedscene.h
Store simpler states by value in PipelineState
[libs/gl.git] / source / render / orderedscene.h
index 53f7b008bd4965c61ca5f28291b10993b0b251c8..b7fa8c6c66869c2dbc52ed09aeea9aa4fa05d59e 100644 (file)
@@ -1,22 +1,22 @@
 #ifndef MSP_GL_ORDEREDSCENE_H_
 #define MSP_GL_ORDEREDSCENE_H_
 
-#include <list>
+#include <vector>
 #include "scene.h"
 
 namespace Msp {
 namespace GL {
 
 /**
-A scene that renders its contents in a specific order.  Inserting Renderables
-in the middle and removing them are O(N) operations.
+A scene which renders its contents in a specific order.
 */
 class OrderedScene: public Scene
 {
-private:
-       typedef std::list<Renderable *> RenderableList;
+public:
+       using Scene::Loader;
 
-       RenderableList renderables;
+private:
+       std::vector<Renderable *> content;
 
 public:
        virtual void add(Renderable &);
@@ -28,8 +28,7 @@ public:
        virtual void setup_frame(Renderer &);
        virtual void finish_frame();
 
-       using Scene::render;
-       virtual void render(Renderer &, const Tag & = Tag()) const;
+       virtual void render(Renderer &, Tag = Tag()) const;
 };
 
 } // namespace GL