diff options
Diffstat (limited to 'vcl/source/opengl/OpenGLContext.cxx')
-rw-r--r-- | vcl/source/opengl/OpenGLContext.cxx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx index d2a5fc8a963b..d5ade0408fc5 100644 --- a/vcl/source/opengl/OpenGLContext.cxx +++ b/vcl/source/opengl/OpenGLContext.cxx @@ -333,14 +333,21 @@ void OpenGLContext::restoreDefaultFramebuffer() void OpenGLContext::setWinPosAndSize(const Point &rPos, const Size& rSize) { - if(m_xWindow) + if (m_xWindow) m_xWindow->SetPosSizePixel(rPos, rSize); - if( m_pChildWindow ) + if (m_pChildWindow) m_pChildWindow->SetPosSizePixel(rPos, rSize); GLWindow& rGLWin = getModifiableOpenGLWindow(); rGLWin.Width = rSize.Width(); rGLWin.Height = rSize.Height(); + adjustToNewSize(); +} + +void OpenGLContext::adjustToNewSize() +{ + const GLWindow& rGLWin = getOpenGLWindow(); + glViewport(0, 0, rGLWin.Width, rGLWin.Height); } void OpenGLContext::setWinSize(const Size& rSize) |