X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Frender%2Fview.h;h=23425a86e3dff251322f219c6a337bac27e3bd0d;hb=282a10854eda602d874e200c8301cf57d6501e81;hp=df623c3a7d88b632e89a397609da0fba3d42d6c7;hpb=7aaec9a70b8d7733429bec043f8e33e02956f266;p=libs%2Fgl.git diff --git a/source/render/view.h b/source/render/view.h index df623c3a..23425a86 100644 --- a/source/render/view.h +++ b/source/render/view.h @@ -1,7 +1,6 @@ #ifndef MSP_GL_VIEW_H_ #define MSP_GL_VIEW_H_ -#include #include "framebuffer.h" namespace Msp { @@ -12,9 +11,13 @@ class Renderable; class Renderer; /** -Manages the presentation of rendering results on the screen. +An ultimate render target, which is typically visible to the user of the +application in some way. + +The content renderable's render() function is called with an empty tag. A +Sequence can be used to specify other tags and add post-processing. */ -class View: public sigc::trackable +class View { protected: Framebuffer ⌖ @@ -30,7 +33,10 @@ public: virtual unsigned get_height() const { return target.get_height(); } float get_aspect_ratio() const { return static_cast(get_width())/get_height(); } + /** Sets the camera to render with. The camera's aspect ratio is set to + match that of the view. */ void set_camera(Camera *); + void set_content(Renderable *); virtual void render();