mirror of
https://github.com/glfw/glfw.git
synced 2026-08-27 22:15:55 +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:
@@ -577,8 +577,6 @@ int main( void )
|
||||
exit( EXIT_FAILURE );
|
||||
}
|
||||
|
||||
glfwSetWindowSizeCallback( reshape );
|
||||
|
||||
glfwWindowHint(GLFW_DEPTH_BITS, 16);
|
||||
|
||||
window = glfwCreateWindow( 400, 400, GLFW_WINDOWED, "Boing (classic Amiga demo)", NULL );
|
||||
@@ -589,6 +587,8 @@ int main( void )
|
||||
exit( EXIT_FAILURE );
|
||||
}
|
||||
|
||||
glfwSetWindowSizeCallback(window, reshape);
|
||||
|
||||
glfwMakeContextCurrent(window);
|
||||
glfwSwapInterval( 1 );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user