The desired cursor image.
The desired x-coordinate, in pixels, of the cursor hotspot.
The desired y-coordinate, in pixels, of the cursor hotspot.
The handle of the created cursor, or null if an error occurred.
Errors: Possible errors include @ref GLFW_NOT_INITIALIZED and @ref GLFW_PLATFORM_ERROR.
The specified image data is copied before this function returns.
This function must only be called from the main thread.
@sa @ref cursor_object @sa @ref glfwDestroyCursor @sa @ref glfwCreateStandardCursor
Added in version 3.1.
Ingroup: input
Creates a custom cursor.
Creates a new custom cursor image that can be set for a window with @ref glfwSetCursor. The cursor can be destroyed with @ref glfwDestroyCursor. Any remaining cursors are destroyed by @ref glfwTerminate.
The pixels are 32-bit, little-endian, non-premultiplied RGBA, i.e. eight bits per channel with the red channel first. They are arranged canonically as packed sequential rows, starting from the top-left corner.
The cursor hotspot is specified in pixels, relative to the upper-left corner of the cursor image. Like all other coordinate systems in GLFW, the X-axis points to the right and the Y-axis points down.