Window (Qt Widgets, Linguist) → Renderer (OpenGL 3.3, GLSL): draws
Window (Qt Widgets, Linguist) → Camera (orbital, no OpenGL)
Camera (orbital, no OpenGL) → Renderer (OpenGL 3.3, GLSL): view, zoom
MeshModel (normals, colours) → Picking (ray casting on the CPU): click: vertex or face
The viewer at work
A Qt 6 and OpenGL desktop application for Windows, Linux and macOS: it reads the file with the portfolio's C library and computes its topology with the topologie project, then shows the mesh and its invariants.
Screenshot taken by the application itself (--screenshot option), on a virtual screen, with Mesa's software OpenGL.
To run it at home (Qt 6.5 or later, CMake, a C++20 compiler):
cd projects/qt
cmake -S . -B build && cmake --build build
./build/qtviewer --lang en sample:torus # a built-in example, coloured by curvature with the C key
./build/qtviewer ../lib-c/tests/data/cube.obj # an OBJ, PLY or STL file
Ready-to-run programs (Windows folder, macOS disk image, Linux AppImage, unsigned), built and launched once by the CI, kept for 30 days: artifacts of the qt workflow
Tech stack
C++
Qt
OpenGL
Qt Test
Who does what
C++
The C++20 application: mesh model, camera and ray-cast picking, testable without OpenGL; reading by lib-c, topology by the topology project.
Qt
Windows, menus, panels, drag and drop and the French translation (Qt Linguist); windeployqt, macdeployqt and AppImage for the executables.
OpenGL
The 3D rendering (OpenGL 3.3, GLSL shaders): two-sided lighting, wireframe, curvature colours.
Qt Test
The tests, including an off-screen rendering read back pixel by pixel, on Linux, Windows and macOS.
Definition of Done
Code reviewed, diff by diff
Unit and integration tests green
Green CI on Linux, Windows and macOS when compiled