From: Mikko Rasa Date: Thu, 15 Sep 2016 21:12:26 +0000 (+0300) Subject: Remove glViewport calls from GLContext X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=2deed84c84e513ee1c2a2fbbcd3946c1d772fcbb;p=libs%2Fgui.git Remove glViewport calls from GLContext They've been broken for a long time with mspgl, probably since framebuffer objects were implemented. The new GL::View class takes care of viewport size syncing better. --- diff --git a/source/graphics/cgl/glcontext.cpp b/source/graphics/cgl/glcontext.cpp index 8283825..748b9b1 100644 --- a/source/graphics/cgl/glcontext.cpp +++ b/source/graphics/cgl/glcontext.cpp @@ -75,7 +75,6 @@ void GLContext::swap_buffers() void GLContext::window_resized(unsigned w, unsigned h) { // XXX Call [context update] here? - glViewport(0, 0, w, h); } } // namespace Graphics diff --git a/source/graphics/egl_android/glcontext.cpp b/source/graphics/egl_android/glcontext.cpp index ecf9a63..0e98739 100644 --- a/source/graphics/egl_android/glcontext.cpp +++ b/source/graphics/egl_android/glcontext.cpp @@ -114,10 +114,8 @@ void GLContext::swap_buffers() eglSwapBuffers(priv->display, priv->surface); } -void GLContext::window_resized(unsigned w, unsigned h) -{ - glViewport(0, 0, w, h); -} +void GLContext::window_resized(unsigned, unsigned) +{ } void GLContext::Private::attach(WindowHandle native_window) diff --git a/source/graphics/glx/glcontext.cpp b/source/graphics/glx/glcontext.cpp index 26275a4..e4662f3 100644 --- a/source/graphics/glx/glcontext.cpp +++ b/source/graphics/glx/glcontext.cpp @@ -92,7 +92,6 @@ void GLContext::swap_buffers() void GLContext::window_resized(unsigned w, unsigned h) { XMoveResizeWindow(display.get_private().display, priv->subwnd, 0, 0, w, h); - glViewport(0, 0, w, h); } } // namespace Graphics diff --git a/source/graphics/wgl/glcontext.cpp b/source/graphics/wgl/glcontext.cpp index 05f9533..b6b2c5f 100644 --- a/source/graphics/wgl/glcontext.cpp +++ b/source/graphics/wgl/glcontext.cpp @@ -61,9 +61,7 @@ void GLContext::swap_buffers() } void GLContext::window_resized(unsigned w, unsigned h) -{ - glViewport(0, 0, w, h); -} +{ } } // namespace Graphics } // namespace Msp