before 0.20 (pseudocode):
// smooth
loop {
ev.poll_events(|e| {
match e {
DeviceEvent::MouseMotion => {
// deal with mouse movement
}
}
});
update();
render();
}
after 0.20:
// laggy
ev.run(move |e, flow| {
match e {
DeviceEvent::MouseMotion => {
// deal with mouse movement
},
RedrawRequested => {
update();
render();
}
MainEventsCleared => {
window.request_redraw();
}
}
})
Not sure if it's me not setting up correctly. It's pretty obvious in my 3d first person camera example, the example is running at >60fps, movement with keyboard is smooth, but the camera movement which responds to mousemove looks like 20 fps. I have 2 binaries for comparison between 2 versions (I'm using glutin not winit directly, so glutin 0.22 vs glutin 0.21): mousemove_lag_test.zip.
before
0.20(pseudocode):after
0.20:Not sure if it's me not setting up correctly. It's pretty obvious in my 3d first person camera example, the example is running at >60fps, movement with keyboard is smooth, but the camera movement which responds to mousemove looks like 20 fps. I have 2 binaries for comparison between 2 versions (I'm using glutin not winit directly, so glutin 0.22 vs glutin 0.21): mousemove_lag_test.zip.