public static void SetCursorPosCallback(Window window, CursorPosFunc callback) { cursorPosFunc = callback; var ptr = Marshal.GetFunctionPointerForDelegate(callback); glfwSetCursorPosCallback(window.Ptr, ptr); GC.KeepAlive(callback); }
public static void SetScrollCallback(Window window, CursorPosFunc callback) { var ptr = Marshal.GetFunctionPointerForDelegate(callback); glfwSetScrollCallback(window.Ptr, ptr); }