|
|
|
@ -236,6 +236,9 @@ static int window_close_callback(GLFWwindow window) |
|
|
|
|
static void window_refresh_callback(GLFWwindow window) |
|
|
|
|
{ |
|
|
|
|
printf("%08x at %0.3f: Window refresh\n", counter++, glfwGetTime()); |
|
|
|
|
|
|
|
|
|
glClear(GL_COLOR_BUFFER_BIT); |
|
|
|
|
glfwSwapBuffers(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static void window_focus_callback(GLFWwindow window, int activated) |
|
|
|
@ -371,11 +374,7 @@ int main(void) |
|
|
|
|
printf("Main loop starting\n"); |
|
|
|
|
|
|
|
|
|
while (glfwIsWindow(window) == GL_TRUE) |
|
|
|
|
{ |
|
|
|
|
glClear(GL_COLOR_BUFFER_BIT); |
|
|
|
|
glfwSwapBuffers(); |
|
|
|
|
glfwWaitEvents(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
glfwTerminate(); |
|
|
|
|
exit(EXIT_SUCCESS); |
|
|
|
|