I am designing a toy Game Engine with OpenGL 4.1, Xcode, and GLFW. I have noticed that if I move the mouse while the scene is loading, the mouse cursor does not disappear, despite the call
glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_DISABLED);
The game works fine, but the cursor remains visible.
I tried to put the glfwSetInputMode() call after the scene is loaded, right before entering the game loop, but it didn't help. Also, enabling the cursor and disabling it again does not affect its presence on the screen. How can I fix this issue? Thanks.