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

multi canvas/"screen" support for emscripten

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • P2: Important
    • 5.13.0
    • None
    • QPA
    • None

    Description

      Emscripten Support

      Emscripten supports rendering to multiple <canvas>es.

      See http://emscripten-discuss.narkive.com/xnMa9pMA/multiple-canvas-with-emscripten . In short, this is supported by passing the canvas element id to the GL context constructor function.

      With the current canvas-as-screen setup this will translate to multiple screens for Qt.

      Prototype: https://github.com/msorvig/qt-webassembly-examples/tree/master/emscripten_multiscreen

      Qt Work Breakdown
      Qt assumes there is single canvas in several locations, for example when creating QScreen objects and OpenGL contexts. The emscripten API supports targeting the "default" (single) canvas, all such usages must be modified to target a specific canvas.

      1. qtloader.js: User code must be able to specify multiple canvases
      2. qwasmintegration : Create multiple screens, multiple QWasmEventTranslators, multiple QWasmCompositors
      3. qwasmwindow: OK
      4. qwasmscreen: OK
      5. qwasmfontdatabase: OK
      6. qwasmeventtranslator: Target a specific canvas when installing event handlers
      7. qwasmeventdispatcher: OK
      8. qwasmcompositor: ok ( ? )
      9. qwasmcursor: Target a specific canvas
      10. qwasmopenglcontext: Target a specific canvas

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            sorvig Morten Sørvig
            sorvig Morten Sørvig
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes