]> git.tdb.fi Git - libs/gl.git/blob - source/view.h
Remove various old deprecated things
[libs/gl.git] / source / view.h
1 #ifndef MSP_GL_VIEW_H_
2 #define MSP_GL_VIEW_H_
3
4 #include <list>
5 #include "framebuffer.h"
6
7 namespace Msp {
8 namespace GL {
9
10 class Camera;
11 class Renderable;
12
13 /**
14 Manages the presentation of rendering results on the screen.
15 */
16 class View: public sigc::trackable
17 {
18 protected:
19         Framebuffer &target;
20         Camera *camera;
21         Renderable *content;
22
23         View(Framebuffer &);
24
25 public:
26         virtual unsigned get_width() const { return target.get_width(); }
27         virtual unsigned get_height() const { return target.get_height(); }
28         float get_aspect_ratio() const { return static_cast<float>(get_width())/get_height(); }
29
30         void set_camera(Camera *);
31         void set_content(Renderable *);
32
33         virtual void render();
34 };
35
36 } // namespace GL
37 } // namespace Msp
38
39 #endif