diff --git a/tests/fsaa.c b/tests/fsaa.c index 611203f1..af6dd7d1 100644 --- a/tests/fsaa.c +++ b/tests/fsaa.c @@ -42,6 +42,19 @@ static void window_size_callback(GLFWwindow window, int width, int height) glViewport(0, 0, width, height); } +static void key_callback(GLFWwindow window, int key, int action) +{ + if (action != GLFW_PRESS) + return; + + switch (key) + { + case GLFW_KEY_SPACE: + glfwSetTime(0.0); + break; + } +} + static void usage(void) { printf("Usage: fsaa [-h] [-s SAMPLES]\n"); @@ -79,6 +92,8 @@ int main(int argc, char** argv) else printf("Requesting that FSAA not be available\n"); + glfwSetKeyCallback(key_callback); + glfwOpenWindowHint(GLFW_FSAA_SAMPLES, samples); window = glfwOpenWindow(800, 400, GLFW_WINDOWED, "Aliasing Detector", NULL);