| 324 | } |
| 325 | |
| 326 | void initGL(int *argc, char **argv) |
| 327 | { |
| 328 | glutInit(argc, argv); |
| 329 | glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE); |
| 330 | glutInitWindowSize(width, height); |
| 331 | glutCreateWindow(sSDKsample); |
| 332 | glutDisplayFunc(display); |
| 333 | glutKeyboardFunc(keyboard); |
| 334 | glutReshapeFunc(reshape); |
| 335 | glutIdleFunc(idle); |
| 336 | |
| 337 | #if defined(__APPLE__) || defined(MACOSX) |
| 338 | atexit(cleanup); |
| 339 | #else |
| 340 | glutCloseFunc(cleanup); |
| 341 | #endif |
| 342 | |
| 343 | printf("Press '+' and '-' to change filter width\n"); |
| 344 | printf("0, 1, 2 - change filter order\n"); |
| 345 | |
| 346 | if (!isGLVersionSupported(2, 0) |
| 347 | || !areGLExtensionsSupported("GL_ARB_vertex_buffer_object GL_ARB_pixel_buffer_object")) { |
| 348 | fprintf(stderr, "Required OpenGL extensions missing."); |
| 349 | exit(EXIT_FAILURE); |
| 350 | } |
| 351 | } |
| 352 | |
| 353 | void benchmark(int iterations) |
| 354 | { |
no test coverage detected