Mercurial > projects > cl4d
comparison opencl/c/cl_gl.d @ 1:5b5ace425b37
* moved c.opencl to c.cl
* updated c.cl_gl
+ c.d3d10
author | Trass3r |
---|---|
date | Wed, 14 Apr 2010 13:52:17 +0200 |
parents | 3cea44337083 |
children | 01d502efe0c4 |
comparison
equal
deleted
inserted
replaced
0:3cea44337083 | 1:5b5ace425b37 |
---|---|
19 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | 19 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, |
20 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | 20 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE |
21 * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. | 21 * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. |
22 **********************************************************************************/ | 22 **********************************************************************************/ |
23 | 23 |
24 // $Revision: 8748 $ on $Date: 2009-08-27 04:24:36 -0700 (Thu, 27 Aug 2009) $ | 24 // $Revision: 10424 $ on $Date: 2010-02-17 14:34:49 -0800 (Wed, 17 Feb 2010) $ |
25 | 25 |
26 /** | |
27 * cl_gl.h contains Khronos-approved (KHR) OpenCL extensions which have | |
28 * OpenGL dependencies. The application is responsible for #including | |
29 * OpenGL or OpenGL ES headers before #including cl_gl.h. | |
30 */ | |
26 module opencl.c.cl_gl; | 31 module opencl.c.cl_gl; |
27 | 32 |
28 import opencl.c.platform; | 33 //import opencl.c.platform; |
29 import opencl.c.opencl; | 34 import opencl.c.cl; |
30 | 35 |
31 extern(C): | 36 extern(C): |
32 | 37 |
33 alias cl_uint cl_gl_object_type; | 38 typedef cl_uint cl_gl_object_type; |
34 alias cl_uint cl_gl_texture_info; | 39 typedef cl_uint cl_gl_texture_info; |
35 alias cl_uint cl_gl_platform_info; | 40 typedef cl_uint cl_gl_platform_info; |
36 | 41 |
37 enum | 42 enum |
38 { | 43 { |
39 // cl_gl_object_type | 44 // cl_gl_object_type |
40 CL_GL_OBJECT_BUFFER = 0x2000, | 45 CL_GL_OBJECT_BUFFER = 0x2000, |
41 CL_GL_OBJECT_TEXTURE2D = 0x2001, | 46 CL_GL_OBJECT_TEXTURE2D = 0x2001, |
42 CL_GL_OBJECT_TEXTURE3D = 0x2002, | 47 CL_GL_OBJECT_TEXTURE3D = 0x2002, |
43 CL_GL_OBJECT_RENDERBUFFER = 0x2003, | 48 CL_GL_OBJECT_RENDERBUFFER = 0x2003, |
44 | 49 |
45 // cl_gl_texture_info | 50 // cl_gl_texture_info |
46 CL_GL_TEXTURE_TARGET = 0x2004, | 51 CL_GL_TEXTURE_TARGET = 0x2004, |
47 CL_GL_MIPMAP_LEVEL = 0x2005, | 52 CL_GL_MIPMAP_LEVEL = 0x2005, |
48 } | 53 } |
49 | 54 |
50 cl_mem clCreateFromGLBuffer( | 55 cl_mem clCreateFromGLBuffer( |
51 cl_context /* context */, | 56 cl_context context, |
52 cl_mem_flags /* flags */, | 57 cl_mem_flags flags, |
53 GLuint /* bufobj */, | 58 cl_GLuint bufobj, |
54 int* /* errcode_ret */ | 59 int* errcode_ret |
55 ); | 60 ); |
56 | 61 |
57 cl_mem clCreateFromGLTexture2D( | 62 cl_mem clCreateFromGLTexture2D( |
58 cl_context /* context */, | 63 cl_context context, |
59 cl_mem_flags /* flags */, | 64 cl_mem_flags flags, |
60 GLenum /* target */, | 65 cl_GLenum target, |
61 GLint /* miplevel */, | 66 cl_GLint miplevel, |
62 GLuint /* texture */, | 67 cl_GLuint texture, |
63 cl_int* /* errcode_ret */ | 68 cl_int* errcode_ret |
64 ); | 69 ); |
65 | 70 |
66 cl_mem clCreateFromGLTexture3D( | 71 cl_mem clCreateFromGLTexture3D( |
67 cl_context /* context */, | 72 cl_context context, |
68 cl_mem_flags /* flags */, | 73 cl_mem_flags flags, |
69 GLenum /* target */, | 74 cl_GLenum target, |
70 GLint /* miplevel */, | 75 cl_GLint miplevel, |
71 GLuint /* texture */, | 76 cl_GLuint texture, |
72 cl_int* /* errcode_ret */ | 77 cl_int* errcode_ret |
73 ); | 78 ); |
74 | 79 |
75 cl_mem clCreateFromGLRenderbuffer( | 80 cl_mem clCreateFromGLRenderbuffer( |
76 cl_context /* context */, | 81 cl_context context, |
77 cl_mem_flags /* flags */, | 82 cl_mem_flags flags, |
78 GLuint /* renderbuffer */, | 83 cl_GLuint renderbuffer, |
79 cl_int* /* errcode_ret */ | 84 cl_int* errcode_ret |
80 ); | 85 ); |
81 | 86 |
82 cl_int clGetGLObjectInfo( | 87 cl_int clGetGLObjectInfo( |
83 cl_mem /* memobj */, | 88 cl_mem memobj, |
84 cl_gl_object_type* /* gl_object_type */, | 89 cl_gl_object_type* gl_object_type, |
85 GLuint* /* gl_object_name */ | 90 cl_GLuint* gl_object_name |
86 ); | 91 ); |
87 | 92 |
88 cl_int clGetGLTextureInfo( | 93 cl_int clGetGLTextureInfo( |
89 cl_mem /* memobj */, | 94 cl_mem memobj, |
90 cl_gl_texture_info /* param_name */, | 95 cl_gl_texture_info param_name, |
91 size_t /* param_value_size */, | 96 size_t param_value_size, |
92 void* /* param_value */, | 97 void* param_value, |
93 size_t* /* param_value_size_ret */ | 98 size_t* param_value_size_ret |
94 ); | 99 ); |
95 | 100 |
96 cl_int clEnqueueAcquireGLObjects( | 101 cl_int clEnqueueAcquireGLObjects( |
97 cl_command_queue /* queue */, | 102 cl_command_queue queue, |
98 cl_uint /* num_objects */, | 103 cl_uint num_objects, |
99 const(cl_mem)* /* mem_objects */, | 104 const(cl_mem)* mem_objects, |
100 cl_uint /* num_events_in_wait_list */, | 105 cl_uint num_events_in_wait_list, |
101 const(cl_event)* /* event_wait_list */, | 106 const(cl_event)* event_wait_list, |
102 cl_event* /* event */ | 107 cl_event* event |
103 ); | 108 ); |
104 | 109 |
105 cl_int clEnqueueReleaseGLObjects( | 110 cl_int clEnqueueReleaseGLObjects( |
106 cl_command_queue /* queue */, | 111 cl_command_queue queue, |
107 cl_uint /* num_objects */, | 112 cl_uint num_objects, |
108 const(cl_mem)* /* mem_objects */, | 113 const(cl_mem)* mem_objects, |
109 cl_uint /* num_events_in_wait_list */, | 114 cl_uint num_events_in_wait_list, |
110 const(cl_event)* /* event_wait_list */, | 115 const(cl_event)* event_wait_list, |
111 cl_event* /* event */ | 116 cl_event* event |
112 ); | 117 ); |
118 | |
119 | |
120 // cl_khr_gl_sharing extension | |
121 | |
122 const cl_khr_gl_sharing = 1; | |
123 | |
124 typedef cl_uint cl_gl_context_info; | |
125 | |
126 enum | |
127 { | |
128 // Additional Error Codes | |
129 CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR = -1000, | |
130 | |
131 // cl_gl_context_info | |
132 CL_CURRENT_DEVICE_FOR_GL_CONTEXT_KHR = 0x2006, | |
133 CL_DEVICES_FOR_GL_CONTEXT_KHR = 0x2007, | |
134 | |
135 // Additional cl_context_properties | |
136 CL_GL_CONTEXT_KHR = 0x2008, | |
137 CL_EGL_DISPLAY_KHR = 0x2009, | |
138 CL_GLX_DISPLAY_KHR = 0x200A, | |
139 CL_WGL_HDC_KHR = 0x200B, | |
140 CL_CGL_SHAREGROUP_KHR = 0x200C, | |
141 } | |
142 | |
143 cl_int clGetGLContextInfoKHR( | |
144 const(cl_context_properties)* properties, | |
145 cl_gl_context_info param_name, | |
146 size_t param_value_size, | |
147 void* param_value, | |
148 size_t* param_value_size_ret | |
149 ); |