Hacker News new | past | comments | ask | show | jobs | submit login

As a data point I've been developing the visual side of Https://ossia.io with the new Qt RHI and it's been a breeze.



I'll check it out... Does it use QML and the scenegraph, or does it have a custom C++ canvas widget implementation?


the software's "main editor" uses a very traditional QGraphicsScene with a QGLWidget - no QML / QtQuick (QtQuick is a very good tool for a lot of usecases, but not the right tool for this one particular "traditional big desktop app" job imho).

The RHI-using part is for creating custom visuals (think applying various shaders to video & camera inputs for VJ), so I wrote my own scene / render graph leveraging it which renders in separate windows through QRhi.


That sounds interesting. I've cloned score and libossia, but I haven't found that code yet. Could you point me at it?


95% of the RHI code is in there: https://github.com/OSSIA/score/tree/master/src/plugins/score...

- Window: https://github.com/OSSIA/score/blob/master/src/plugins/score...

- Renderer: https://github.com/OSSIA/score/blob/master/src/plugins/score...

- Example of a very simple node which renders a texture generated by a std::function: https://github.com/OSSIA/score/blob/master/src/plugins/score...

It was mostly written at my Ballmer peak during last year's christmas / new year's eve though :-) so lacks code quality a fair bit.

There's a graph of nodes. The graph is walked from every output node (screen surfaces) to create a matching "rendered node" (pretty much a render pass). For every node "model", a node "renderer" will be created, which contains uniforms, GPU buffer (QRhiBuffer) & texture (QRhiTexture) handles, etc. and a QRhiGraphicsPipeline (the state in which the GPU must be to render a node, the VAOs, shader programs, layout, culling, blending, etc etc)

Then every time the output node renders due to vsync or whatever, the associated chain of node (render passes) is executed in order.

I recommend looking at the RHI manual tests in the qt source, they show the usage in a very straightforward manner:

https://code.qt.io/cgit/qt/qtbase.git/tree/tests/manual/rhi?...

In particular, I started with this one : https://code.qt.io/cgit/qt/qtbase.git/tree/tests/manual/rhi/...


Thanks! Now I've got a place to start at least!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: