Use OpenGL Depth Information in CUDA

I know that GL_DEPTH_COMPONENT is not supported in CUDA compatibility in CUDA 4.2, but I am wondering if GL_DEPTH_COMPONENT will be supported in CUDA 5 or in future versions.

I am currently passing depth information to texture using fbo. Then I use this texture as a source to render it to another texture and use this latest color texture with CUDA interoperability.

I am also trying to use glCopyPixels to create a copy. But both solutions require a lot of memory (two large textures, for depth and color).

I could also use a shader, but I would not want to mix too many technologies.

What is the most efficient way to have OpenGL depth data for CUDA?

+4
source share
1 answer

Have you tried to use the render buffer with a depth nesting and then register it through cudaGraphicsGLRegisterImage ? This function supports the visualization of buffers as a target, so you must have access to depth information

0
source

All Articles