With Qt5.7 the Qt3D module is now a part of the Qt library, and it is a fully functional scene graph module. This post will provide a minimal example window and a scene graph (torus) by using CMake instead of QMake.
Note: the below example requires Qt5.7 version as a minimum Qt version.
CMAkeLists.txt file
main.cpp file
As a scene graph, we will place a single torus on the scene and will use some basic scene graph componenets connected to it: transform, material, geometry type. This example is a simplified version of the Qt 3D: Simple C++ Example.
By using OpenSceneGraph and GLSL shader, this code snippet demonstrates a simplest way to add a fog effect to your geometries by diluting geometry’s color in...
Leave a Comment