From 8bbb661c53f52d0e6f9c89aeffc626f66573f52d Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Wed, 11 Sep 2013 12:03:03 +0300 Subject: [PATCH] Add some documentation to the culler system --- source/culler.h | 7 +++++++ source/frustumculler.h | 3 +++ 2 files changed, 10 insertions(+) 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: -- 2.45.2