]> git.tdb.fi Git - libs/gl.git/blob - source/render/slot.h
Check the flat qualifier from the correct member
[libs/gl.git] / source / render / 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 *content = 0;
17
18 public:
19         void set(Renderable *);
20         Renderable *get() const { return content; }
21
22         virtual const Matrix *get_matrix() const;
23         virtual const Geometry::BoundingSphere<float, 3> *get_bounding_sphere() const;
24         virtual void setup_frame(Renderer &);
25         virtual void finish_frame();
26         virtual void render(Renderer &, Tag) const;
27 };
28
29 } // namespace GL
30 } // namespace Msp
31
32 #endif