c++ - Grabbing the mouse cursor in GLFW -
my question if glfw has easy way of 'grabbing' mouse cursor. sdl has grab cursor function clamps mouse inside window area. glfw have equivalent sdl_wm_grabinput?
if want system cursor visible , restricted window no, not possible. however, if want system cursor grabbed , hidden, example if wish draw own cursor or implement free-look camera, can use disabled cursor mode. in case, see glfwsetinputmode , glfw_cursor_disabled
.
mouse input act if cursor unrestricted, in fact unable leave window until change mode or window loses focus.
Comments
Post a Comment