Added timer reset to FSAA test.

This commit is contained in:
Camilla Berglund 2011-03-05 13:17:39 +01:00
parent cfcc3da65f
commit 74c9b57f3d

View File

@ -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);