1 #ifndef MSP_GL_INSTANCESCENE_H_
2 #define MSP_GL_INSTANCESCENE_H_
6 #include <msp/core/inttypes.h>
13 A Scene optimized for rendering instanced Renderables, such as ObjectInstances.
14 All Renderables with the same instance key are rendered consecutively; within
15 the same key rendering order is unspecified.
17 class InstanceScene: public Scene
20 typedef std::set<Renderable *> RenderableSet;
21 typedef std::map<IntPtr, RenderableSet> InstanceMap;
23 InstanceMap renderables;
26 virtual void add(Renderable &);
27 virtual void remove(Renderable &);
29 virtual void setup_frame(Renderer &);
30 virtual void finish_frame();
32 virtual void render(Renderer &, const Tag &tag = Tag()) const;