]> git.tdb.fi Git - libs/gl.git/blob - source/render/windowview.h
Don't check group in get_unlit_inputs
[libs/gl.git] / source / render / windowview.h
1 #ifndef MSP_GL_WINDOWVIEW_H_
2 #define MSP_GL_WINDOWVIEW_H_
3
4 #include <sigc++/trackable.h>
5 #include <msp/graphics/window.h>
6 #include "device.h"
7 #include "windowview_backend.h"
8
9 namespace Msp {
10 namespace GL {
11
12 /**
13 A view targeting a Graphics::Window.
14
15 After rendering, the result is presented in the window.
16
17 The aspect ratio of the view's Camera is automatically updated to match that of
18 the window.
19 */
20 class WindowView: public WindowViewBackend, public sigc::trackable
21 {
22         friend WindowViewBackend;
23
24 private:
25         Graphics::Window &window;
26         Device &device;
27
28 public:
29         WindowView(Graphics::Window &);
30
31         Graphics::Window &get_window() { return window; }
32         virtual unsigned get_width() const { return window.get_width(); }
33         virtual unsigned get_height() const { return window.get_height(); }
34
35         using View::render;
36
37 private:
38         void window_resized(unsigned, unsigned);
39 };
40
41 } // namespace GL
42 } // namespace Msp
43
44 #endif