From 447bda7d68d32b5b4415f63b35d69faeb77572e7 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sat, 3 Jan 2015 02:01:30 +0900 Subject: [PATCH] Remove calling gl.checkFramebufferStatus --- internal/opengl/context_js.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/internal/opengl/context_js.go b/internal/opengl/context_js.go index d84dbe6bf..f7e8e02a2 100644 --- a/internal/opengl/context_js.go +++ b/internal/opengl/context_js.go @@ -132,13 +132,7 @@ func (c *Context) SetViewport(f Framebuffer, width, height int) error { } else { gl.BindFramebuffer(gl.FRAMEBUFFER, nullVal) } - err := gl.CheckFramebufferStatus(gl.FRAMEBUFFER) - if err != gl.FRAMEBUFFER_COMPLETE { - if gl.GetError() != 0 { - return errors.New(fmt.Sprintf("glBindFramebuffer failed: %d", gl.GetError())) - } - return errors.New("glBindFramebuffer failed: the context is different?") - } + // gl.CheckFramebufferStatus might cause a performance problem. Don't call this here. gl.Viewport(0, 0, width, height) return nil }