Writing to an OpenGL Texture

Hi there,

Is it possible to directly write kernel output to an OpenGL texture? Looking at the Apple Samples (Noise Example to be specific) they write to a Buffer Object and copy it to an Image. So can i write to an OpenCL image object? I’ve created an image object and enqueued it via EnqueueAcquireGLObject. App doesn’t crash, but doesn’t work either :slight_smile: Maybe i am missing something obvious. Maybe there even are examples of directly writing to an OpenGL texture?

Thx for any hints,

There should be Apple examples for this. On the Apple platform you need to create a CL context from a GL context. You can then access GL textures from CL.


i found the problem, actually it was a bug with my OpenGL code rather than OpenCL.

Thanks anyway,