I am trying to make a button with OpenGL using a model and a cursor callback.
I have made a button model, for when the user hovers over the button, and the button itself.
I want to know when the user's cursor is hovering on the button.
So I have a cursor callback :
glfwSetCursorPosCallback()
I am able to retreive the y and x screen coords of the cursor. However my model has coords with [-1, 1], how do I convert the cursor's screen coords to world space coords ?
Sample code would be great.