2
0
mirror of https://github.com/boostorg/compute.git synced 2026-01-26 18:32:48 +00:00

Check platform extension for issue #676

This commit is contained in:
Ken Barker
2016-12-20 19:02:45 +00:00
parent 82f588f24e
commit e2f998bec6

View File

@@ -75,6 +75,10 @@ inline context opengl_create_shared_context()
for(size_t i = 0; i < platforms.size(); i++){
const platform &platform = platforms[i];
// check whether this platform supports OpenCL/OpenGL sharing
if (!platform.supports_extension(cl_gl_sharing_extension))
continue;
// load clGetGLContextInfoKHR() extension function
GetGLContextInfoKHRFunction GetGLContextInfoKHR =
reinterpret_cast<GetGLContextInfoKHRFunction>(