mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
internal/ui: set SwapInterval(0) when resizing the window
This mitigates flickering at least on macOS with OpenGL. Updates #2144
This commit is contained in:
parent
ac6843639d
commit
ac08ebe080
@ -773,7 +773,13 @@ func (u *userInterfaceImpl) registerWindowSetSizeCallback() {
|
||||
}
|
||||
|
||||
if u.graphicsDriver.IsGL() {
|
||||
glfw.SwapInterval(0)
|
||||
u.swapBuffers()
|
||||
if u.fpsMode == FPSModeVsyncOn {
|
||||
glfw.SwapInterval(1)
|
||||
} else {
|
||||
glfw.SwapInterval(0)
|
||||
}
|
||||
}
|
||||
|
||||
u.forceToRefreshIfNeeded()
|
||||
|
Loading…
Reference in New Issue
Block a user