X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fculler.h;h=4d2bdb7b5d22e2e98a4f10bbeb7ac7a042762bc0;hp=97dbcef3bc7a6798df5cf3e01ff44dd5328730ba;hb=8bbb661c53f52d0e6f9c89aeffc626f66573f52d;hpb=0777840f31274f75cb4ff8e6717c44c373d5e182 diff --git a/source/culler.h b/source/culler.h index 97dbcef3..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() { } + /** 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; };