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_
22 A Scene optimized for rendering ObjectInstances. All instances of the same
23 Object are rendered in one go; otherwise the rendering order is unspecified.
25 class InstanceScene: public Scene
28 typedef std::set<const ObjectInstance *> InstanceSet;
29 typedef std::map<const Object *, InstanceSet> ObjectMap;
30 typedef std::set<const Renderable *> RenderableSet;
33 RenderableSet renderables;
36 virtual void add(const Renderable &);
37 virtual void remove(const Renderable &);
40 virtual void render(Renderer &, const Tag &tag = Tag()) const;