X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fslot.h;fp=source%2Fslot.h;h=ad8630172308c71356db7a9ec9beab388628b7de;hp=0000000000000000000000000000000000000000;hb=c895aa82dd405146f648e5ca3fcfaa326eab9b87;hpb=c44c350892a4955c7457abe1cbb81bbf0a22a86c diff --git a/source/slot.h b/source/slot.h new file mode 100644 index 00000000..ad863017 --- /dev/null +++ b/source/slot.h @@ -0,0 +1,34 @@ +#ifndef MSP_GL_SLOT_H_ +#define MSP_GL_SLOT_H_ + +#include "renderable.h" + +namespace Msp { +namespace GL { + +/** +A container for a single renderable. Can be used if a part of the scene graph +needs to be switched without affecting the rest. +*/ +class Slot: public Renderable +{ +private: + Renderable *renderable; + +public: + Slot(); + + void set(Renderable *); + Renderable *get() const { return renderable; } + + virtual const Matrix *get_matrix() const; + virtual const Geometry::BoundingSphere *get_bounding_sphere() const; + virtual void setup_frame(Renderer &); + virtual void finish_frame(); + virtual void render(Renderer &, const Tag &) const; +}; + +} // namespace GL +} // namespace Msp + +#endif