glfw Garbage mouse position
Summary
The "Tutorial 2.2 - Camera" Example produces very large mouse position values. After a view seconds the mouse position is {<129309770. 134478720>} and rising. Calculating the mouse offset (from the previous move event) gives different values depending on the mouse position on the screen, -738, -378 if the mouse is at the top left and 64768, 65120 at bottom right.
Using the glfw 3.4 release seems to result in the OFFSET being equal to the position of the cursor relative to the center of the window. But that means the IMouse.Position property does accumulate the offset resulting in large positive or negative numbers.
Steps to reproduce
- Platform: Desktop Windows 10 22H2
- Connect to another windows machine with Remote Desktop
- Run the Camera Example on the remote machine
- Try to move the camera using the mouse
- Put a breakpoint in the OnMouseMove function and inspect the mouse position
Comments
I have tested it with the main branch using the sample but the same problem occurs in my project using the silk.net 2.20.0 nuget.
This might be related; https://github.com/glfw/glfw/issues/1276
Thanks for the link, looks like we need a native lib update.
This should be fixed with #1993.
I would like to test and confirm this but i wasn't able to compile silk using the instructions. Are there any nightly builds available?
#1993 has been merged, so it would be good if we could test if this was fixed.
I would like to test and confirm this but i wasn't able to compile silk using the instructions.
Can you elaborate? Silk should be buildable on Windows, Linux, and macOS now, especially after #2017.
Seems to be fixed with Silk.Net 2.21.0
Ah great news! It appears we forgot to close this issue. Glad this is working now.