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

OpenGL viewport not fully updated in Vista/Win7 non-aero mode

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 4.6.1, 4.6.2
    • Fix Version/s: 4.6.3, 4.7.0, 4.7.1
    • Component/s: GUI: OpenGL
    • Labels:
      None
    • Environment:
      Vista/Win7 non-aero mode
    • Commits:
      392123ef5432643d1047d1e1dd71512ec39d382d

      Description

      I've talked with ATI, Nvidia, and Microsoft about this. as well references to some other openGL forums are:

      http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=270499
      http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=postlist&Board=9&page=3

      In the simple case: when an external window is removed from an overlapping position of the OpenGL viewport. Only the area that was underneath that external window is updated. Until one forces some type of window resize event, or sometimes and external desktop change.

      The comments back from Microsoft indicate that the problem is not having called InvalidateRect() before drawing.

      As a workaround for this issue with the Quadro drivers, can you check to see if Aero is off with DwmIsCompositionEnabled() and then modify your code to use a timer and invalidate the window as follows:

      case WM_TIMER:
      {
      InvalidateRect(hWnd, NULL, FALSE);
      }
      return 0;
      

      of course this isn't practical.

      As a test, I did try a small change to qapplication_win.cpp

      const QRegion dirtyInBackingStore(qt_dirtyRegion(this));
      // Make sure the invalidated region contains the region we're about to repaint.
      // BeginPaint will set the clip to the invalidated region and it is impossible
      // to enlarge it afterwards (only shrink it). Using GetDCEx is not suffient
      // as it may return an invalid context (especially on Windows Vista).
      // Adsk change comment out the check for change - helps Vista/Win7 non-aero
      //if (!dirtyInBackingStore.isEmpty())
      InvalidateRgn(internalWinId(), dirtyInBackingStore.handle(), false);
      

      this is just commenting out the check for the empty and always calling InvalidateRgn()
      This works but at what cost ? and why

      What I appear to be seeing is very similar to this report: - I know is for a different OS, but similar problem

      http://svn.netlabs.org/qt4/ticket/80
      http://svn.netlabs.org/qt4/changeset/307

      When I enter the OpenGL viewport, the dirty region, it looks like the full viewport is not set to dirty.

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              kkalland Kim Motoyoshi Kalland (Inactive)
              Reporter:
              xcm Martin Petersson (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes