]> git.tdb.fi Git - libs/gl.git/blob - source/culler.h
Minor fixes, courtesy of Apple's compiler
[libs/gl.git] / source / culler.h
1 #ifndef MSP_GL_CULLER_H_
2 #define MSP_GL_CULLER_H_
3
4 namespace Msp {
5 namespace GL {
6
7 class Renderable;
8 class Renderer;
9
10 /**
11 Base class and interface for cullers.  Scenes can use cullers to avoid
12 rendering things that are not visible.
13 */
14 class Culler
15 {
16 protected:
17         Culler() { }
18 public:
19         virtual ~Culler() { }
20
21         /** Called once at the start of each rendering pass. */
22         virtual void setup_pass(const Renderer &) { };
23
24         /** Decides if a renderable should be culled.  If this returns true, the
25         renderable is skipped. */
26         virtual bool cull(const Renderer &, const Renderable &) const = 0;
27 };
28
29 } // namespace GL
30 } // namespace Msp
31
32 #endif