2 #include "windowview.h"
9 WindowView::WindowView(Graphics::Window &w):
11 device(Device::get_current())
13 window.signal_resize.connect(sigc::mem_fun(this, &WindowView::window_resized));
14 window_resized(window.get_width(), window.get_height());
17 void WindowView::window_resized(unsigned w, unsigned h)
19 resize_framebuffer(w, h);
20 float aspect = static_cast<float>(w)/h;
22 camera->set_aspect_ratio(aspect);