Use OpenGL Depth information in CUDA
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 efficeint way to have OpenGL depth data on CUDA?
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
上一篇: 在OpenGL中进行Mipmapping
下一篇: 在CUDA中使用OpenGL深度信息