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.

有帮助吗?

解决方案

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top