mirror of
https://github.com/opencv/opencv.git
synced 2025-07-24 14:06:27 +08:00
core: fix autobuffer usage in opengl.cpp
This commit is contained in:
parent
0bb2c115aa
commit
45677819e8
@ -1624,12 +1624,12 @@ Context& initializeContextFromGL()
|
||||
if (status == CL_SUCCESS)
|
||||
{
|
||||
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)
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user