Is there a concise demo available showing how to do some calculations that generate a 2D array of pixel values with OpenCL, then shows how to use that image as a texture in OpenGL (say, mapping it onto a spinning cube or something like that)?
you replace clCreateFromGLBuffer() with clCreateFromTexture2D(context, flags, GL_TEXTURE_2D, 0, gl_texture, &err);
only diference is specify texture_target and mipmap level. you just pass GL_TEXTURE_2D and mipmap 0.
also in kernel you treat it as image2d_t