app/internal/window: re-create EGL surface on resizing

This is effectively a revert of 60e4cca934, which
seems to have caused flickering problems on some versions of Windows.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-11-07 11:31:17 +01:00
parent 97299dc2f9
commit 237a8dad8f
-5
View File
@@ -142,8 +142,6 @@ func (c *context) MakeCurrent() error {
return nil return nil
} }
c.width, c.height = width, height c.width, c.height = width, height
// Do not re-create surfaces when only resizing. This prevents flickering when resizing on X11.
if c.eglWin != win {
if win == nilEGLNativeWindowType && c.srgbFBO != nil { if win == nilEGLNativeWindowType && c.srgbFBO != nil {
c.srgbFBO.Release() c.srgbFBO.Release()
c.srgbFBO = nil c.srgbFBO = nil
@@ -167,9 +165,6 @@ func (c *context) MakeCurrent() error {
} else { } else {
eglSwapInterval(c.eglCtx.disp, 0) eglSwapInterval(c.eglCtx.disp, 0)
} }
} else if c.eglWin == nilEGLNativeWindowType {
return nil
}
if c.eglCtx.srgb { if c.eglCtx.srgb {
return nil return nil
} }