From 4bd863e50d6ca102b2ddb4b33fd7632a1c195c8e Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sun, 10 Sep 2017 15:33:41 +0300 Subject: [PATCH] Immediately process window size to set correct viewport size The system framebuffer acquires its size from the window when the GL context is created, but in some use cases the window may change size before a View is created on it. --- source/view.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/source/view.cpp b/source/view.cpp index 1518b6ee..b4dcca99 100644 --- a/source/view.cpp +++ b/source/view.cpp @@ -17,6 +17,7 @@ View::View(Graphics::Window &w, Graphics::GLContext &c): content(0) { window.signal_resize.connect(sigc::mem_fun(this, &View::window_resized)); + window_resized(window.get_width(), window.get_height()); } void View::set_camera(Camera *c) -- 2.45.2