mirror of
https://github.com/glfw/glfw.git
synced 2026-09-21 08:39:45 +00:00
Made window-related callbacks per-window.
This makes polymorphic behaviour easier to implement and avoids the problem of events being triggered before the GLFW window object is fully usable.
This commit is contained in:
+3
-3
@@ -102,9 +102,9 @@ static GLboolean open_window(void)
|
||||
glfwGetCursorPos(window_handle, &cursor_x, &cursor_y);
|
||||
printf("Cursor position: %i %i\n", cursor_x, cursor_y);
|
||||
|
||||
glfwSetWindowSizeCallback(window_size_callback);
|
||||
glfwSetCursorPosCallback(cursor_position_callback);
|
||||
glfwSetKeyCallback(key_callback);
|
||||
glfwSetWindowSizeCallback(window_handle, window_size_callback);
|
||||
glfwSetCursorPosCallback(window_handle, cursor_position_callback);
|
||||
glfwSetKeyCallback(window_handle, key_callback);
|
||||
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user