]> git.tdb.fi Git - libs/gl.git/blob - source/render/windowview.h
Validate GLSL flow control
[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/glcontext.h>
6 #include <msp/graphics/window.h>
7 #include "view.h"
8
9 namespace Msp {
10 namespace GL {
11
12 class WindowView: public View
13 {
14 private:
15         Graphics::Window &window;
16         Graphics::GLContext &context;
17
18 public:
19         WindowView(Graphics::Window &, Graphics::GLContext &);
20
21         Graphics::Window &get_window() { return window; }
22         Graphics::GLContext &get_context() { return context; }
23         virtual unsigned get_width() const { return window.get_width(); }
24         virtual unsigned get_height() const { return window.get_height(); }
25
26         using View::render;
27         virtual void render(Renderer &);
28
29 private:
30         void window_resized(unsigned, unsigned);
31 };
32
33 } // namespace GL
34 } // namespace Msp
35
36 #endif