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:
@@ -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>(
|
||||
|
||||
Reference in New Issue
Block a user