From 0c25bc3c931033e8a8471f8c0f4462c429f2ce7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomi=20Korpip=C3=A4=C3=A4?= <tomi.korpipaa@theqtcompany.com> Date: Mon, 30 Mar 2015 10:23:12 +0300 Subject: [PATCH] Fixed erroneous FRAMEBUFFER_UNSUPPORTED. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit WebGL spec states: "If framebuffer is null, the default framebuffer provided by the context is bound." Thus there is no need the check if we have a self-bound framebuffer before querying its status from the system. Change-Id: I389d3e3b81ac61c6498a76ae07303caf75e2787e Task-number: QTBUG-45197 Reviewed-by: Pasi Keränen <pasi.keranen@digia.com> --- src/imports/qtcanvas3d/context3d.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/imports/qtcanvas3d/context3d.cpp b/src/imports/qtcanvas3d/context3d.cpp index 044c280..45e58d2 100644 --- a/src/imports/qtcanvas3d/context3d.cpp +++ b/src/imports/qtcanvas3d/context3d.cpp @@ -1613,14 +1613,7 @@ CanvasContext::glEnums CanvasContext::checkFramebufferStatus(glEnums target) return FRAMEBUFFER_UNSUPPORTED; } - if (m_currentFramebuffer) { - return glEnums(glCheckFramebufferStatus(GL_FRAMEBUFFER)); - } else { - qCWarning(canvas3drendering).nospace() << "Context3D::" << __FUNCTION__ - << ": INVALID_OPERATION no current framebuffer bound"; - m_error |= CANVAS_INVALID_OPERATION; - return FRAMEBUFFER_UNSUPPORTED; - } + return glEnums(glCheckFramebufferStatus(GL_FRAMEBUFFER)); } /*! -- GitLab