LWJGL Forum

Programming => OpenGL => Topic started by: Mihai_Ionut_Floares on January 08, 2021, 19:53:54

Title: GLFW 3 Hide cursor
Post by: Mihai_Ionut_Floares on January 08, 2021, 19:53:54
I'm using this to set the cursor on the center of the screen to be able to pan the view around using mouse input like any other 3d game:
glfwSetCursorPos(WINDOW, Main.WIDTH/2, Main.HEIGHT/2);

It is working, but I want to add a crosshair. A simple GUI image centered. I want to keep the mouse functionality, but to hide it and keep only the crosshair.
Title: Re: GLFW 3 Hide cursor
Post by: Mihai_Ionut_Floares on January 08, 2021, 19:58:44
Sorry. I just found the solution:
glfwSetInputMode(WINDOW, GLFW_CURSOR, GLFW_CURSOR_HIDDEN);