mirror of
https://github.com/glfw/glfw.git
synced 2026-11-18 12:54:54 +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(int width, int height, int mode)
|
||||
glfwMakeContextCurrent(window_handle);
|
||||
glfwSwapInterval(1);
|
||||
|
||||
glfwSetWindowSizeCallback(window_size_callback);
|
||||
glfwSetWindowCloseCallback(window_close_callback);
|
||||
glfwSetKeyCallback(key_callback);
|
||||
glfwSetWindowSizeCallback(window_handle, window_size_callback);
|
||||
glfwSetWindowCloseCallback(window_handle, window_close_callback);
|
||||
glfwSetKeyCallback(window_handle, key_callback);
|
||||
|
||||
printf("Opening %s mode window took %0.3f seconds\n",
|
||||
get_mode_name(mode),
|
||||
|
||||
Reference in New Issue
Block a user