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

QQuickPaintedItem with FramebufferObject and HighDpiScaling does not scale properly

    XMLWordPrintable

    Details

    • Commits:
      5f92f784834f8648857fa6056ac0a93c96c60543

      Description

      Having set setRenderTarget(Image) onto a QQuickPaintedItem results in having painter's viewport in the QQuickPaintedItem::paint() pure virtual method as large as the content size, in pixels. It seems fine, as painter->device()>devicePixelRatio() returns 1. When I set render target to FramebufferObject, my item is painted in user-space pixels, meaning that my rendered image is scaled by the devicePixelRatio. As painter>device()->devicePixelRatio() still returns 1, I'd expect it to behave exactly the same as is does when rendering to image.
      QQuickPaintedItem::setTextureSize() does not help, as it always raises QOpenGLFramebufferObject: Framebuffer incomplete attachment. error.

        Attachments

        1. 52901-sample.zip
          27 kB
        2. chapter6-plugins.zip
          1.08 MB
        3. framebuffer target.png
          framebuffer target.png
          123 kB
        4. image target.png
          image target.png
          55 kB
        For Gerrit Dashboard: QTBUG-52901
        # Subject Branch Project Status CR V

          Activity

            People

            Assignee:
            andysh Andy Shaw
            Reporter:
            garrappachc Michał Garapich
            Votes:
            5 Vote for this issue
            Watchers:
            8 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes