Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for WebAssembly
  4. What do I need to do to get quick3d + wasm working?
QtWS25 Last Chance

What do I need to do to get quick3d + wasm working?

Scheduled Pinned Locked Moved Solved Qt for WebAssembly
quick3d
10 Posts 3 Posters 1.8k Views
  • 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.
  • T Offline
    T Offline
    timday
    wrote on 18 Jul 2020, 15:44 last edited by timday
    #1

    Sorry, probably a n00b question but I'm just not that familiar with the "Qt way" sometimes...

    I have 5.15.0 installed via the "maintenance tool" on my Linux box (Debian).

    The simple "hellocube" example builds and runs perfectly using gcc_64 tools.

    However attempting to build it using the wasm_32 just gets me a

    $ ~/Qt/5.15.0/wasm_32/bin/qmake hellocube.pro 
    Project ERROR: Unknown module(s) in QT: quick3d
    

    Although hellocube is listed in the "webassembly examples" at https://github.com/msorvig/qt-webassembly-examples , and also amongst the wasm file size examples at the bottom https://wiki.qt.io/Qt_for_WebAssembly , so it seems promising that it's supposed to work. Are the necessary bits just not included in the MaintenanceTool's pre-built binaries currently, and the idea is you build a Qt yourself if you want to use this bit... or something else?

    I have everything set up well enough to get a nice QML + charts wasm app up in my browser (indeed it is currently hosted here for the curious ; may take a while 9MB .gz ), but I'm at least as intrigued by the possibilities of quick3d in the browser.

    Thanks for any pointers

    M 1 Reply Last reply 3 Mar 2021, 07:52
    1
    • L Offline
      L Offline
      lorn.potter
      wrote on 22 Jul 2020, 20:49 last edited by
      #2
      This post is deleted!
      1 Reply Last reply
      0
      • L Offline
        L Offline
        lorn.potter
        wrote on 22 Jul 2020, 20:51 last edited by
        #3

        You will need patience, as QtQuick3D requires OpenGL (desktop) and webassembly only supports OpenGL ES 2/3.

        I heard they are working on getting it working with OpenGL ES, but for a future version.

        1 Reply Last reply
        0
        • T timday
          18 Jul 2020, 15:44

          Sorry, probably a n00b question but I'm just not that familiar with the "Qt way" sometimes...

          I have 5.15.0 installed via the "maintenance tool" on my Linux box (Debian).

          The simple "hellocube" example builds and runs perfectly using gcc_64 tools.

          However attempting to build it using the wasm_32 just gets me a

          $ ~/Qt/5.15.0/wasm_32/bin/qmake hellocube.pro 
          Project ERROR: Unknown module(s) in QT: quick3d
          

          Although hellocube is listed in the "webassembly examples" at https://github.com/msorvig/qt-webassembly-examples , and also amongst the wasm file size examples at the bottom https://wiki.qt.io/Qt_for_WebAssembly , so it seems promising that it's supposed to work. Are the necessary bits just not included in the MaintenanceTool's pre-built binaries currently, and the idea is you build a Qt yourself if you want to use this bit... or something else?

          I have everything set up well enough to get a nice QML + charts wasm app up in my browser (indeed it is currently hosted here for the curious ; may take a while 9MB .gz ), but I'm at least as intrigued by the possibilities of quick3d in the browser.

          Thanks for any pointers

          M Offline
          M Offline
          Moia
          wrote on 3 Mar 2021, 07:52 last edited by
          #4

          @timday I've the same problem as your. Have you managed to solve your issue?

          L T 2 Replies Last reply 8 Mar 2021, 22:24
          0
          • M Moia
            3 Mar 2021, 07:52

            @timday I've the same problem as your. Have you managed to solve your issue?

            L Offline
            L Offline
            lorn.potter
            wrote on 8 Mar 2021, 22:24 last edited by
            #5

            @Moia It won't work. As I've said earlier, Qt/Quick 3d does not support opengl ES, only the opengl desktop version, that will not work with Qt WebAssembly.

            M 1 Reply Last reply 9 Mar 2021, 09:31
            0
            • L lorn.potter
              8 Mar 2021, 22:24

              @Moia It won't work. As I've said earlier, Qt/Quick 3d does not support opengl ES, only the opengl desktop version, that will not work with Qt WebAssembly.

              M Offline
              M Offline
              Moia
              wrote on 9 Mar 2021, 09:31 last edited by
              #6

              @lorn-potter actually we managed to make that example to work. hello-cube is one of the few which actually works on wasm, we tried with the teapot example but it does not render in wasm. We had to recompile qt for webassembly as suggested in qt.io blog post adding the qtquick3d modules. It was a pain though.

              1 Reply Last reply
              0
              • L Offline
                L Offline
                lorn.potter
                wrote on 1 Jun 2021, 19:39 last edited by
                #7

                QtQuick3d for Qt 6 has been re-worked to include support for OpenGL ES2, so it will work for Qt WebAssembly in 6.2
                How well it works is a matter to be discovered.

                1 Reply Last reply
                2
                • T Offline
                  T Offline
                  timday
                  wrote on 3 Nov 2021, 16:05 last edited by
                  #8

                  Just took Qt 6.2.1 for a spin... my first venture into the new frontier beyond 5.x...

                  And successfully did a wasm build of the hellocube quick3d example (from Qt/Examples/Qt-6.2.1/quick3d/hellocube/). Seems to work fine.

                  This could be very interesting...

                  1 Reply Last reply
                  1
                  • L Offline
                    L Offline
                    lorn.potter
                    wrote on 3 Nov 2021, 17:25 last edited by
                    #9

                    Cool! If you see any issues, be sure to report them to https://bugreports.qt.io/

                    1 Reply Last reply
                    0
                    • M Moia
                      3 Mar 2021, 07:52

                      @timday I've the same problem as your. Have you managed to solve your issue?

                      T Offline
                      T Offline
                      timday
                      wrote on 3 Nov 2021, 19:39 last edited by
                      #10
                      This post is deleted!
                      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