mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 03:38:55 +01:00
parent
80fbc9701c
commit
22e3db6814
@ -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)
|
u.window.SetMonitor(m, 0, 0, v.Width, v.Height, v.RefreshRate)
|
||||||
|
|
||||||
// Swapping buffer is necesary to prevent the image lag (#1004).
|
// Swapping buffer is necesary to prevent the image lag (#1004).
|
||||||
|
// TODO: This might not work when vsync is disabled.
|
||||||
if u.graphics.IsGL() {
|
if u.graphics.IsGL() {
|
||||||
glfw.PollEvents()
|
glfw.PollEvents()
|
||||||
u.swapBuffers()
|
u.swapBuffers()
|
||||||
@ -991,6 +992,7 @@ func (u *UserInterface) setScreenSize(width, height int, scale float64, fullscre
|
|||||||
if u.graphics.IsGL() {
|
if u.graphics.IsGL() {
|
||||||
// When OpenGL is used, swapping buffer is enough to solve the image-lag
|
// When OpenGL is used, swapping buffer is enough to solve the image-lag
|
||||||
// issue (#1004). Rather, recreating window destroys GPU resources.
|
// 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)
|
u.window.SetMonitor(nil, 0, 0, 16, 16, 0)
|
||||||
glfw.PollEvents()
|
glfw.PollEvents()
|
||||||
u.swapBuffers()
|
u.swapBuffers()
|
||||||
|
Loading…
Reference in New Issue
Block a user