From: Mikko Rasa Date: Wed, 11 Sep 2013 09:03:03 +0000 (+0300) Subject: Add some documentation to the culler system X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=commitdiff_plain;h=8bbb661c53f52d0e6f9c89aeffc626f66573f52d Add some documentation to the culler system --- 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; }; diff --git a/source/frustumculler.h b/source/frustumculler.h index cef3bb8c..4d227602 100644 --- a/source/frustumculler.h +++ b/source/frustumculler.h @@ -7,6 +7,9 @@ namespace Msp { namespace GL { +/** +Culls objects that are outside of the view frustum. +*/ class FrustumCuller: public Culler { private: