NVIDIA Holoscan SDK v0.6
Holoscan v0.6

Function holoscan::viz::ImGuiSetCurrentContext

void holoscan::viz::ImGuiSetCurrentContext(ImGuiContext *context)

If using ImGui, create a context and pass it to Holoviz, do this before calling viz::Init().

Background: The ImGui context is a global variable and global variables are not shared across so/DLLboundaries. Therefore the app needs to create the ImGui context first and then provides the pointer to Holoviz like this:


ImGui::CreateContext(); holoscan::viz::ImGuiSetCurrentContext(ImGui::GetCurrentContext());


context – ImGui context

© Copyright 2022-2023, NVIDIA. Last updated on Feb 9, 2024.