3 This file is part of libmspgl
4 Copyright © 2007-2008, 2010-2011 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
8 #ifndef MSP_GL_INSTANCESCENE_H_
9 #define MSP_GL_INSTANCESCENE_H_
19 A Scene optimized for rendering instanced Renderables, such as ObjectInstances.
20 All Renderables with the same instance key are rendered consecutively; within
21 the same key rendering order is unspecified.
23 class InstanceScene: public Scene
26 typedef std::set<const Renderable *> RenderableSet;
27 typedef std::map<long, RenderableSet> InstanceMap;
29 InstanceMap renderables;
32 virtual void add(const Renderable &);
33 virtual void remove(const Renderable &);
36 virtual void render(Renderer &, const Tag &tag = Tag()) const;