-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The function call ShowDemoWindow of ImGui make FPS low #171
Comments
and comment out this code can also make fps normal, glDebugMessageCallback(Core::OpenGLDebugMessageCallback, nullptr); |
It work but not elegant Original code |
This problem seems not to occurs in macOS. result.mov |
We are working on that. Should have the PR open this week. |
Shoot, thought this was #167. |
其實不僅僅是相減會有問題而已,他們兩個數字的單位就不同了,frameTime(單位:毫秒)而Util::Time::GetDeltaTime(單位:秒),兩個不同單位的值做相減,我想結果應該不會是正確的結果,但儘管我把他更改為正確單位,他仍然有錯誤,會發生下面這件事情 constexpr double frameTime =
FPS_CAP != 0 ? 1000 / static_cast<double>(FPS_CAP) : 0;
m_FPS_DeltaTime = Util::Time::GetDeltaTime()*1000;
if (m_FPS_DeltaTime < frameTime) {
SDL_Delay(static_cast<Uint32>(frameTime - m_FPS_DeltaTime));
}
m_FPS_Timer = Util::Time::GetElapsedTimeMs();
LOG_INFO("GetDeltaTime: {}", Util::Time::GetDeltaTime());
|
Problem
As you can see, the FPS low when open the demo-window of ImGui
2024-04-08.224030.mp4
Ps: the Problem occur commit between 823926c and 22ef5ca
Steps to reproduce
Expected behavior
It will keep 60fps in window.
PTSD version
commit 823926c
Operating system/version
UnixWindow 11 24H2CMake version
3.27.6
CMakeCache.txt
OpenGL Info
The text was updated successfully, but these errors were encountered: