aevyrie / bevy_framepace

Framepacing and framelimiting for Bevy
https://crates.io/crates/bevy_framepace
Apache License 2.0
219 stars 24 forks source link

support environments other than `bevy_winit` #45

Open soqb opened 10 months ago

soqb commented 10 months ago

when writing a tui with bevy, i found myself reaching for bevy_framepace but discovered it relies on bevy_winit in all cases.

this PR gates the refresh rate fetching logic behind a new "window" feature so that the plugin's main algorithm can be used outside of a windowed environment.

for Limiter::Auto, when the feature is not enabled, i chose 15fps as the default, which i think is reasonable for most tuis.

aevyrie commented 8 months ago

It seems strange to me to bake in defaults for TUI in a framepacing plugin. I'm not sure what the point of this crate is for that use case, it seems like you would be better off simply running a fixed rate or custom runner.