Skip to content
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

FPS is lower than intended #1

Open
5tr1k3r opened this issue May 28, 2022 · 1 comment
Open

FPS is lower than intended #1

5tr1k3r opened this issue May 28, 2022 · 1 comment

Comments

@5tr1k3r
Copy link

5tr1k3r commented May 28, 2022

Windows 10, Rust 1.61, 4.60 NVIDIA

When idling, FPS seems significantly lower than intended: I spotted ~33 fps for the default 50 max fps limit (based on next_frame_time = now + Duration::from_millis(20); line), and ~66 fps when there is no fps limit (I intentionally changed the outer condition to true so windowed_context.window().request_redraw(); gets executed every frame).

The weird part is that when I'm actively moving mouse around, FPS instantly goes to the limit: 50 default, and over 1k with no limit specified. I don't even have to mouse over the window itself, moving mouse anywhere at all affects FPS drastically. Similar effect is observed when I'm pressing a lot of keys quickly, and simiarly, I don't even need to have the elastomania window in focus.

@5tr1k3r
Copy link
Author

5tr1k3r commented May 28, 2022

It only works like I want it to if I completely remove the line *control_flow = ControlFlow::WaitUntil(next_frame_time);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant