private void onCursorPos(final long window, final double xpos, final double ypos) {
        context.getWindowContentScale(inputScale);
        int x = (int) Math.round(xpos * inputScale.x);
        int y = (int) Math.round((currentHeight - ypos) * inputScale.y);
      

        int xDelta = x - mouseX;
        int yDelta = y - mouseY;
        mouseX = x;
        mouseY = y;

        if (xDelta != 0 || yDelta != 0) {
            final MouseMotionEvent mouseMotionEvent = new MouseMotionEvent(x, y, xDelta, yDelta, mouseWheel, 0);
            mouseMotionEvent.setTime(getInputTimeNanos());
            mouseMotionEvents.add(mouseMotionEvent);
        }
    }
Captures mouse input using GLFW callbacks. It then temporarily stores these
in event queues which are processed in the {@link #update()} method. Due to
some of the GLFW button IDs, there is a conversion method in this class which
will convert the GLFW left, middle and right mouse button to JME3 left,
middle and right button codes.

@author Daniel Johansson (dannyjo)
@since 3.1
jme3-lwjgl3/src/main/java/com/jme3/input/lwjgl/GlfwMouseInput.java