mirror of
https://github.com/glfw/glfw.git
synced 2026-08-29 03:04:14 +02: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:
@@ -601,8 +601,8 @@ int main(int argc, char** argv)
|
||||
}
|
||||
|
||||
/* Register events callback */
|
||||
glfwSetWindowCloseCallback(window_close_callback);
|
||||
glfwSetKeyCallback(key_callback);
|
||||
glfwSetWindowCloseCallback(window, window_close_callback);
|
||||
glfwSetKeyCallback(window, key_callback);
|
||||
|
||||
glfwMakeContextCurrent(window);
|
||||
if (GL_TRUE != init_opengl())
|
||||
|
||||
Reference in New Issue
Block a user