]> git.tdb.fi Git - libs/gl.git/blob - source/slot.h
Use a type registry to manage postprocessor types for pipeline templates
[libs/gl.git] / source / slot.h
1 #ifndef MSP_GL_SLOT_H_
2 #define MSP_GL_SLOT_H_
3
4 #include "renderable.h"
5
6 namespace Msp {
7 namespace GL {
8
9 /**
10 A container for a single renderable.  Can be used if a part of the scene graph
11 needs to be switched without affecting the rest.
12 */
13 class Slot: public Renderable
14 {
15 private:
16         Renderable *renderable;
17
18 public:
19         Slot();
20
21         void set(Renderable *);
22         Renderable *get() const { return renderable; }
23
24         virtual const Matrix *get_matrix() const;
25         virtual const Geometry::BoundingSphere<float, 3> *get_bounding_sphere() const;
26         virtual void setup_frame(Renderer &);
27         virtual void finish_frame();
28         virtual void render(Renderer &, const Tag &) const;
29 };
30
31 } // namespace GL
32 } // namespace Msp
33
34 #endif