Windows: Set opengl swap interval whenever we make a new window current
Apparently the windows OpenGL implementation associates the swap interval not with the context, but with the window. Fixes: QTBUG-59660 Change-Id: I78c4cc9f8a5815779a7489edfd731a1debb1e590 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
parent
024daeb08c
commit
730f0df17d
|
|
@ -1350,10 +1350,10 @@ bool QWindowsGLContext::makeCurrent(QPlatformSurface *surface)
|
|||
// Set the swap interval
|
||||
if (m_staticContext->wglSwapInternalExt) {
|
||||
const int interval = surface->format().swapInterval();
|
||||
if (interval >= 0 && m_swapInterval != interval) {
|
||||
if (m_swapInterval != interval)
|
||||
m_swapInterval = interval;
|
||||
if (interval >= 0)
|
||||
m_staticContext->wglSwapInternalExt(interval);
|
||||
}
|
||||
}
|
||||
|
||||
return success;
|
||||
|
|
|
|||
Loading…
Reference in New Issue