Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Forum Updated on Feb 6th

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

    Qt for WebAssembly
    quick3d
    3
    10
    788
    Loading More Posts
    • 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
      timday last edited by timday

      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 Reply Quote 1
      • L
        lorn.potter last edited by

        This post is deleted!
        1 Reply Last reply Reply Quote 0
        • L
          lorn.potter last edited by

          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 Reply Quote 0
          • M
            Moia @timday last edited by

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

            L T 2 Replies Last reply Reply Quote 0
            • L
              lorn.potter @Moia last edited by

              @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 Reply Quote 0
              • M
                Moia @lorn.potter last edited by

                @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 Reply Quote 0
                • L
                  lorn.potter last edited by

                  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 Reply Quote 2
                  • T
                    timday last edited by

                    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 Reply Quote 1
                    • L
                      lorn.potter last edited by

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

                      1 Reply Last reply Reply Quote 0
                      • T
                        timday @Moia last edited by

                        This post is deleted!
                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post