How do I draw a simple line in Qt3D?

后端 未结 3 880
隐瞒了意图╮
隐瞒了意图╮ 2021-02-06 09:59

I feel like this should be pretty straightforward, but for my life I can\'t figure out how to draw a basic line using Qt 3D. The only guidance I\'ve been able to find on the sub

3条回答
  •  悲哀的现实
    2021-02-06 10:27

    Here's the correction I had to do on buffer type (I assume its deprecated now), respectively:

    auto *buf = new Qt3DRender::QBuffer(Qt3DRender::QBuffer::VertexBuffer, geometry);
    auto *indexBuffer = new Qt3DRender::QBuffer(Qt3DRender::QBuffer::IndexBuffer, geometry);
    

    Mine is Qt 5.9 on Win 10.

提交回复
热议问题