X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Frender%2Fwindowview.h;fp=source%2Frender%2Fwindowview.h;h=8b6f1431d7a9df8d068a4c4975500445179797f0;hb=7aaec9a70b8d7733429bec043f8e33e02956f266;hp=0000000000000000000000000000000000000000;hpb=bec07999d95b76f4b47cffcc564d0cd0afc0435e;p=libs%2Fgl.git diff --git a/source/render/windowview.h b/source/render/windowview.h new file mode 100644 index 00000000..8b6f1431 --- /dev/null +++ b/source/render/windowview.h @@ -0,0 +1,36 @@ +#ifndef MSP_GL_WINDOWVIEW_H_ +#define MSP_GL_WINDOWVIEW_H_ + +#include +#include +#include +#include "view.h" + +namespace Msp { +namespace GL { + +class WindowView: public View +{ +private: + Graphics::Window &window; + Graphics::GLContext &context; + +public: + WindowView(Graphics::Window &, Graphics::GLContext &); + + Graphics::Window &get_window() { return window; } + Graphics::GLContext &get_context() { return context; } + virtual unsigned get_width() const { return window.get_width(); } + virtual unsigned get_height() const { return window.get_height(); } + + using View::render; + virtual void render(Renderer &); + +private: + void window_resized(unsigned, unsigned); +}; + +} // namespace GL +} // namespace Msp + +#endif