I am creating a project about particle system on mac os x. I found similar questions on Internet, and my question is the same as How can I create an shared context between OpenGL and OpenCL with glfw3 on OSX? ,but I still haven't solved my problem yet. Please help me, thank you.
This is a part of my code:
CGLContextObj glContext = CGLGetCurrentContext();
CGLShareGroupObj shareGroup = CGLGetShareGroup(glContext);
cl_context_properties props[] =
{
CL_CONTEXT_PROPERTY_USE_CGL_SHAREGROUP_APPLE,
(cl_context_properties)kCGLShareGroup,`
0
};
my error messages are :
particles.cpp:522:2: error: ‘CGLContextObj’ was not declared in this scope
CGLContextObj glContext = CGLGetCurrentContext();
particles.cpp:523:2: error: ‘CGLShareGroupObj’ was not declared in this scope
CGLShareGroupObj shareGroup = CGLGetShareGroup(glContext);
particles.cpp:527:2: error: ‘CL_CONTEXT_PROPERTY_USE_CGL_SHAREGROUP_APPLE’ was not declared in this scope
CL_CONTEXT_PROPERTY_USE_CGL_SHAREGROUP_APPLE,
particles.cpp:528:25: error: ‘kCGLShareGroup’ was not declared in this scope (cl_context_properties)kCGLShareGroup,0