Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Brainstorm
  4. Rendering a simple 3D model with a custom QRhiWidget
Forum Updated to NodeBB v4.3 + New Features

Rendering a simple 3D model with a custom QRhiWidget

Scheduled Pinned Locked Moved Unsolved Brainstorm
1 Posts 1 Posters 406 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.
  • B Offline
    B Offline
    ben.cottrell
    wrote on last edited by
    #1

    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?

    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