| 359 | } |
| 360 | |
| 361 | int initGL(int *argc, char **argv) |
| 362 | { |
| 363 | glutInit(argc, argv); |
| 364 | glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE); |
| 365 | glutInitWindowSize(wWidth, wHeight); |
| 366 | glutCreateWindow("Compute Stable Fluids"); |
| 367 | glutDisplayFunc(display); |
| 368 | glutKeyboardFunc(keyboard); |
| 369 | glutMouseFunc(click); |
| 370 | glutMotionFunc(motion); |
| 371 | glutReshapeFunc(reshape); |
| 372 | |
| 373 | if (!isGLVersionSupported(1, 5)) { |
| 374 | fprintf(stderr, "ERROR: Support for OpenGL 1.5 is missing"); |
| 375 | fflush(stderr); |
| 376 | return false; |
| 377 | } |
| 378 | |
| 379 | if (!areGLExtensionsSupported("GL_ARB_vertex_buffer_object")) { |
| 380 | fprintf(stderr, "ERROR: Support for necessary OpenGL extensions missing."); |
| 381 | fflush(stderr); |
| 382 | return false; |
| 383 | } |
| 384 | |
| 385 | return true; |
| 386 | } |
| 387 | |
| 388 | int main(int argc, char **argv) |
| 389 | { |
no test coverage detected