| 278 | } |
| 279 | |
| 280 | void initGL(int *argc, char **argv) |
| 281 | { |
| 282 | // initialize GLUT callback functions |
| 283 | glutInit(argc, argv); |
| 284 | glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE); |
| 285 | glutInitWindowSize(width, height); |
| 286 | glutCreateWindow("CUDA 3D texture"); |
| 287 | glutDisplayFunc(display); |
| 288 | glutKeyboardFunc(keyboard); |
| 289 | glutReshapeFunc(reshape); |
| 290 | glutIdleFunc(idle); |
| 291 | |
| 292 | if (!isGLVersionSupported(2, 0) || !areGLExtensionsSupported("GL_ARB_pixel_buffer_object")) { |
| 293 | fprintf(stderr, "Required OpenGL extensions are missing."); |
| 294 | exit(EXIT_FAILURE); |
| 295 | } |
| 296 | } |
| 297 | |
| 298 | void runAutoTest(const char *ref_file, char *exec_path) |
| 299 | { |
no test coverage detected