Optix prime and OpenGL


I know how to share GL BO with Optix, but how do I do it with Optix Prime?

Many thanks in advance,


There’s no built-in support in Prime for that but you could try to get a CUDA pointer out of a GL buffer with

  1. cudaGraphicsGLRegisterBuffer
  2. cudaGraphicsMapResources
  3. cudaGraphicsResourceGetMappedPointer

Not sure if a call to cudaGraphicsResourceSetMapFlags might also be helpful.

Thanks marknv,

I’ll try it that way.