C: Minimal Example#
This example shows basic initialization of the renderer, rendering a single frame from an RGB camera, mapping the output and writing the result to disk as a PNG.
The example loads an example scene from S3 and writes the resulting image to out.png.
The first time you run the example, the driver compiles and caches shaders. Subsequent runs are much faster.
Build and Run#
Prerequisites
sudo apt install build-essential cmake
The ovrtx library is downloaded automatically at configure time. If ovrtx is already installed and available via CMAKE_PREFIX_PATH, the local installation is used instead.
Building
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build
Running
./build/minimal
Prerequisites
The ovrtx library is downloaded automatically at configure time. If ovrtx is already installed and available via CMAKE_PREFIX_PATH, the local installation is used instead.
Building
cmake -B build
cmake --build build --config Release
Running
.\build\Release\minimal
Licensing#
This example contains stb_image_write.h, © Sean Barrett, released under Public Domain.