AnsweredAssumed Answered

write in a image2d_t created with GL_RGBA8 ?

Question asked by spectral on Jun 7, 2013
Latest reply on Jun 7, 2013 by nou

Hi,

 

For OpenCL/OpenGL interop I create a texture with the following code :

 

glGenTextures(1, (GLuint*)&_displayTexture1Id);
glBindTexture(GL_TEXTURE_2D, (GLuint)_displayTexture1Id);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, _width, _height, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0);
glBindTexture(GL_TEXTURE_2D, 0);

 

But how can I write a RGBA8 with OpenCL (on the kernel level). I only have methods like write_imagei that request a "int4" (4x32) and there is no "4x8" related method ?

 

Thanks

Outcomes