GLFW Java setCursorPosCallback

I’m trying to detect movement from the mouse and setup a callback following the example from the GLFW site. Nothing is working, can someone please help me set up a callback?

I’m following GLFW: Input guide

and I cannot find any useful examples of how to use this in my own code.

I can get the setKeyCallback to work just fine, but the cursorPosCallback isn’t as easy to set up.

I just got things working following LWJGL - Lightweight Java Game Library and i am trying to implement the callback into this code.

Thank you for your time and help!

Have you checked out example code in LWJGL source code?

lwjgl3/ExampleGL2.java at e4a6cc863f469ea8acfe3c2158f2c77d0c0aa95d · LWJGL/lwjgl3 (github.com)

1 Like

That is a useful link, thank you for the help!

I will read the new info over and we will see how it goes.

Have a great day!

Edit:

THANK YOU VERY MUCH YOU SOLVED MY PROBLEM!!!

Thank you again and have a great forever!