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. How fast and demanding can HTML5 detailed pixel rendering be in QML?
Forum Updated to NodeBB v4.3 + New Features

How fast and demanding can HTML5 detailed pixel rendering be in QML?

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 3 Posters 1.4k 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.
  • Q Offline
    Q Offline
    qttester5
    wrote on last edited by
    #1

    Since QML is rendered with OpenGL, is an HTML5 Canvas component considered quite high performance, nearly to the degree as custom OpenGL? From everything I have read, it is not currently possible to draw into a nested QML component with OpenGL directly within the scope of a larger QML file, but perhaps HTML5 drawing is a good replacement for this?

    1 Reply Last reply
    0
    • J Offline
      J Offline
      Jagholin
      wrote on last edited by
      #2

      You can always implement your own QtQuick Item on C++ side - with pretty much any OpenGL rendering you require, you just need to set up an FBO as render target(aka render to texture). An example on how to do this you can find within your Qt distribution, it is called "Scene Graph - Rendering FBOs".

      I don't think there could be any other more "direct" approach here than render the scene to FBO and then to the frame buffer, especially when you want to apply complex transformations/and or effects to your item(you did mention "within the scope of a larger QML file", so i assume this is what you meant here). HTML5 canvas wouldn't be any faster here, as i just technically dont see any other approach than through FBOs, any other Item with similar possibilities(like the Canvas) has to use it as well.

      1 Reply Last reply
      0
      • Q Offline
        Q Offline
        qttester5
        wrote on last edited by
        #3

        I'm curious what happens under the hood for HTML5 Canvas drawing via Javascript. How is it getting sent to OpenGL? Is Qt doing a realtime translation of the javascript into OpenGL calls? Since OpenGL is under the hood, somehow it must all get sent through OpenGL. Or is it compiled into OpenGL calls? Does anyone know?

        1 Reply Last reply
        0
        • C Offline
          C Offline
          chrisadams
          wrote on last edited by
          #4

          Hi,

          It's all open source.

          https://qt.gitorious.org/qt/qtdeclarative/trees/stable/src/quick/items/context2d

          Cheers,
          Chris.

          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