Revert "graphicsdriver/opengl: Call glFinish before glReadPixels"

This reverts commit 04dc1faa9c.

Reason: True fix for #814 is 82178794c3
This commit is contained in:
Hajime Hoshi 2019-02-19 10:54:34 +09:00
parent 82178794c3
commit 0bf911905a
2 changed files with 2 additions and 5 deletions

View File

@ -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)

View File

@ -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)