Search code examples
opengltexturesopenclfftgpgpu

Can I use clFFT with OpenGL textures?


I know interoperability between OpenCL and OpenGL is possible. Can I, then, use clFFT with OpenGL textures as input and output, or do I have to download the texture data from the GPU and reupload it as an OpenCL Buffer, then move the data back again after the transform?


Solution

  • Yes. If clFFT doesn't accept OpenCL images, however, you will need to copy it to an OpenCL buffer on the GPU (which will still be faster than copying it to CPU and then back to GPU).