View Full Version : Writing to an OpenGL Texture

11-29-2009, 05:48 AM
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 :) Maybe i am missing something obvious. Maybe there even are examples of directly writing to an OpenGL texture?

Thx for any hints,

11-29-2009, 07:50 AM
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.

11-29-2009, 12:53 PM

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

Thanks anyway,