I have an OpenGL GPGPU-application where I want to migrate some of the passes to Cuda. As far as I can see from the documentation and the extension specification, the way to transfer data to OpenGL from Cuda is using buffer objects and the new texture buffer object extension. However, I’m a bit perplexed about how to transfer data the other way, since Cuda only can borrow buffers from OpenGL, I must somehow render to a buffer object. One approach is of course to render to a texture and the pixel buffer object to copy the contents of the texture into a buffer (i.e. how one would do render-to-vertex-buffer). However, this implies a copy. Another approach is to use transform feedback, performing all the computations in the vertex shader, but I’m a bit unsure on the performance of this…
Have I missed something here, or isn’t it a way of getting GL fragment output into Cuda without a copy?