Auto-Vk-Toolkit icon indicating copy to clipboard operation
Auto-Vk-Toolkit copied to clipboard

There seems to be some lag introduced into GLFW which somehow depends on mouse input

Open johannesugb opened this issue 5 years ago • 2 comments

On a PC with AMD x370, Ryzen 3900X, and RTX 2080, lags can be observed constantly when moving the mouse. It appears that there are no lags when there is just keyboard input.

On a Microsoft Surface (Core i5, Intel HD 620), lags can be observed when a bluetooth mouse is being connected during runtime. After it has connected, the lags seem to be gone.

It could be worthwhile trying to not use GLFW callbacks but query mouse-related data once per frame. I.e. not use the callbacks to:

  • [ ] glfw_cursor_pos_callback
  • [ ] glfw_mouse_button_callback
  • [ ] glfw_scroll_callback

johannesugb avatar Oct 16 '19 12:10 johannesugb

Maybe a related problem: https://github.com/glfw/glfw/issues/1433

johannesugb avatar Apr 27 '20 10:04 johannesugb

PeekMessageW

Profiling revealed PeekMessageW to cause delays => to be tested again, and further investigated.

johannesugb avatar Apr 27 '20 10:04 johannesugb