diff --git a/internal/graphics/opengl/context_desktop.go b/internal/graphics/opengl/context_desktop.go index aa3242fc4..0e7a31593 100644 --- a/internal/graphics/opengl/context_desktop.go +++ b/internal/graphics/opengl/context_desktop.go @@ -231,12 +231,6 @@ func (c *Context) NewFramebuffer(texture Texture) (Framebuffer, error) { func (c *Context) SetViewport(f Framebuffer, width, height int) error { return c.RunOnContextThread(func() error { c.bindFramebuffer(f) - if st := gl.CheckFramebufferStatus(gl.FRAMEBUFFER); st != gl.FRAMEBUFFER_COMPLETE { - if e := gl.GetError(); e != 0 { - return fmt.Errorf("opengl: glBindFramebuffer failed: %d", e) - } - return errors.New("opengl: glBindFramebuffer failed: the context is different?") - } gl.Viewport(0, 0, int32(width), int32(height)) return nil }) diff --git a/internal/graphics/opengl/context_mobile.go b/internal/graphics/opengl/context_mobile.go index 30767f7f5..a7fdf572c 100644 --- a/internal/graphics/opengl/context_mobile.go +++ b/internal/graphics/opengl/context_mobile.go @@ -186,12 +186,6 @@ func (c *Context) NewFramebuffer(texture Texture) (Framebuffer, error) { func (c *Context) SetViewport(f Framebuffer, width, height int) error { gl := c.gl c.bindFramebuffer(f) - if err := gl.CheckFramebufferStatus(mgl.FRAMEBUFFER); err != mgl.FRAMEBUFFER_COMPLETE { - if e := gl.GetError(); e != 0 { - return fmt.Errorf("opengl: glBindFramebuffer failed: %d", e) - } - return errors.New("opengl: glBindFramebuffer failed: the context is different?") - } gl.Viewport(0, 0, width, height) return nil }