How to not call the same Dear ImGui function several times per frame

I’m using this Dear ImGui code in a function called several times per frame, resulting in duplications of the called UI element.

ImGui::Begin("Hello World");
ImGui::SliderFloat("test", &foo, 0.0f, 100.0f);


enter image description here

How to correct this behaviour?
Can Dear ImGui be set to avoid this, or do I have to take care of this myself?

Source link

More To Explore

Share on facebook
Share on twitter
Share on linkedin
Share on email