C: Vulkan Interop#
Demonstrates how to integrate ovrtx with Vulkan by sharing renders on the GPU.
The example maps ovrtx outputs to CUDA arrays every frame, then copies them to CUDA-exported VkImage memory. A fullscreen quad samples the resulting textures to display the render in real time in a GLFW window. Memory access between CUDA and Vulkan is synchronized using timeline semaphores.
Build and Run#
Prerequisites
sudo apt install build-essential cmake
If ovrtx or glfw3 are already installed and available via CMAKE_PREFIX_PATH, the local installations are used. Otherwise they are downloaded automatically at configure time. Other dependencies (GLM, volk, unordered_dense) are always downloaded via FetchContent.
Building
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build
Running
./build/ovrtx-interop
Prerequisites
If ovrtx or glfw3 are already installed and available via CMAKE_PREFIX_PATH, the local installations are used. Otherwise they are downloaded automatically at configure time. Other dependencies (GLM, volk, unordered_dense) are always downloaded via FetchContent.
Building
cmake -B build
cmake --build build --config Release
Running
.\build\Release\ovrtx-interop.exe
Scene Configuration#
The example is configured to load the robot scene from Omniverse:
Setting |
Value |
|---|---|
USD Scene |
|
Render Product |
|
Up Axis |
Z |
Units |
Meters |
Controls#
Left-click and drag — Rotate camera around the target point
Mouse wheel — Dolly camera in/out
Licensing#
This example contains stb_image_write.h, © Sean Barrett, released under Public Domain.