From 6a34b87a6c29eb1a82edc683135a38a6a32b8b09 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Wed, 2 May 2018 01:01:04 +0900 Subject: [PATCH] opengl: Refactoring --- internal/opengl/context_desktop.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/internal/opengl/context_desktop.go b/internal/opengl/context_desktop.go index 64f8be199..7767b4beb 100644 --- a/internal/opengl/context_desktop.go +++ b/internal/opengl/context_desktop.go @@ -169,12 +169,10 @@ func (c *Context) bindFramebufferImpl(f Framebuffer) { func (c *Context) FramebufferPixels(f Framebuffer, width, height int) ([]byte, error) { var pixels []byte - if err := c.runOnContextThread(func() error { + _ = c.runOnContextThread(func() error { gl.Flush() return nil - }); err != nil { - return nil, err - } + }) c.bindFramebuffer(f) if err := c.runOnContextThread(func() error { pixels = make([]byte, 4*width*height)