From 22e3db68144de62d96f22156484c7e6860908d95 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sun, 8 Dec 2019 02:04:00 +0900 Subject: [PATCH] uidriver/glfw: Add comments Updates #1004 --- internal/uidriver/glfw/ui.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/uidriver/glfw/ui.go b/internal/uidriver/glfw/ui.go index 36b91bae5..f9c0a7eb7 100644 --- a/internal/uidriver/glfw/ui.go +++ b/internal/uidriver/glfw/ui.go @@ -982,6 +982,7 @@ func (u *UserInterface) setScreenSize(width, height int, scale float64, fullscre u.window.SetMonitor(m, 0, 0, v.Width, v.Height, v.RefreshRate) // Swapping buffer is necesary to prevent the image lag (#1004). + // TODO: This might not work when vsync is disabled. if u.graphics.IsGL() { glfw.PollEvents() u.swapBuffers() @@ -991,6 +992,7 @@ func (u *UserInterface) setScreenSize(width, height int, scale float64, fullscre if u.graphics.IsGL() { // When OpenGL is used, swapping buffer is enough to solve the image-lag // issue (#1004). Rather, recreating window destroys GPU resources. + // TODO: This might not work when vsync is disabled. u.window.SetMonitor(nil, 0, 0, 16, 16, 0) glfw.PollEvents() u.swapBuffers()