mirror of
https://github.com/glfw/glfw.git
synced 2026-09-22 16:52:57 +00:00
Separated window and framebuffer sizes.
This commit is contained in:
+2
-2
@@ -87,7 +87,7 @@ static void key_callback(GLFWwindow* window, int key, int action, int mods)
|
||||
}
|
||||
}
|
||||
|
||||
static void window_size_callback(GLFWwindow* window, int width, int height)
|
||||
static void framebuffer_size_callback(GLFWwindow* window, int width, int height)
|
||||
{
|
||||
glViewport(0, 0, width, height);
|
||||
}
|
||||
@@ -104,7 +104,7 @@ static GLFWwindow* open_window(void)
|
||||
glfwGetCursorPos(window, &cursor_x, &cursor_y);
|
||||
printf("Cursor position: %f %f\n", cursor_x, cursor_y);
|
||||
|
||||
glfwSetWindowSizeCallback(window, window_size_callback);
|
||||
glfwSetFramebufferSizeCallback(window, framebuffer_size_callback);
|
||||
glfwSetCursorPosCallback(window, cursor_position_callback);
|
||||
glfwSetKeyCallback(window, key_callback);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user