Why cudaGLSetGLDevice failed, even though it's called in the first line of main function

后端 未结 1 1610
梦如初夏
梦如初夏 2021-01-26 13:21

I want to use interoperability between OpenGL and CUDA. I know, as some tutorials said, the first step is to choose device. However, when I called the cudaGLSetGLDevice(0) in th

相关标签:
1条回答
  • 2021-01-26 13:33

    You need in opengl context initialized before call cudaGLSetDevice. In case of glut glutInit(argc, argv); is called. Initialize opengl context before use any cuda<->opengl interoperability functions call.

    0 讨论(0)
提交回复
热议问题