running OpenGL fix only when really needed
(second attempt)
This commit is contained in:
@@ -200,22 +200,23 @@ bool wxGLContext::SetCurrent(const wxGLCanvas& win) const
|
|||||||
|
|
||||||
[m_glContext makeCurrentContext];
|
[m_glContext makeCurrentContext];
|
||||||
|
|
||||||
// At least under macOS 10.14.5 we need to do this in order to update the
|
// the missing redraw upon resize problem only happens when linked against 10.14
|
||||||
// context with the new size information after the window is resized.
|
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_14
|
||||||
// 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
|
// 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.
|
// context with the new size information after the window is resized.
|
||||||
if ( WX_IS_MACOS_AVAILABLE_FULL(10, 14, 5) )
|
if ( WX_IS_MACOS_AVAILABLE_FULL(10, 14, 5) )
|
||||||
{
|
{
|
||||||
NSOpenGLView *v = (NSOpenGLView *)win.GetHandle();
|
if ( WX_IS_MACOS_AVAILABLE(10, 15) )
|
||||||
[v setOpenGLContext: m_glContext];
|
{
|
||||||
|
// no workaround needed under 10.15 anymore
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
NSOpenGLView *v = (NSOpenGLView *)win.GetHandle();
|
||||||
|
[v setOpenGLContext: m_glContext];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user