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

Merge Input and RequestRedraw events #739

Open
Sharktheone opened this issue Dec 27, 2024 · 0 comments
Open

Merge Input and RequestRedraw events #739

Sharktheone opened this issue Dec 27, 2024 · 0 comments

Comments

@Sharktheone
Copy link
Member

In #733 there is a channel with events. Ideally we should get all events in the buffer and then

  1. Prioritize small events that just change parameters (InputEvent::MouseMove and so on) and afterward execute a potential RequestRedraw event
  2. Merge multiple events, when we have multiple
    • MouseMove events, we should drop all events except the last.
    • MouseScroll events, we should collect up all of them and add up the deltas
    • RequestRedraw events, we should only redraw once

This should improve the general responsiveness of the engine because when you use your mouse and the engine can't keep up it will try to always stay most up to date rather than rendering all frames in between the last render and now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 📝 Todo
Development

No branches or pull requests

1 participant