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<const Renderable *> RenderableSet;
20 typedef std::map<long, RenderableSet> InstanceMap;
22 InstanceMap renderables;
25 virtual void add(const Renderable &);
26 virtual void remove(const Renderable &);
28 virtual void setup_frame() const;
29 virtual void finish_frame() const;
32 virtual void render(Renderer &, const Tag &tag = Tag()) const;