From 2deed84c84e513ee1c2a2fbbcd3946c1d772fcbb Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Fri, 16 Sep 2016 00:12:26 +0300 Subject: [PATCH] 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. --- source/graphics/cgl/glcontext.cpp | 1 - source/graphics/egl_android/glcontext.cpp | 6 ++---- source/graphics/glx/glcontext.cpp | 1 - source/graphics/wgl/glcontext.cpp | 4 +--- 4 files changed, 3 insertions(+), 9 deletions(-) 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 -- 2.45.2