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

[REG 6.3.2->6.4.2] Repeated QPainter::drawPixmapFragments calls draw images at wrong positions for QOpenGLWidget

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P1: Critical
    • 6.2.8, 6.5.0, 6.5.1, 6.6.0
    • 6.4.2
    • GUI: OpenGL
    • None
    • Linux/X11, Windows
    • d57ff481f (dev), d6c5a2f91 (dev), d4720931f (6.5), 514880c29 (tqtc/lts-6.2), 9aea6c66a (6.5), e1d4583a0 (6.5.0), 0105da483 (6.4)

    Description

      It seems the change done for QTBUG-107539 broke repeated calls to drawPixmapFragments, in that further calls will only change the texture and none of the other parameters, resulting in images getting drawn on top of each other rather than in their expected positions.

      I've attached an example project triggering this issue.

      Expected (and worked as of Qt 6.3.2):

      Broken (red pixmap drawn on top of blue one, as of Qt 6.4.2):

      Reported as issue in Tiled at https://github.com/mapeditor/tiled/issues/3578.

      Reverting the change to QOpenGL2PaintEngineExPrivate::uploadData in https://codereview.qt-project.org/c/qt/qtbase/+/438614 appears to fix the problem, but it might not be the correct fix.

      Attachments

        1. drawpixmapfragments.qbs
          0.1 kB
        2. image-2023-02-22-13-57-29-618.png
          image-2023-02-22-13-57-29-618.png
          9 kB
        3. image-2023-02-22-14-00-17-733.png
          image-2023-02-22-14-00-17-733.png
          9 kB
        4. main.cpp
          1 kB
        5. qtbug111416.zip
          1 kB
        For Gerrit Dashboard: QTBUG-111416
        # Subject Branch Project Status CR V

        Activity

          People

            lagocs Laszlo Agocs
            bjorn Thorbjørn Lindeijer
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: