1 #ifndef MSP_GL_INSTANCESCENE_H_
2 #define MSP_GL_INSTANCESCENE_H_
12 A Scene optimized for rendering instanced Renderables, such as ObjectInstances.
13 All Renderables with the same instance key are rendered consecutively; within
14 the same key rendering order is unspecified.
16 class InstanceScene: public Scene
19 typedef std::set<Renderable *> RenderableSet;
20 typedef std::map<long, RenderableSet> InstanceMap;
22 InstanceMap renderables;
25 virtual void add(Renderable &);
26 virtual void remove(Renderable &);
28 virtual void setup_frame(Renderer &);
29 virtual void finish_frame();
31 virtual void render(Renderer &, const Tag &tag = Tag()) const;