From: Mikko Rasa Date: Sun, 10 Sep 2017 12:33:41 +0000 (+0300) Subject: Immediately process window size to set correct viewport size X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=4bd863e50d6ca102b2ddb4b33fd7632a1c195c8e;p=libs%2Fgl.git 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. --- 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)