From e6ae83c386427b1cd2840e5f8059310e8b4fb3ea Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Thu, 22 Aug 2019 19:02:02 +0200 Subject: [PATCH] running OpenGL fix only when really needed --- src/osx/cocoa/glcanvas.mm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/osx/cocoa/glcanvas.mm b/src/osx/cocoa/glcanvas.mm index 44646ba9c8..3bb102e8a1 100644 --- a/src/osx/cocoa/glcanvas.mm +++ b/src/osx/cocoa/glcanvas.mm @@ -199,6 +199,15 @@ bool wxGLContext::SetCurrent(const wxGLCanvas& win) const [m_glContext update]; [m_glContext makeCurrentContext]; + + // At least under macOS 10.14.5 we need to do this in order to update the + // context with the new size information after the window is resized. +// if ( WX_IS_MACOS_AVAILABLE_FULL(10, 14, 5) ) + { + NSOpenGLView *v = (NSOpenGLView *)win.GetHandle(); + [v setOpenGLContext: m_glContext]; + } + // At least under macOS 10.14.5 we need to do this in order to update the // context with the new size information after the window is resized.