Separated window and framebuffer sizes.

This commit is contained in:
Camilla Berglund
2013-06-03 12:51:57 +02:00
parent 89588a4508
commit 3498163da1
26 changed files with 197 additions and 58 deletions
+10
View File
@@ -259,6 +259,15 @@ static void window_size_callback(GLFWwindow* window, int width, int height)
glfwGetTime(),
width,
height);
}
static void framebuffer_size_callback(GLFWwindow* window, int width, int height)
{
printf("%08x at %0.3f: Framebuffer size: %i %i\n",
counter++,
glfwGetTime(),
width,
height);
glViewport(0, 0, width, height);
}
@@ -422,6 +431,7 @@ int main(void)
glfwSetWindowPosCallback(window, window_pos_callback);
glfwSetWindowSizeCallback(window, window_size_callback);
glfwSetFramebufferSizeCallback(window, framebuffer_size_callback);
glfwSetWindowCloseCallback(window, window_close_callback);
glfwSetWindowRefreshCallback(window, window_refresh_callback);
glfwSetWindowFocusCallback(window, window_focus_callback);