C: Vulkan Interop#
Demonstrates how to integrate ovrtx with Vulkan by sharing renders on the GPU.
ovrtx outputs are mapped to CUDA arrays every frame, which are then copied to CUDA-exported VkImage memory. The resulting textures are then sampled on a fullscreen quad to display the render in real time in a GLFW window. Memory access between CUDA and Vulkan is synchronized using timeline semaphores.
Linux#
Prerequisites#
sudo apt install build-essential cmake
Other dependencies (ovrtx, GLM, volk, unordered_dense, glfw3) are downloaded automatically at configure time via CMake FetchContent.
Building#
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build
Running#
./build/ovrtx-interop
Windows#
Prerequisites#
Other dependencies (ovrtx, GLM, volk, unordered_dense, glfw3) are downloaded automatically at configure time via CMake FetchContent.
Building#
cmake -B build
cmake --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.