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

How to make QQuickWindow render to an OpenGL renderbuffer from an EGLImage

    XMLWordPrintable

    Details

    • Type: Suggestion
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 6.0.0
    • Fix Version/s: 6.2.0 Alpha
    • Component/s: Qt RHI, Quick: SceneGraph
    • Labels:
      None
    • Platform/s:
      All
    • Commits:
      ad4b2872aa1c939c2d805311d9dad549373abd3f (qt/qtdeclarative/dev)

      Description

      On the Qt5, I can use QQuickWindow::setRenderTarget(uint fboId, const QSize &size), but on the Qt6, I can't render a QQuickWindow to a opengl frame buffer.

      In QQuickRenderTarget, only fould the "fromOpenGLTexture" function, but it cannot be used in my code:

      EGLImageKHR image;
      // some codes...
      GLuint rbo;
      GLuint fbo;
      
      glGenRenderbuffers(1, &rbo);
      glBindRenderbuffer(GL_RENDERBUFFER, rbo);
      glEGLImageTargetRenderbufferStorageOES(GL_RENDERBUFFER, image);
      glBindRenderbuffer(GL_RENDERBUFFER, 0);
      
      glGenFramebuffers(1, &fbo);
      glBindFramebuffer(GL_FRAMEBUFFER, fbo);
      glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, rbo);
      glBindFramebuffer(GL_FRAMEBUFFER, 0);
      
      // In Qt5
      QQuickWindow window;
      window.setRenderTarget(fbo, QSize(...));
      
      

      This frame buffer object is provided by other development libraries, and only the frame buffer object can be obtained in my program code , what should I do on Qt6?

        Attachments

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

          Activity

            People

            Assignee:
            lagocs Laszlo Agocs
            Reporter:
            zccrs chen zhang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes