libopenmodelviewer is a lightweight, modular 3D rendering library written in modern C++20. It is designed to be embedded into native GUI applications as a rendering toolkit, not as a real-time interactive engine. The library handles model loading, scene rendering, and rendering context setup (OpenGL, Vulkan, DirectX) internally, exposing a clean API to external frontends.
Its main goal is to provide a minimal and reusable rendering layer, fully decoupled from any GUI logic.
Note: This project is under active development.
The current codebase is not stable and APIs may change. Documentation and public examples will follow in future versions.
- C++20 compiler (MSVC, Clang, or GCC 11+)
- CMake ≥ 3.16
- fmt (required)
- GoogleTest (optional, for unit tests)
- Doxygen (optional, for documentation generation)
- Graphviz (optional, include diagrams in documentation)
This project includes a helper script under the scripts/ directory to simplify the build process.
You can build a specific module using:
sh scripts/build.sh coreThis builds the core module only.
To build multiple modules at once:
sh scripts/build.sh core rendererThis compiles both core and renderer.
To build the tests associated with each module, add tests to the module list:
sh scripts/build.sh core renderer testsThis compiles both core and renderer modules, as well as their corresponding test targets (core_test, renderer_test), allowing you to run ctest manually (e.g. in a CI pipeline).
To automatically run the tests after building, add the -test flag after the module list:
sh scripts/build.sh core -testThis will:
- Build the
coremodule and its tests - Run all tests using
ctestin the corresponding build directory
You can also combine multiple modules with -test:
sh scripts/build.sh core renderer -testThis builds both modules and runs all their associated tests.
ℹ️ The script runs
ctestautomatically for each compiled module when-testis used.
To generate the API documentation using Doxygen, simply add docs to the list of modules:
sh scripts/build.sh core renderer docsThis will build the core and renderer modules, and also generate the documentation into:
build/docs/html/index.html
You can open this file in your browser to browse the full API reference.
ℹ️ Ensure that Doxygen and Graphviz are installed on your system to include diagrams such as inheritance trees and include graphs.