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

QOpenGLWidget overwrites QSurfaceFormat samples

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 6.9.0
    • GUI: OpenGL
    • None
    • All

      Dear Support-Team, 

      I am working on an application where a QOpenGLWidget gets shown and hidden depending on the user input. I intended to use Multisampling. During the first showEvent(..) everything is fine, Calling showEvent(..) again leads to loss of the multisampling. I had a look at the source code of QOpenGLWidget. During the private call of QOpenGLWidgetPrivate::initialize(), the number of samples of the given QSurfaceFormat gets stored in a variable called "requestedSamples", while the number of samples in the stored QSurfaceFormat "requestedFormat" is overwritten with 0. (lines 813 .. 818)

      The variable "requestedSamples" is then used in QOpenGLWidgetPrivate
      ::restoreFBO(). This works for the first time the widget is shown. A second call to QOpenGLWidgetPrivate::initialize() leads to storing the overwritten number of samples (0) to the variable requestedSamples and with that it switches of multisampling. 

       

      Best regards 

       

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

            owolff Oliver Wolff
            misc14289 Michael Schulze
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes