private static long[] createGlfwCursor(final JmeCursor jmeCursor) {

        long[] cursorArray = new long[jmeCursor.getNumImages()];

        for (int i = 0; i < jmeCursor.getNumImages(); i++) {

            final ByteBuffer buffer = transformCursorImage(jmeCursor.getImagesData(), jmeCursor.getWidth(), jmeCursor.getHeight(), i);
            final GLFWImage glfwImage = new GLFWImage(BufferUtils.createByteBuffer(GLFWImage.SIZEOF));
            glfwImage.set(jmeCursor.getWidth(), jmeCursor.getHeight(), buffer);

            final int hotspotX = jmeCursor.getXHotSpot();
            final int hotspotY = jmeCursor.getHeight() - jmeCursor.getYHotSpot();

            cursorArray[i] = glfwCreateCursor(glfwImage, hotspotX, hotspotY);
        }

        return cursorArray;
    }
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