]> git.tdb.fi Git - libs/gl.git/blobdiff - source/render/occludedscene.h
Use QueryPool in OccludedScene
[libs/gl.git] / source / render / occludedscene.h
index 056acb2e0d12b2e14f74fcbffcde37cee09f7674..f11c707e6781c0ea656a7676e733e3981209ea41 100644 (file)
@@ -3,8 +3,11 @@
 
 #include <set>
 #include <vector>
+#include "blend.h"
+#include "depthtest.h"
 #include "mesh.h"
 #include "program.h"
+#include "query.h"
 #include "scene.h"
 
 namespace Msp {
@@ -26,21 +29,22 @@ private:
                const Geometry::BoundingSphere<float, 3> *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<Renderable *> renderables;
        float occluder_min_size;
+       mutable QueryPool queries;
        mutable std::vector<OccludedRenderable> occluded_cache;
        mutable bool cache_dirty;
 
 public:
        OccludedScene();
-       ~OccludedScene();
 
        virtual void add(Renderable &);
        virtual void remove(Renderable &);