4 #ifndef OPENCV_CORE_OCL_RUNTIME_OPENCL_GL_HPP
9 #define clCreateFromGLBuffer clCreateFromGLBuffer_
10 #define clCreateFromGLRenderbuffer clCreateFromGLRenderbuffer_
11 #define clCreateFromGLTexture clCreateFromGLTexture_
12 #define clCreateFromGLTexture2D clCreateFromGLTexture2D_
13 #define clCreateFromGLTexture3D clCreateFromGLTexture3D_
14 #define clEnqueueAcquireGLObjects clEnqueueAcquireGLObjects_
15 #define clEnqueueReleaseGLObjects clEnqueueReleaseGLObjects_
16 #define clGetGLContextInfoKHR clGetGLContextInfoKHR_
17 #define clGetGLObjectInfo clGetGLObjectInfo_
18 #define clGetGLTextureInfo clGetGLTextureInfo_
21 #include <OpenCL/cl_gl.h>
27 #undef clCreateFromGLBuffer
28 #define clCreateFromGLBuffer clCreateFromGLBuffer_pfn
29 #undef clCreateFromGLRenderbuffer
30 #define clCreateFromGLRenderbuffer clCreateFromGLRenderbuffer_pfn
31 #undef clCreateFromGLTexture
32 #define clCreateFromGLTexture clCreateFromGLTexture_pfn
33 #undef clCreateFromGLTexture2D
34 #define clCreateFromGLTexture2D clCreateFromGLTexture2D_pfn
35 #undef clCreateFromGLTexture3D
36 #define clCreateFromGLTexture3D clCreateFromGLTexture3D_pfn
37 #undef clEnqueueAcquireGLObjects
38 #define clEnqueueAcquireGLObjects clEnqueueAcquireGLObjects_pfn
39 #undef clEnqueueReleaseGLObjects
40 #define clEnqueueReleaseGLObjects clEnqueueReleaseGLObjects_pfn
41 #undef clGetGLContextInfoKHR
42 #define clGetGLContextInfoKHR clGetGLContextInfoKHR_pfn
43 #undef clGetGLObjectInfo
44 #define clGetGLObjectInfo clGetGLObjectInfo_pfn
45 #undef clGetGLTextureInfo
46 #define clGetGLTextureInfo clGetGLTextureInfo_pfn
48 #ifdef cl_khr_gl_sharing
51 extern CL_RUNTIME_EXPORT cl_mem (CL_API_CALL*clCreateFromGLBuffer)(cl_context, cl_mem_flags, cl_GLuint,
int*);
52 extern CL_RUNTIME_EXPORT cl_mem (CL_API_CALL*clCreateFromGLRenderbuffer)(cl_context, cl_mem_flags, cl_GLuint, cl_int*);
53 extern CL_RUNTIME_EXPORT cl_mem (CL_API_CALL*clCreateFromGLTexture)(cl_context, cl_mem_flags, cl_GLenum, cl_GLint, cl_GLuint, cl_int*);
54 extern CL_RUNTIME_EXPORT cl_mem (CL_API_CALL*clCreateFromGLTexture2D)(cl_context, cl_mem_flags, cl_GLenum, cl_GLint, cl_GLuint, cl_int*);
55 extern CL_RUNTIME_EXPORT cl_mem (CL_API_CALL*clCreateFromGLTexture3D)(cl_context, cl_mem_flags, cl_GLenum, cl_GLint, cl_GLuint, cl_int*);
56 extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueAcquireGLObjects)(cl_command_queue, cl_uint,
const cl_mem*, cl_uint,
const cl_event*, cl_event*);
57 extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clEnqueueReleaseGLObjects)(cl_command_queue, cl_uint,
const cl_mem*, cl_uint,
const cl_event*, cl_event*);
58 extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clGetGLContextInfoKHR)(
const cl_context_properties*, cl_gl_context_info, size_t,
void*,
size_t*);
59 extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clGetGLObjectInfo)(cl_mem, cl_gl_object_type*, cl_GLuint*);
60 extern CL_RUNTIME_EXPORT cl_int (CL_API_CALL*clGetGLTextureInfo)(cl_mem, cl_gl_texture_info, size_t,
void*,
size_t*);