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

Function initGL

cpp/0_Introduction/simpleTexture3D/simpleTexture3D.cpp:280–296  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

278}
279
280void 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
298void runAutoTest(const char *ref_file, char *exec_path)
299{

Callers 1

mainFunction · 0.70

Calls 2

isGLVersionSupportedFunction · 0.85
areGLExtensionsSupportedFunction · 0.85

Tested by

no test coverage detected