X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fview.h;h=bd39e8ff7f11c6835b07a62a233b858b60472735;hb=7791ca3eac17e355d1de508b1730dc854ed7712d;hp=81d7e051de0ec22d4757d61fcb31160cd269cd3c;hpb=d886d08441f45448ba98166f7dd15d35baf24905;p=libs%2Fgl.git diff --git a/source/view.h b/source/view.h index 81d7e051..bd39e8ff 100644 --- a/source/view.h +++ b/source/view.h @@ -22,6 +22,7 @@ private: Graphics::Window &window; Graphics::GLContext &context; Framebuffer ⌖ + Camera *camera; const Renderable *content; std::list synced_cameras; @@ -32,8 +33,12 @@ public: Graphics::GLContext &get_context() { return context; } unsigned get_width() const { return window.get_width(); } unsigned get_height() const { return window.get_height(); } + float get_aspect() const { return static_cast(get_width())/get_height(); } + void set_camera(Camera *); void set_content(const Renderable *); + + // Deprecated void synchronize_camera_aspect(Camera &); void render();