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
+2 -2
View File
@@ -59,7 +59,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);
}
@@ -95,7 +95,7 @@ int main(void)
last_time = glfwGetTime();
frame_rate = 0.0;
glfwSetWindowSizeCallback(window, window_size_callback);
glfwSetFramebufferSizeCallback(window, framebuffer_size_callback);
glfwSetKeyCallback(window, key_callback);
glMatrixMode(GL_PROJECTION);