mirror of
https://github.com/glfw/glfw.git
synced 2026-01-11 15:23:17 +01:00
Separated window and framebuffer sizes.
This commit is contained in:
@@ -44,7 +44,7 @@ static void error_callback(int error, const char* description)
|
||||
fprintf(stderr, "Error: %s\n", description);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
@@ -82,7 +82,7 @@ static GLFWwindow* open_window(int width, int height, GLFWmonitor* monitor)
|
||||
glfwMakeContextCurrent(window);
|
||||
glfwSwapInterval(1);
|
||||
|
||||
glfwSetWindowSizeCallback(window, window_size_callback);
|
||||
glfwSetFramebufferSizeCallback(window, framebuffer_size_callback);
|
||||
glfwSetWindowCloseCallback(window, window_close_callback);
|
||||
glfwSetKeyCallback(window, key_callback);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user