开发者

CUDA - copy OpenGL rendered image to 2D array

开发者 https://www.devze.com 2023-01-30 18:35 出处:网络
Is it possible, to render a scene using OpenGL and than somehow copy rendered 开发者_C百科image to, for example, 2D array using CUDA? I\'d need to place a result in bool picture[resX][resY] array, whe

Is it possible, to render a scene using OpenGL and than somehow copy rendered 开发者_C百科image to, for example, 2D array using CUDA? I'd need to place a result in bool picture[resX][resY] array, where true = coloured pixel, false = empty space.

Thanks is advance for any suggestions!


You could render to a PBO in OpenGL and then subsequently map this to a CUDA texture. Have a look at the OpenGL interop documentation for some pointers

0

精彩评论

暂无评论...
验证码 换一张
取 消