comparison opencl/c/cl_gl.d @ 0:3cea44337083

initial commit
author Trass3r
date Wed, 02 Dec 2009 17:40:59 +0100
parents
children 5b5ace425b37
comparison
equal deleted inserted replaced
-1:000000000000 0:3cea44337083
1 /**********************************************************************************
2 * Copyright (c) 2008-2009 The Khronos Group Inc.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and/or associated documentation files (the
6 * "Materials"), to deal in the Materials without restriction, including
7 * without limitation the rights to use, copy, modify, merge, publish,
8 * distribute, sublicense, and/or sell copies of the Materials, and to
9 * permit persons to whom the Materials are furnished to do so, subject to
10 * the following conditions:
11 *
12 * The above copyright notice and this permission notice shall be included
13 * in all copies or substantial portions of the Materials.
14 *
15 * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
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
21 * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
22 **********************************************************************************/
23
24 // $Revision: 8748 $ on $Date: 2009-08-27 04:24:36 -0700 (Thu, 27 Aug 2009) $
25
26 module opencl.c.cl_gl;
27
28 import opencl.c.platform;
29 import opencl.c.opencl;
30
31 extern(C):
32
33 alias cl_uint cl_gl_object_type;
34 alias cl_uint cl_gl_texture_info;
35 alias cl_uint cl_gl_platform_info;
36
37 enum
38 {
39 // cl_gl_object_type
40 CL_GL_OBJECT_BUFFER = 0x2000,
41 CL_GL_OBJECT_TEXTURE2D = 0x2001,
42 CL_GL_OBJECT_TEXTURE3D = 0x2002,
43 CL_GL_OBJECT_RENDERBUFFER = 0x2003,
44
45 // cl_gl_texture_info
46 CL_GL_TEXTURE_TARGET = 0x2004,
47 CL_GL_MIPMAP_LEVEL = 0x2005,
48 }
49
50 cl_mem clCreateFromGLBuffer(
51 cl_context /* context */,
52 cl_mem_flags /* flags */,
53 GLuint /* bufobj */,
54 int* /* errcode_ret */
55 );
56
57 cl_mem clCreateFromGLTexture2D(
58 cl_context /* context */,
59 cl_mem_flags /* flags */,
60 GLenum /* target */,
61 GLint /* miplevel */,
62 GLuint /* texture */,
63 cl_int* /* errcode_ret */
64 );
65
66 cl_mem clCreateFromGLTexture3D(
67 cl_context /* context */,
68 cl_mem_flags /* flags */,
69 GLenum /* target */,
70 GLint /* miplevel */,
71 GLuint /* texture */,
72 cl_int* /* errcode_ret */
73 );
74
75 cl_mem clCreateFromGLRenderbuffer(
76 cl_context /* context */,
77 cl_mem_flags /* flags */,
78 GLuint /* renderbuffer */,
79 cl_int* /* errcode_ret */
80 );
81
82 cl_int clGetGLObjectInfo(
83 cl_mem /* memobj */,
84 cl_gl_object_type* /* gl_object_type */,
85 GLuint* /* gl_object_name */
86 );
87
88 cl_int clGetGLTextureInfo(
89 cl_mem /* memobj */,
90 cl_gl_texture_info /* param_name */,
91 size_t /* param_value_size */,
92 void* /* param_value */,
93 size_t* /* param_value_size_ret */
94 );
95
96 cl_int clEnqueueAcquireGLObjects(
97 cl_command_queue /* queue */,
98 cl_uint /* num_objects */,
99 const(cl_mem)* /* mem_objects */,
100 cl_uint /* num_events_in_wait_list */,
101 const(cl_event)* /* event_wait_list */,
102 cl_event* /* event */
103 );
104
105 cl_int clEnqueueReleaseGLObjects(
106 cl_command_queue /* queue */,
107 cl_uint /* num_objects */,
108 const(cl_mem)* /* mem_objects */,
109 cl_uint /* num_events_in_wait_list */,
110 const(cl_event)* /* event_wait_list */,
111 cl_event* /* event */
112 );