Question

As OpenCL has a built-in support in sharing data with OpenGL, I wonder if I should use Apple's CGLShareGroup to create my OpenCL context (as explained here), or if I can create an OpenCL context and share data with OpenGL using the standard OpenCL API, without losing anything.

Note that I use the standard OpenCL API rather than Apple gcl_* API.

Était-ce utile?

La solution

While the interop API are the same regardless of platform (e.g., clEnqueueAcquireOpenGL objects) the way to create an interop OpenCL context is OS-specific. On Apple you use CGLShareGroup. See section "9.7 Creating CL context from a GL context or share group" from the OpenCL 1.1 specification.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top