I’m running an application in a VR environment, where each render node has two graphics cards.
The application uses CUDA to compute some geometry that is then rendered with OpenGL.
I’d like to let CUDA use the same device that runs the current OpenGL context because I need CUDA to share data with it.
However, cudaGLSetGLDevice() requires a device number, and as far as I can see, there is no way to tell which of the available devices runs the current OpenGL context. Omitting cudaGLSetGLDevice() does not seem to work either.
Is there a way to make this work?