I need a cuda kernel that compute data from an OpenGL Frame Buffer Object (as GL_TEXTURE_2D_ARRAY with 2 level) and to put the results in another frame buffer object. I tryed to use :
For both of my FBOs. But it dont works at all.
How to do this nicely?
The cuda/OpenGL interop sample codes may be of interest. They demonstrate use of VBOs and PBOs directly as I recall.
Using a FBO is a little more complicated as we are still usually using a resource (e.g. texture resource) associated with the FBO, as our interop vehicle. There are treatments of this in various places, such as here:
This sample code demonstrates use of a 3D volume texture associated with a FBO: