MCPcopy Create free account
hub / github.com/NVIDIA/cuda-samples / initGL

Function initGL

cpp/5_Domain_Specific/recursiveGaussian/recursiveGaussian.cpp:326–351  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

324}
325
326void 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
353void benchmark(int iterations)
354{

Callers 1

mainFunction · 0.70

Calls 2

isGLVersionSupportedFunction · 0.85
areGLExtensionsSupportedFunction · 0.85

Tested by

no test coverage detected