The documentation says that in order to get full mouse information the cursor must be turned off. Yet a cursor is actually quite useful. It’s ok to lock into the application, but if I want to draw a cursor, is there any way to do so? For example, if I wish to zoom in around the point where the mouse is, the user needs to see the mouse pointer.
welcome to the GLFW forum.
If the cursor is enabled glfwGetCursorPos will return the position of the cursor within the window, so if you want to zoom in on a point where the mouse is then this will provide that functionality.
You only need to disable the cursor if you want to get motion of the mouse beyond the bounds of the window, or use Raw Mouse Motion. If you then want to draw a cursor, you can do draw it yourself (you’ll need to clamp the movement to the bounds of the window yourself in this case) - though having the cursor enabled will be the most suitable option in most cases.
Thanks! But when the cursor is enabled the scroll callback did not seem to work?
I will check again.
The scroll callback should work the same in both cursor modes.