When I ran the optixPathTracer project, I got an exception: “GL interop is only available on display device, please use display device for optimal performance. Alternatively you can disable GL interop with --no-gl-interop and run with degraded performance.” I tried to disable GL interop and it was succeed. But I want to enable GL interop, how should I do? Thanks for your help!
The CUDA-OpenGL interoperability only works when there is an NVIDIA OpenGL implementation running on the system.
The OptiX SDK examples use an OpenGL Pixel Buffer Object (PBO) to directly render into device memory allocated by OpenGL, which is then used to speed up the texture upload for the final display of the resulting image inside the window’s client region with a textured rectangle. For optimal performance that PBO should reside on the (primary) GPU which is running the OpenGL implementation.
Depending on your system configuration, that might simply not be possible.
For example, if you’re running the ray tracing on a Tesla GPU, that is only running the compute workload (CUDA, OptiX) and no graphics tasks. Means only another device runs the display and OpenGL implementation, which also means the PBO is not residing on the device which does the ray tracing, which would make direct CUDA-OpenGL interop impossible.
Even less so if the OpenGL implementation is running on a different vendor or in software (Mesa, Microsoft). There is no CUDA implementation on those so there can’t be CUDA-OpenGL interop.
I would expect issues like this either on a Linux system or when running Windows over RemoteDesktop and not on a Quadro board.
If the latter is the case, please have a look at this NVIDIA tool: https://developer.nvidia.com/designworks
Thanks for your reply. I ran it locally on Windows and my GPU is RTX2060。
Then the OptiX SDK examples should work out of the box with OpenGL interop.
Maybe try to de-install and cleanly re-install your display drivers.
Uninstall the display drivers via Windows’ “Add or Remove Programs”, reboot, then run the new display driver’s setup, and inside the installer, chose “custom install” and check the “clean installation” check box.
When doing that, you could also update to 456.71 display drivers which are required for the OptiX SDK 7.2.0, both released last week.
Under Linux the required display drivers for OptiX SDK 7.2.0 support are version 455.28 from the same day.
Thanks a lot!