1 #ifndef MSP_GL_WINDOWVIEW_H_
2 #define MSP_GL_WINDOWVIEW_H_
4 #include <sigc++/trackable.h>
5 #include <msp/graphics/window.h>
7 #include "windowview_backend.h"
13 A view targeting a Graphics::Window.
15 After rendering, buffers are swapped to show the result in the window.
17 The aspect ratio of the view's Camera is automatically updated to match that of
20 class WindowView: public WindowViewBackend, public sigc::trackable
23 Graphics::Window &window;
27 WindowView(Graphics::Window &);
29 Graphics::Window &get_window() { return window; }
30 virtual unsigned get_width() const { return window.get_width(); }
31 virtual unsigned get_height() const { return window.get_height(); }
34 virtual void render(Renderer &);
37 void window_resized(unsigned, unsigned);