glfwGetCursorPos¶
Retrieves the position of the cursor relative to the content area of the window.
This function returns the position of the cursor, in screen coordinates, relative to the upper-left corner of the content area of the specified window.
If the cursor is disabled (with GLFW_CURSOR_DISABLED) then the cursor
position is unbounded and limited only by the minimum and maximum values of
a double.
The coordinate can be converted to their integer equivalents with the
floor function. Casting directly to an integer type works for positive
coordinates, but fails for negative ones.
Any or all of the position arguments may be NULL. If an error occurs, all
non-NULL position arguments will be set to zero.
- arguments
-
\GLFWwindow$windowThe desired window.float$xposWhere to store the cursor x-coordinate, relative to the left edge of the content area, orNULL.float$yposWhere to store the cursor y-coordinate, relative to the to top edge of the content area, orNULL.
- returns
-
void