Existing non GL Cuda Context can be "transformed" in a GL Cuda Context ?


I have an application that does use CUDA to do some computations. These computations does not require OpenGL display, so I do not create a GL context, and I use a classic GL Context with cuCtxCreate.

I would like to allow the user to display results in a graphical manner, optionnaly. That means that he can open a opengl window with a opengl context, and he can close it as well, thus destroying the opengl context inside.
I would like to know if it was possible to transform existing, non opengl cuda context to be made into a opengl cuda context “on the fly” without loosing any data, and then if it was possible to transforme opengl cuda context into normal cuda context without loosing anything, in case the underlying opengl context is killed ?

As far as i know, opencl allows to do such manipulation.

Thanks, Vincent