X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Frender%2Fwindowview.h;h=43b8d442ea85dd47fbf8745a0265f3c1d5086a68;hb=9e63512930bc7dace6dc169c65161961e5dcfcf6;hp=e61107a4790c2d492eda33c89de11af02b0213fa;hpb=791f266553f0e6c6fc006d96eb9bc2967beb7012;p=libs%2Fgl.git diff --git a/source/render/windowview.h b/source/render/windowview.h index e61107a4..43b8d442 100644 --- a/source/render/windowview.h +++ b/source/render/windowview.h @@ -2,29 +2,37 @@ #define MSP_GL_WINDOWVIEW_H_ #include -#include #include -#include "view.h" +#include "device.h" +#include "windowview_backend.h" namespace Msp { namespace GL { -class WindowView: public View, public sigc::trackable +/** +A view targeting a Graphics::Window. + +After rendering, the result is presented in the window. + +The aspect ratio of the view's Camera is automatically updated to match that of +the window. +*/ +class WindowView: public WindowViewBackend, public sigc::trackable { + friend WindowViewBackend; + 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(); } using View::render; - virtual void render(Renderer &); private: void window_resized(unsigned, unsigned);