I've started implementing OpenGL interop.
Some of the complexity is that Apple's OpenCL implementation violates the spec regarding the defined constants for GL context sharing. I've accounted for this with #ifdefs in the code.
The context is treated as a Ptr (). I don't know if it's worth trying to use a more descriptive type. I suspect not as this is inherently low-level, platform-dependent plumbing, and should really be sealed up in a library.
To that end, it may be helpful to add a module, or release a separate package, including the requisite glue-code for each platform. I've written this code on OS X (it's just a few lines of FFI), but not yet released it anywhere public. One argument for not including this in the OpenCL package is that it seems to violate the package's design principle of being a direct, low-level mapping to the OpenCL API. I will probably add this to my CLUtil library in the near term.
Export CLChannelOrder and CLChannelType types and constructors.
Added support for sharing an OpenGL context with OpenCL.
Most of the opaque values from OpenCL are treated as Ptr (), but we don't operate with them in haskell. We only pass it between functions. So, It's rigth to treat context as a Ptr ()