X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fview.cpp;h=1518b6ee76b6012f51a4774ba7b5a5635e554d9d;hb=4fe225bf15048fcb7a678370f87d09f2de37031a;hp=115a4b0cd77eefc93c5a6db580e943eeaf6a81c9;hpb=540f976c5f0fcee4fbf0edfdace246f4a3588f65;p=libs%2Fgl.git diff --git a/source/view.cpp b/source/view.cpp index 115a4b0c..1518b6ee 100644 --- a/source/view.cpp +++ b/source/view.cpp @@ -22,6 +22,8 @@ View::View(Graphics::Window &w, Graphics::GLContext &c): void View::set_camera(Camera *c) { camera = c; + if(camera) + camera->set_aspect(static_cast(window.get_width())/window.get_height()); } void View::set_content(Renderable *r)