I am using OGRE for rendering some objects. At every frame, I would like to pass the resulting depth buffer to CUDA for running some kernels on it and computing a result.
How can I achieve this? How do I get access to the depth buffer in OGRE? How do I pass this to CUDA for processing? I do not need to write to the depth buffer in the CUDA kernels, it can be read-only.