X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Foccludedscene.h;fp=source%2Foccludedscene.h;h=0000000000000000000000000000000000000000;hb=7aaec9a70b8d7733429bec043f8e33e02956f266;hp=2898bb3ff92032c703c916232ae7459845c0fe8c;hpb=bec07999d95b76f4b47cffcc564d0cd0afc0435e;p=libs%2Fgl.git diff --git a/source/occludedscene.h b/source/occludedscene.h deleted file mode 100644 index 2898bb3f..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 & = Tag()) const; -}; - -} // namespace GL -} // namespace Msp - -#endif