3
votes

I want to create DXT1 compressed texture in OpenCL program and fill its content directly to OpenGL texture... can it be done ? Because OpenCL image has no format with DXT support. I have DXT compressed data in cl_mem buffer in kernel, but how can I put those data 1:1 to binded GL texture ?

1
Have you considered glCompressedTexImage (...)? If you use a PBO you should be able to get that buffer straight into GL without any copying through client memory. And glCompressedTexImage (...) will let you pass pre-compressed data without any compression by the driver. Those two things together should solve your problem. - Andon M. Coleman
@AndonM.Coleman Thanks.. post is as answer and I will accept it - Martin Perry

1 Answers

0
votes

(Repost of comment from Andon M. Coleman)

Have you considered glCompressedTexImage (...)? If you use a PBO you should be able to get that buffer straight into GL without any copying through client memory. And glCompressedTexImage (...) will let you pass pre-compressed data without any compression by the driver. Those two things together should solve your problem.