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



  • 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?



  • 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.



  • 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?




Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.