Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-45327

QOpenGLFramebufferObject::release + QOpenGLWidget = broken

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P2: Important
    • 5.5.0
    • 5.4.1
    • GUI: OpenGL
    • None
    • Fedora 20, radeon drivers, qt5-qtbase-gui-5.4.1-3.fc20.x86_64
    • 2266f519225eebca724dd658d185f96bc9ad086c

    Description

      Going by the documentation, one would expect this:

      // fbo is a correctly set up QOpenGLFramebufferObject
      fbo.bind();
      fbo.release();
      

      ...to be a no-op. And indeed, with QGLWidget it is. With QOpenGLWidget, however, it breaks rendering, because it does NOT set the active FBO back to the default FBO, as claimed. To unbreak things, one must use the (ugly) incantation:

      context()->functions()->glBindFramebuffer(
        GL_FRAMEBUFFER, defaultFramebufferObject());
      

      (What's more, it isn't obvious to me why this happens; looking at the source code of QOpenGLFrameBuffer::release(), it looks like it ought to be doing the right thing. Alas, no such luck...)

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              lagocs Laszlo Agocs
              matthew.woehlke Matthew Woehlke
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes