]> git.tdb.fi Git - libs/gl.git/blobdiff - source/culler.h
Add some documentation to the culler system
[libs/gl.git] / source / culler.h
index 97dbcef3bc7a6798df5cf3e01ff44dd5328730ba..4d2bdb7b5d22e2e98a4f10bbeb7ac7a042762bc0 100644 (file)
@@ -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;
 };