Function glfwGetCursorPos

  • 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.

    Parameters

    • window: GLFWwindow

      The desired window.

    • xpos: bigint

      Where to store the cursor x-coordinate, relative to the left edge of the content area, or NULL.

    • ypos: bigint

      Where to store the cursor y-coordinate, relative to the to top edge of the content area, or NULL.

    Returns void

Generated using TypeDoc