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

QOpenGLWidget does not support 10bit color depth

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P4: Low
    • None
    • 5.6.2, 5.10.0 Alpha
    • GUI: OpenGL
    • None
    • This affects all platforms.

      Barco FireGL graphics card with 10bit monitor.

    Description

      I am working with Barco monitors that support 10bit color depth. Qt supports this by setting the color depth on QSurfaceFormat via set[Red|Green|Blue]BufferSize(10).

      QOpenGLWidget has a setFormat() method to set such a format.

      But since the QOpenGLWidget uses a QOpenGLFrameBufferObject internally, which uses GL_RGBA8 as its internal texture format by default, the 10bit of the OpenGL context are not useable for the QOpenGLWidget user.

      There are two possible fixes to this:

      a) provide a setTextureFormat() method on QOpenGLWidget to allow overwriting the default texture format of the used FBO

      b) automatically adjust the texture format depending on the bit depth in the QSurfaceFormat that was set on the QOpenGLWidget

      While a) is the most powerful possibility (one could e.g. set a floating point format GL_RGBA16F or a GL_RGB10_A2), b) is the easiest for the end user.

      Maybe you can implement a mixture between a) and b), to allow overriding the internal format on the API, but to still switch to a 10 bit format if the internal format was not set on the API.

      I created a patch that implements c) and switches to GL_RGB10_A2 when the buffer size is > 8 and multisampling is off.

      I don't provide an example to reproduce the problem, because you would only be able to reproduce this with a graphics card that supports GL_RGB10_A2, which is only available on FireGL and NVidia Quadro cards that are connected to a 10bit monitor.

      Attachments

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

        Activity

          People

            lagocs Laszlo Agocs
            florian_link Florian Link
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes