X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Frender%2Foccludedscene.h;h=d51b29b36c87def2ef0ed1e7c30544a0aabea148;hb=f19366d32cc29287a2730cfba90893e407754081;hp=056acb2e0d12b2e14f74fcbffcde37cee09f7674;hpb=e9a898f315b5d1396f196d785913a283c30940f2;p=libs%2Fgl.git diff --git a/source/render/occludedscene.h b/source/render/occludedscene.h index 056acb2e..d51b29b3 100644 --- a/source/render/occludedscene.h +++ b/source/render/occludedscene.h @@ -3,13 +3,17 @@ #include #include -#include "mesh.h" -#include "program.h" +#include "blend.h" +#include "depthtest.h" +#include "query.h" #include "scene.h" namespace Msp { namespace GL { +class Mesh; +class Program; + /** A scene that performs occlusion queries on renderables to skip those that are entirely occluded by others. @@ -26,21 +30,22 @@ private: const Geometry::BoundingSphere *bounding_sphere; bool in_frustum; bool occluder; - unsigned query; OccludedRenderable(); }; const Mesh &bounding_mesh; const Program &bounding_shader; + Blend no_color_write; + DepthTest no_depth_write; std::set renderables; float occluder_min_size; + mutable QueryPool queries; mutable std::vector occluded_cache; mutable bool cache_dirty; public: OccludedScene(); - ~OccludedScene(); virtual void add(Renderable &); virtual void remove(Renderable &);