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

glfw Garbage mouse position #1967

Open
StefanPoelloth opened this issue Mar 4, 2024 · 4 comments
Open

glfw Garbage mouse position #1967

StefanPoelloth opened this issue Mar 4, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@StefanPoelloth
Copy link

StefanPoelloth commented Mar 4, 2024

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
  1. Connect to another windows machine with Remote Desktop
  2. Run the Camera Example on the remote machine
  3. Try to move the camera using the mouse
  4. 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; glfw/glfw#1276

@StefanPoelloth StefanPoelloth added the bug Something isn't working label Mar 4, 2024
@Perksey
Copy link
Member

Perksey commented Mar 20, 2024

Thanks for the link, looks like we need a native lib update.

@alexrp
Copy link
Collaborator

alexrp commented Apr 8, 2024

This should be fixed with #1993.

@StefanPoelloth
Copy link
Author

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?

@alexrp
Copy link
Collaborator

alexrp commented Apr 13, 2024

#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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Todo
Development

No branches or pull requests

3 participants