4
votes

I know GL_DEPTH_COMPONENT is not supported in CUDA interoperability at CUDA 4.2, but I wonder if GL_DEPTH_COMPONENT is going to be supported in CUDA 5 or in future versions.

Currently I'm rendering depth information to a texture using a fbo. Then I use this texture as a source to render it in other texture and use this last color texture with CUDA interoperability.

I'm also trying to use glCopyPixels to make the copy. But both solutions need a lot of memory (two big textures, for depth and color).

I could also use a shader but I wouldn't like to mix too much technologies.

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

2

2 Answers

1
votes

It is still the case in 2020 that depth components are not available in CUDA via the OpenGL interoperability subsystem.

-2
votes

Have you tried using render buffer with depth attachment and then registering it via cudaGraphicsGLRegisterImage ?

This function supports render buffers as a target so you should be able to access depth information