mirror of
https://github.com/glfw/glfw.git
synced 2024-11-25 22:14:34 +00:00
Added timer reset to FSAA test.
This commit is contained in:
parent
cfcc3da65f
commit
74c9b57f3d
15
tests/fsaa.c
15
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);
|
||||
|
Loading…
Reference in New Issue
Block a user