Re: I made a few fixes to JOCL - how do I contribute them back?
Posted by lixoman100 on Sep 04, 2013; 10:10pm
URL: https://forum.jogamp.org/I-made-a-few-fixes-to-JOCL-how-do-I-contribute-them-back-tp4029976p4029983.html
Hello,
I do not know either if the changes to CL context creation on Mac OS X will work on all supported platforms - they should only affect Mac OS X, and I am only able to test it on 10.8.4.
As far as I have been able to understand it, CL_CONTEXT_PROPERTY_USE_CGL_SHAREGROUP_APPLE is the correct way to specify the GL sharing group ID on Apple platforms (at least as of 10.8.4). Using CL_CGL_SHAREGROUP_KHR, as the previous code did, simply causes the context creation to throw a CL_INVALID_VALUE error on Mac OS X 10.8.4.
I've read that this constant is only defined on Apple's version of the "cl_gl_ext.h" file. I have digged around to check for this and I found this comment: "Introduced in Mac OS X 10.6". It is mentioned in OpenCL's Wikipedia entry "OpenCL 1.0 has been released with Mac OS X Snow Leopard". Snow Leopard IS 10.6, so apparently the CL_CONTEXT_PROPERTY_USE_CGL_SHAREGROUP_APPLE constant was added at the same time that OpenCL became supported on Mac OS X... I'd find it safe to assume that using this constant is the correct way to create CLGL contexts on Mac platforms where OpenCL is supported.
As for unit tests, I'll admit to my limitations and say that I have no idea of what those are and how they work.