From 0bf911905a2ec719d6a6a86d58fb6c5cf253383f Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Tue, 19 Feb 2019 10:54:34 +0900 Subject: [PATCH] Revert "graphicsdriver/opengl: Call glFinish before glReadPixels" This reverts commit 04dc1faa9c163dbf61ec5109397702b53a216ecf. Reason: True fix for #814 is 82178794c38b7849d9a991055ef0127cefc3a7fc --- internal/graphicsdriver/opengl/context_desktop.go | 5 +---- internal/graphicsdriver/opengl/context_mobile.go | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/internal/graphicsdriver/opengl/context_desktop.go b/internal/graphicsdriver/opengl/context_desktop.go index 2aa0a91d7..37638a99e 100644 --- a/internal/graphicsdriver/opengl/context_desktop.go +++ b/internal/graphicsdriver/opengl/context_desktop.go @@ -161,10 +161,7 @@ func (c *context) bindFramebufferImpl(f framebufferNative) { func (c *context) framebufferPixels(f *framebuffer, width, height int) ([]byte, error) { var pixels []byte _ = mainthread.Run(func() error { - // glFlush is not enough. glFinish can be required before glReadPixels on some environments like - // Travis CI (#814) - // See also: https://forums.khronos.org/showthread.php/62741 - gl.Finish() + gl.Flush() return nil }) c.bindFramebuffer(f.native) diff --git a/internal/graphicsdriver/opengl/context_mobile.go b/internal/graphicsdriver/opengl/context_mobile.go index 51660bf8d..87a67305b 100644 --- a/internal/graphicsdriver/opengl/context_mobile.go +++ b/internal/graphicsdriver/opengl/context_mobile.go @@ -142,7 +142,7 @@ func (c *context) bindFramebufferImpl(f framebufferNative) { func (c *context) framebufferPixels(f *framebuffer, width, height int) ([]byte, error) { gl := c.gl - gl.Finish() + gl.Flush() c.bindFramebuffer(f.native)