문제

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