renderqt5.5qt6qtquick3d

Qt Quick 3D custom geometry in Qt5/Qt6


I'm trying to build an example project with custom geometry under Qt 5.15.2 (https://doc-snapshots.qt.io/qt6-dev/qtquick3d-customgeometry-example.html) I get all qml ui elements drawn except for the mesh. In Qt 6 all works fine and mesh is rendered.

I see on the link attached above that the example refers to Qt 6 however QQuick3DGeometry class which provides us with custom geometry exists in Qt5. Please let me know if there's a chance to use Qt 5.15 for the purpose of rendering mesh with custom geometry and whether QQuick3DGeometry can be helpful in this case. Thank you in advance.


Solution

  • The solution is to use setName() during initializing custom geometry. That's the way it works in Qt5. In Qt6 it is not necessary. https://bugreports.qt.io/browse/QTBUG-89420