X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Frender%2Fwindowview.h;h=028e9805436797c35adfddf3c75d9ac47b084138;hb=f0414f06fc2463e9765c9492dce60e0468dceb3c;hp=8b6f1431d7a9df8d068a4c4975500445179797f0;hpb=7aaec9a70b8d7733429bec043f8e33e02956f266;p=libs%2Fgl.git diff --git a/source/render/windowview.h b/source/render/windowview.h index 8b6f1431..028e9805 100644 --- a/source/render/windowview.h +++ b/source/render/windowview.h @@ -2,24 +2,31 @@ #define MSP_GL_WINDOWVIEW_H_ #include -#include #include +#include "device.h" #include "view.h" namespace Msp { namespace GL { -class WindowView: public View +/** +A view targeting a Graphics::Window. + +After rendering, buffers are swapped to show the result in the window. + +The aspect ratio of the view's Camera is automatically updated to match that of +the window. +*/ +class WindowView: public View, public sigc::trackable { private: Graphics::Window &window; - Graphics::GLContext &context; + Device &device; public: - WindowView(Graphics::Window &, Graphics::GLContext &); + WindowView(Graphics::Window &); 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(); }