How to use a CUDA array as a OpenGL buffer?

I found that there are some APIs which can map OpenGL buffers to CUDA arrays. https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__OPENGL.html

In the opposite direction, I want to map existing CUDA arrays to OpenGL buffers, how can I do that? Thanks.

It can’t be done. OpenGL/CUDA interoperability always starts with an OpenGL resource.