Rendering a simple 3D model with a custom QRhiWidget
-
I've tried to make a custom RHIWidget that sets up the rendering pipeline, links the shader program from the serialized bytecode for my .qsb files created at build time, but unlike the Cube RHI Widget sample (https://doc.qt.io/Qt-6/qtwidgets-rhi-cuberhiwidget-example.html), I'm getting a blank screen. I'm using Qt 6.9.0 for Linux, provided by the maintenance tool. Here's my source code: https://gitlab.com/bgc-nz/3DModelViewer-RHI-Prototype.
I am using another class to load my Wavefront OBJ model file into a vector, containing interleaved vertices and normals, like this, inside a
std::vector<float>:
vx, vy, vz, nx, ny, nz, ...Sadly, qrenderdoc isn't very helpful, even with the Cube sample: I can only see the final rendered buffer (not sure of the correct name). It would great to accomplish this, because, I've yet to see a layer that abstracts away the rendering system API's. I'm not having much luck with debugging.
I would like to know, if, it is feasible to render models with the RHI, do I have the right approach?