mirror of
https://github.com/glfw/glfw.git
synced 2026-09-21 08:39:45 +00:00
Removed implicit glfwMakeCurrentContext.
Implicitly making the context current makes sense in a single-window API but less sense in a multi-window one.
This commit is contained in:
+4
-3
@@ -30,12 +30,13 @@ int main(void)
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
// Enable vertical sync (on cards that support it)
|
||||
glfwMakeContextCurrent(window);
|
||||
glfwSwapInterval(1);
|
||||
|
||||
// Ensure we can capture the escape key being pressed below
|
||||
glfwSetInputMode(window, GLFW_STICKY_KEYS, GL_TRUE);
|
||||
|
||||
// Enable vertical sync (on cards that support it)
|
||||
glfwSwapInterval(1);
|
||||
|
||||
for (;;)
|
||||
{
|
||||
double t = glfwGetTime();
|
||||
|
||||
Reference in New Issue
Block a user