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

Wrong colours of non-GL widgets when using QOpenGLWidget on big endian

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.13.2
    • GUI: OpenGL
    • None
    • Linux 5.4.21 ppc64 on POWER9 (big endian)
    • Linux/X11

    Description

      When using a QOpenGL widget on a big endian system, widgets other than the QOpenGL widgets appear in the wrong colours.

      This is because the swizzling to convert from QImage::Format_ARGB32 to GL_RGBA needs to be different on big endian (ARGB -> RGBA instead of BGRA -> RGBA).

      The attachments contain a prosed fix, and screenshots of the "2dpainting" example application before and after applying the fix.

      The bug (and proposed fix) was verified using 5.13.2, but the code looks identical in 5.14, 5.15 and dev branches, so those are probably also affected.

       

      Attachments

        1. unpatched.png
          unpatched.png
          37 kB
        2. patched.png
          patched.png
          41 kB
        3. glswizzle.patch
          1 kB
        For Gerrit Dashboard: QTBUG-82599
        # Subject Branch Project Status CR V

        Activity

          People

            lagocs Laszlo Agocs
            marcus_c Marcus Comstedt
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes