1 #ifndef MSP_GL_OCCLUDEDSCENE_H_
2 #define MSP_GL_OCCLUDEDSCENE_H_
14 A scene that performs occlusion queries on renderables to skip those that are
15 entirely occluded by others.
17 class OccludedScene: public Scene
20 struct OccludedRenderable
22 const Renderable *renderable;
23 const Geometry::BoundingSphere<float, 3> *bounding_sphere;
31 typedef std::set<const Renderable *> RenderableSet;
32 typedef std::vector<OccludedRenderable> OccludedArray;
35 Program bounding_shader;
36 RenderableSet renderables;
37 float occluder_min_size;
38 mutable OccludedArray occluded_cache;
39 mutable bool cache_dirty;
45 virtual void add(const Renderable &);
46 virtual void remove(const Renderable &);
48 virtual void render(Renderer &, const Tag &) const;