24 #ifndef __OPENCL_CL_GL_H 25 #define __OPENCL_CL_GL_H 28 #include <OpenCL/cl.h> 37 typedef cl_uint cl_gl_object_type;
38 typedef cl_uint cl_gl_texture_info;
39 typedef cl_uint cl_gl_platform_info;
40 typedef struct __GLsync *cl_GLsync;
43 #define CL_GL_OBJECT_BUFFER 0x2000 44 #define CL_GL_OBJECT_TEXTURE2D 0x2001 45 #define CL_GL_OBJECT_TEXTURE3D 0x2002 46 #define CL_GL_OBJECT_RENDERBUFFER 0x2003 47 #define CL_GL_OBJECT_TEXTURE2D_ARRAY 0x200E 48 #define CL_GL_OBJECT_TEXTURE1D 0x200F 49 #define CL_GL_OBJECT_TEXTURE1D_ARRAY 0x2010 50 #define CL_GL_OBJECT_TEXTURE_BUFFER 0x2011 53 #define CL_GL_TEXTURE_TARGET 0x2004 54 #define CL_GL_MIPMAP_LEVEL 0x2005 55 #define CL_GL_NUM_SAMPLES 0x2012 58 extern CL_API_ENTRY cl_mem CL_API_CALL
59 clCreateFromGLBuffer(cl_context ,
62 int * ) CL_API_SUFFIX__VERSION_1_0;
64 extern CL_API_ENTRY cl_mem CL_API_CALL
65 clCreateFromGLTexture(cl_context ,
70 cl_int * ) CL_API_SUFFIX__VERSION_1_2;
72 extern CL_API_ENTRY cl_mem CL_API_CALL
73 clCreateFromGLRenderbuffer(cl_context ,
76 cl_int * ) CL_API_SUFFIX__VERSION_1_0;
78 extern CL_API_ENTRY cl_int CL_API_CALL
79 clGetGLObjectInfo(cl_mem ,
81 cl_GLuint * ) CL_API_SUFFIX__VERSION_1_0;
83 extern CL_API_ENTRY cl_int CL_API_CALL
84 clGetGLTextureInfo(cl_mem ,
88 size_t * ) CL_API_SUFFIX__VERSION_1_0;
90 extern CL_API_ENTRY cl_int CL_API_CALL
91 clEnqueueAcquireGLObjects(cl_command_queue ,
96 cl_event * ) CL_API_SUFFIX__VERSION_1_0;
98 extern CL_API_ENTRY cl_int CL_API_CALL
99 clEnqueueReleaseGLObjects(cl_command_queue ,
104 cl_event * ) CL_API_SUFFIX__VERSION_1_0;
108 extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
109 clCreateFromGLTexture2D(cl_context ,
114 cl_int * ) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
116 extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
117 clCreateFromGLTexture3D(cl_context ,
122 cl_int * ) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
126 #define cl_khr_gl_sharing 1 128 typedef cl_uint cl_gl_context_info;
131 #define CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR -1000 134 #define CL_CURRENT_DEVICE_FOR_GL_CONTEXT_KHR 0x2006 135 #define CL_DEVICES_FOR_GL_CONTEXT_KHR 0x2007 138 #define CL_GL_CONTEXT_KHR 0x2008 139 #define CL_EGL_DISPLAY_KHR 0x2009 140 #define CL_GLX_DISPLAY_KHR 0x200A 141 #define CL_WGL_HDC_KHR 0x200B 142 #define CL_CGL_SHAREGROUP_KHR 0x200C 144 extern CL_API_ENTRY cl_int CL_API_CALL
145 clGetGLContextInfoKHR(
const cl_context_properties * ,
149 size_t * ) CL_API_SUFFIX__VERSION_1_0;
151 typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetGLContextInfoKHR_fn)(
152 const cl_context_properties * properties,
153 cl_gl_context_info param_name,
154 size_t param_value_size,
156 size_t * param_value_size_ret);