X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Foccludedscene.h;h=2898bb3ff92032c703c916232ae7459845c0fe8c;hp=6f5e23bd0d175c4572bb67df608d43328444ebd3;hb=HEAD;hpb=120fd27fdb0b1302ef8d4367446f93cc1a116b7b diff --git a/source/occludedscene.h b/source/occludedscene.h deleted file mode 100644 index 6f5e23bd..00000000 --- a/source/occludedscene.h +++ /dev/null @@ -1,61 +0,0 @@ -#ifndef MSP_GL_OCCLUDEDSCENE_H_ -#define MSP_GL_OCCLUDEDSCENE_H_ - -#include -#include -#include "mesh.h" -#include "program.h" -#include "scene.h" - -namespace Msp { -namespace GL { - -/** -A scene that performs occlusion queries on renderables to skip those that are -entirely occluded by others. -*/ -class OccludedScene: public Scene -{ -private: - struct OccludedRenderable - { - Renderable *renderable; - const Geometry::BoundingSphere *bounding_sphere; - bool in_frustum; - bool occluder; - unsigned query; - - OccludedRenderable(); - }; - - typedef std::set RenderableSet; - typedef std::vector OccludedArray; - - Mesh bounding_mesh; - Program bounding_shader; - RenderableSet renderables; - float occluder_min_size; - mutable OccludedArray occluded_cache; - mutable bool cache_dirty; - -public: - OccludedScene(); - ~OccludedScene(); - - virtual void add(Renderable &); - virtual void remove(Renderable &); - -private: - void populate_cache() const; - -public: - virtual void setup_frame(Renderer &); - virtual void finish_frame(); - - virtual void render(Renderer &, const Tag &) const; -}; - -} // namespace GL -} // namespace Msp - -#endif