Commit 0fd74fa1 authored by Alexander Alekhin's avatar Alexander Alekhin

Merge pull request #11911 from berak:core_fix_autobuffer_opengl

parents 5e6a3f1f 45677819
...@@ -1624,12 +1624,12 @@ Context& initializeContextFromGL() ...@@ -1624,12 +1624,12 @@ Context& initializeContextFromGL()
if (status == CL_SUCCESS) if (status == CL_SUCCESS)
{ {
extensionStr.allocate(extensionSize+1); extensionStr.allocate(extensionSize+1);
status = clGetPlatformInfo(platforms[i], CL_PLATFORM_EXTENSIONS, extensionSize, (char*)extensionStr, NULL); status = clGetPlatformInfo(platforms[i], CL_PLATFORM_EXTENSIONS, extensionSize, (char*)extensionStr.data(), NULL);
} }
if (status != CL_SUCCESS) if (status != CL_SUCCESS)
CV_Error(cv::Error::OpenCLInitError, "OpenCL: Can't get platform extension string"); CV_Error(cv::Error::OpenCLInitError, "OpenCL: Can't get platform extension string");
if (!strstr((const char*)extensionStr, "cl_khr_gl_sharing")) if (!strstr((const char*)extensionStr.data(), "cl_khr_gl_sharing"))
continue; continue;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment