Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Using qtquick as texture in 3D

Using qtquick as texture in 3D

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 1 Posters 1.8k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    belab
    wrote on last edited by
    #1

    I wrote a small demo as described in "Using qt widgets as texture in 3D":http://qt-project.org/forums/viewthread/27903/ to render widgets into opengl textures for using them e.g. as a 3D ui. Now I wonder what would be the best way to achieve this with qt quick 2.0.
    In qt5 I didn't find a way to render a qml scene into a pixmap like this:
    @
    QPainter painter( &pixmap );
    scene->render( &painter ); // render ui updates to texture
    @

    I'm not sure how to, but maybe it would be possible to use:

    @
    QQuickWindow::setRenderTarget(QOpenGLFramebufferObject * fbo)
    @

    Does anyone have an advice or know a better solution?

    Thanks.

    1 Reply Last reply
    0
    • B Offline
      B Offline
      belab
      wrote on last edited by
      #2

      I think

      @
      QWidget::createWindowContainer()
      @

      in QT5.1 should do it.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved