X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fculler.h;h=4d2bdb7b5d22e2e98a4f10bbeb7ac7a042762bc0;hb=922fac753e31d97fc88daa166e93e4c5572bd2ba;hp=c813f8d1fcba33efa37a35c45bf4461a4cba4f3b;hpb=4edd75061a1e24572bd672fb72e1bc1838008ce7;p=libs%2Fgl.git diff --git a/source/culler.h b/source/culler.h index c813f8d1..4d2bdb7b 100644 --- a/source/culler.h +++ b/source/culler.h @@ -7,6 +7,10 @@ namespace GL { class Renderable; class Renderer; +/** +Base class and interface for cullers. Scenes can use cullers to avoid +rendering things that are not visible. +*/ class Culler { protected: @@ -14,8 +18,11 @@ protected: public: virtual ~Culler() { } - virtual void setup_frame(const Renderer &) { }; + /** Called once at the start of each rendering pass. */ + virtual void setup_pass(const Renderer &) { }; + /** Decides if a renderable should be culled. If this returns true, the + renderable is skipped. */ virtual bool cull(const Renderer &, const Renderable &) const = 0; };