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

Allow set the projection matrix of QQuickWindow

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Fixed
    • Icon: Not Evaluated Not Evaluated
    • None
    • 6.3.0 RC
    • Quick: SceneGraph
    • None
    • All

      I use QtQuick with the wlroots library, use the QQuickRenderControl and QQuickRenderTarget(It's a OpenGL render buffer object, it's from a EGLImageKHR), to render a QQuickWindow to a wlr_output. but the vertical direction is reversed, in the Qt5, i can use the QQuickCustomRenderStage to set "QSGAbstraceRenderer::setProjectionMatrix", how do it on Qt6?

      Maybe we should add a function to QQuickRenderControl to allow control the projection matrix, for a example:

      class Q_QUICK_EXPORT QQuickRenderTarget
      {
      ...
          virtual bool configureRenderer(QSGAbstractRenderer *renderer, QQuickWindow *window) const { return false; }
      ...
      }
      
      void QQuickWindowPrivate::renderSceneGraph(const QSize &size, const QSize &surfaceSize)
      {
      ...
          if (!renderControl || !renderControl->configureRenderer(renderer, q))
                const bool flipY = rhi ? !rhi->isYUpInNDC() : false;
                QSGAbstractRenderer::MatrixTransformFlags matrixFlags;
                if (flipY)
                    matrixFlags |= QSGAbstractRenderer::MatrixTransformFlipY;
                ...
          }
      ...
      }
      

        For Gerrit Dashboard: QTBUG-102317
        # Subject Branch Project Status CR V

            janichol Andy Nichols
            zccrs JiDe Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes