You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My Issue/Question:
I try to create two imgui sub-forms in Windows form ImGui::Begin1 ImGui::Begin2, ImGui::Begin2 Do not need too high frame rate, because it will waste extra resources, I want to control the frame rate of ImGui::Begin2 separately. The first attempt is to use the std::this_thread::sleep_for method to add a suitable delay when drawing, but this method will also affect the frame rate of ImGui::Begin1, and the second attempt is to add the if judgment. When the current frame rate exceeds the preset frame rate, the contents of ImGui::Begin2 will not be drawn, but this method will cause the problem of flickering drawn contents. I want to control the frame rate of ImGui::Begin2 subform separately without affecting the frame rate of ImGui::Begin1. How can I solve this problem?
Screenshots/Video:
No response
Minimal, Complete and Verifiable Example code:
// Here's some code anyone can copy and paste to reproduce your issueImGui::Begin("Example Bug");
MoreCodeToExplainMyIssue();
ImGui::End();
The text was updated successfully, but these errors were encountered:
Generally the right answer is "find a way to make Begin2 not costly".
It is actually very slow / expensive ? Or you are just doing a theoretical optimization?
There is an undocumented feature SetNextWindowRefreshPolicy() (#3515) in imgui_internal.h, but honestly I am not sure this is a problem you need to solve this way.
ocornut
changed the title
Frame rate control based on individual subforms
Frame rate control for individual windows
Jul 15, 2024
Version/Branch of Dear ImGui:
Version 1.90.1, Branch: docking
Back-ends:
imgui_impl_win32.cpp + imgui_impl_dx12.cpp
Compiler, OS:
MSVC 2022 + Windows10 x64
Full config/build information:
No response
Details:
My Issue/Question:
I try to create two imgui sub-forms in Windows form ImGui::Begin1 ImGui::Begin2, ImGui::Begin2 Do not need too high frame rate, because it will waste extra resources, I want to control the frame rate of ImGui::Begin2 separately. The first attempt is to use the std::this_thread::sleep_for method to add a suitable delay when drawing, but this method will also affect the frame rate of ImGui::Begin1, and the second attempt is to add the if judgment. When the current frame rate exceeds the preset frame rate, the contents of ImGui::Begin2 will not be drawn, but this method will cause the problem of flickering drawn contents. I want to control the frame rate of ImGui::Begin2 subform separately without affecting the frame rate of ImGui::Begin1. How can I solve this problem?
Screenshots/Video:
No response
Minimal, Complete and Verifiable Example code:
The text was updated successfully, but these errors were encountered: