clCreateContext with CGL_SHAREGROUP returns -30

Hi, please do you have some ideas that why I’m getting error code -30 (CL_INVALID_VALUE )?

  • macbook pro, 10.7.2
CGLContextObj kCGLContext = CGLGetCurrentContext();
CGLShareGroupObj kCGLShareGroup = CGLGetShareGroup(kCGLContext);
cl_context_properties props[] =
context = clCreateContext(props, 0, 0, 0, 0, &errCode);

You have to use the man pages to interpret these.

i.e.: … ntext.html


clCreateContext returns a valid non-zero context and errcode_ret is set to CL_SUCCESS if the context is created successfully. Otherwise, it returns NULL value with the following error values returned in errcode_ret:

* CL_INVALID_VALUE if context property name in properties is not a supported property name; if devices is NULL; if num_devices is equal to zero; or if pfn_notify is NULL but user_data is not NULL.