5 #include <sigc++/trackable.h>
6 #include <msp/graphics/glcontext.h>
7 #include <msp/graphics/window.h>
17 Manages the presentation of rendering results on the screen.
19 class View: public sigc::trackable
22 Graphics::Window &window;
23 Graphics::GLContext &context;
25 const Renderable *content;
26 std::list<Camera *> synced_cameras;
29 View(Graphics::Window &, Graphics::GLContext &);
31 Graphics::Window &get_window() { return window; }
32 Graphics::GLContext &get_context() { return context; }
33 unsigned get_width() const { return window.get_width(); }
34 unsigned get_height() const { return window.get_height(); }
35 float get_aspect() const { return static_cast<float>(get_width())/get_height(); }
37 void set_content(const Renderable *);
38 void synchronize_camera_aspect(Camera &);
43 void window_resized(unsigned, unsigned);