I was working on a project with GLFW.NET and OpenGL.NET when i encountered this error
Glfw.SetMouseButtonCallback(glfwWindow, MouseListener.mousePosCallback);
here is the MouseListener.mousePosCallback code:
public static void mouseButtonCallback(GLFW.Window window, int button, GLFW.InputState action, int mods) {
if (action == GLFW.InputState.Press) {
if (button < get().mouseButtonPressed.Length) {
get().mouseButtonPressed[button] = true;
}
} else if (action == GLFW.InputState.Release) {
if (button < get().mouseButtonPressed.Length) {
get().mouseButtonPressed[button] = false;
get().isDragging = false;
}
}
}
I don't understand why is this happening because when i use other functions like glfw.SetCursorPositionCallback everything works how it's expected. Is this some kind of bug or am i missing something ?