1/*
2 * GStreamer
3 * Copyright (C) 2012 Matthew Waters <ystreet00@gmail.com>
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
14 *
15 * You should have received a copy of the GNU Library General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
19 */
20/*
21 * Cogl
22 *
23 * An object oriented GL/GLES Abstraction/Utility Layer
24 *
25 * Copyright (C) 2009, 2011 Intel Corporation.
26 *
27 * This library is free software; you can redistribute it and/or
28 * modify it under the terms of the GNU Lesser General Public
29 * License as published by the Free Software Foundation; either
30 * version 2 of the License, or (at your option) any later version.
31 *
32 * This library is distributed in the hope that it will be useful,
33 * but WITHOUT ANY WARRANTY; without even the implied warranty of
34 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
35 * Lesser General Public License for more details.
36 *
37 * You should have received a copy of the GNU Lesser General Public
38 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
39 */
40
41
42/* These are the core GL functions which we assume will always be
43 available */
44GST_GL_EXT_BEGIN (core,
45 GST_GL_API_OPENGL | GST_GL_API_OPENGL3 |
46 GST_GL_API_GLES1 | GST_GL_API_GLES2,
47 1, 0,
48 1, 0,
49 "\0",
50 "\0")
51GST_GL_EXT_FUNCTION (void, BindTexture,
52 (GLenum target, GLuint texture))
53GST_GL_EXT_FUNCTION (void, BlendFunc,
54 (GLenum sfactor, GLenum dfactor))
55GST_GL_EXT_FUNCTION (void, Clear,
56 (GLbitfield mask))
57GST_GL_EXT_FUNCTION (void, ClearColor,
58 (GLclampf red,
59 GLclampf green,
60 GLclampf blue,
61 GLclampf alpha))
62GST_GL_EXT_FUNCTION (void, ClearStencil,
63 (GLint s))
64GST_GL_EXT_FUNCTION (void, ColorMask,
65 (GLboolean red,
66 GLboolean green,
67 GLboolean blue,
68 GLboolean alpha))
69GST_GL_EXT_FUNCTION (void, CopyTexSubImage2D,
70 (GLenum target,
71 GLint level,
72 GLint xoffset,
73 GLint yoffset,
74 GLint x,
75 GLint y,
76 GLsizei width,
77 GLsizei height))
78GST_GL_EXT_FUNCTION (void, DeleteTextures,
79 (GLsizei n, const GLuint* textures))
80GST_GL_EXT_FUNCTION (void, DepthFunc,
81 (GLenum func))
82GST_GL_EXT_FUNCTION (void, DepthMask,
83 (GLboolean flag))
84GST_GL_EXT_FUNCTION (void, Disable,
85 (GLenum cap))
86GST_GL_EXT_FUNCTION (void, DrawArrays,
87 (GLenum mode, GLint first, GLsizei count))
88GST_GL_EXT_FUNCTION (void, DrawElements,
89 (GLenum mode,
90 GLsizei count,
91 GLenum type,
92 const GLvoid* indices))
93GST_GL_EXT_FUNCTION (void, Enable,
94 (GLenum cap))
95GST_GL_EXT_FUNCTION (void, Finish,
96 (void))
97GST_GL_EXT_FUNCTION (void, Flush,
98 (void))
99GST_GL_EXT_FUNCTION (void, FrontFace,
100 (GLenum mode))
101GST_GL_EXT_FUNCTION (void, CullFace,
102 (GLenum mode))
103GST_GL_EXT_FUNCTION (void, GenTextures,
104 (GLsizei n, GLuint* textures))
105GST_GL_EXT_FUNCTION (GLenum, GetError,
106 (void))
107GST_GL_EXT_FUNCTION (void, GetIntegerv,
108 (GLenum pname, GLint* params))
109GST_GL_EXT_FUNCTION (void, GetBooleanv,
110 (GLenum pname, GLboolean* params))
111GST_GL_EXT_FUNCTION (void, GetFloatv,
112 (GLenum pname, GLfloat* params))
113GST_GL_EXT_FUNCTION (const GLubyte*, GetString,
114 (GLenum name))
115GST_GL_EXT_FUNCTION (void, Hint,
116 (GLenum target, GLenum mode))
117GST_GL_EXT_FUNCTION (GLboolean, IsTexture,
118 (GLuint texture))
119GST_GL_EXT_FUNCTION (void, PixelStorei,
120 (GLenum pname, GLint param))
121GST_GL_EXT_FUNCTION (void, ReadPixels,
122 (GLint x,
123 GLint y,
124 GLsizei width,
125 GLsizei height,
126 GLenum format,
127 GLenum type,
128 GLvoid* pixels))
129GST_GL_EXT_FUNCTION (void, Scissor,
130 (GLint x, GLint y, GLsizei width, GLsizei height))
131GST_GL_EXT_FUNCTION (void, StencilFunc,
132 (GLenum func, GLint ref, GLuint mask))
133GST_GL_EXT_FUNCTION (void, StencilMask,
134 (GLuint mask))
135GST_GL_EXT_FUNCTION (void, StencilOp,
136 (GLenum fail, GLenum zfail, GLenum zpass))
137GST_GL_EXT_FUNCTION (void, TexImage2D,
138 (GLenum target,
139 GLint level,
140 GLint internalformat,
141 GLsizei width,
142 GLsizei height,
143 GLint border,
144 GLenum format,
145 GLenum type,
146 const GLvoid* pixels))
147GST_GL_EXT_FUNCTION (void, TexParameterfv,
148 (GLenum target, GLenum pname, const GLfloat* params))
149GST_GL_EXT_FUNCTION (void, TexParameteri,
150 (GLenum target, GLenum pname, GLint param))
151GST_GL_EXT_FUNCTION (void, TexParameteriv,
152 (GLenum target, GLenum pname, const GLint* params))
153GST_GL_EXT_FUNCTION (void, GetTexParameterfv,
154 (GLenum target, GLenum pname, GLfloat* params))
155GST_GL_EXT_FUNCTION (void, GetTexParameteriv,
156 (GLenum target, GLenum pname, GLint* params))
157GST_GL_EXT_FUNCTION (void, TexSubImage2D,
158 (GLenum target,
159 GLint level,
160 GLint xoffset,
161 GLint yoffset,
162 GLsizei width,
163 GLsizei height,
164 GLenum format,
165 GLenum type,
166 const GLvoid* pixels))
167GST_GL_EXT_FUNCTION (void, CopyTexImage2D,
168 (GLenum target,
169 GLint level,
170 GLenum internalformat,
171 GLint x,
172 GLint y,
173 GLsizei width,
174 GLsizei height,
175 GLint border))
176GST_GL_EXT_FUNCTION (void, Viewport,
177 (GLint x, GLint y, GLsizei width, GLsizei height))
178GST_GL_EXT_FUNCTION (GLboolean, IsEnabled, (GLenum cap))
179GST_GL_EXT_FUNCTION (void, LineWidth, (GLfloat width))
180GST_GL_EXT_FUNCTION (void, PolygonOffset, (GLfloat factor, GLfloat units))
181GST_GL_EXT_FUNCTION (void, TexParameterf,
182 (GLenum target,
183 GLenum pname,
184 GLfloat param))
185GST_GL_EXT_END ()
186
187GST_GL_EXT_BEGIN (texture_3d,
188 GST_GL_API_OPENGL | GST_GL_API_OPENGL3,
189 1, 2,
190 255, 255, /* not in either GLES */
191 "OES\0",
192 "texture_3D\0")
193GST_GL_EXT_FUNCTION (void, TexImage3D,
194 (GLenum target, GLint level,
195 GLint internalFormat,
196 GLsizei width, GLsizei height,
197 GLsizei depth, GLint border,
198 GLenum format, GLenum type,
199 const GLvoid *pixels))
200GST_GL_EXT_FUNCTION (void, TexSubImage3D,
201 (GLenum target, GLint level,
202 GLint xoffset, GLint yoffset,
203 GLint zoffset, GLsizei width,
204 GLsizei height, GLsizei depth,
205 GLenum format,
206 GLenum type, const GLvoid *pixels))
207GST_GL_EXT_END ()
208
209GST_GL_EXT_BEGIN (only_in_both_gles_and_gl_1_3,
210 GST_GL_API_OPENGL | GST_GL_API_OPENGL3 |
211 GST_GL_API_GLES1 | GST_GL_API_GLES2,
212 1, 3,
213 1, 0,
214 "\0",
215 "\0")
216GST_GL_EXT_FUNCTION (void, CompressedTexImage2D,
217 (GLenum target,
218 GLint level,
219 GLenum internalformat,
220 GLsizei width,
221 GLsizei height,
222 GLint border,
223 GLsizei imageSize,
224 const GLvoid* data))
225GST_GL_EXT_FUNCTION (void, CompressedTexSubImage2D,
226 (GLenum target,
227 GLint level,
228 GLint xoffset,
229 GLint yoffset,
230 GLsizei width,
231 GLsizei height,
232 GLenum format,
233 GLsizei imageSize,
234 const GLvoid* data))
235GST_GL_EXT_FUNCTION (void, SampleCoverage,
236 (GLclampf value, GLboolean invert))
237GST_GL_EXT_END ()
238
239GST_GL_EXT_BEGIN (only_in_both_gles_and_gl_1_5,
240 GST_GL_API_OPENGL | GST_GL_API_OPENGL3 |
241 GST_GL_API_GLES1 | GST_GL_API_GLES2,
242 1, 5,
243 1, 0,
244 "\0",
245 "\0")
246GST_GL_EXT_FUNCTION (void, GetBufferParameteriv,
247 (GLenum target, GLenum pname, GLint* params))
248GST_GL_EXT_END ()
249
250GST_GL_EXT_BEGIN (vbos,
251 GST_GL_API_OPENGL | GST_GL_API_OPENGL3 |
252 GST_GL_API_GLES1 | GST_GL_API_GLES2,
253 1, 5,
254 1, 0,
255 "ARB\0",
256 "vertex_buffer_object\0")
257GST_GL_EXT_FUNCTION (void, GenBuffers,
258 (GLsizei n,
259 GLuint *buffers))
260GST_GL_EXT_FUNCTION (void, BindBuffer,
261 (GLenum target,
262 GLuint buffer))
263GST_GL_EXT_FUNCTION (void, BufferData,
264 (GLenum target,
265 GLsizeiptr size,
266 const GLvoid *data,
267 GLenum usage))
268GST_GL_EXT_FUNCTION (void, BufferSubData,
269 (GLenum target,
270 GLintptr offset,
271 GLsizeiptr size,
272 const GLvoid *data))
273GST_GL_EXT_FUNCTION (void, DeleteBuffers,
274 (GLsizei n,
275 const GLuint *buffers))
276GST_GL_EXT_FUNCTION (GLboolean, IsBuffer,
277 (GLuint buffer))
278GST_GL_EXT_END ()
279
280/* Available in GL 1.3, the multitexture extension or GLES. These are
281 required */
282GST_GL_EXT_BEGIN (multitexture_part0,
283 GST_GL_API_OPENGL | GST_GL_API_OPENGL3 |
284 GST_GL_API_GLES1 | GST_GL_API_GLES2,
285 1, 3,
286 1, 0,
287 "ARB\0",
288 "multitexture\0")
289GST_GL_EXT_FUNCTION (void, ActiveTexture,
290 (GLenum texture))
291GST_GL_EXT_END ()
292
293
294 /* GLES doesn't support mapping buffers in core so this has to be a
295 separate check */
296GST_GL_EXT_BEGIN (map_vbos,
297 GST_GL_API_OPENGL | GST_GL_API_OPENGL3,
298 1, 5,
299 255, 255, /* not in GLES core */
300 "ARB\0OES\0",
301 "vertex_buffer_object\0mapbuffer\0")
302GST_GL_EXT_FUNCTION (void *, MapBuffer,
303 (GLenum target,
304 GLenum access))
305GST_GL_EXT_END ()
306
307GST_GL_EXT_BEGIN (unmap_buffer,
308 GST_GL_API_OPENGL | GST_GL_API_OPENGL3 | GST_GL_API_GLES2,
309 1, 5,
310 3, 0,
311 "ARB\0OES\0",
312 "vertex_buffer_object\0mapbuffer\0")
313GST_GL_EXT_FUNCTION (GLboolean, UnmapBuffer,
314 (GLenum target))
315GST_GL_EXT_END ()
316
317GST_GL_EXT_BEGIN (gl3,
318 GST_GL_API_OPENGL | GST_GL_API_OPENGL3 |
319 GST_GL_API_GLES2,
320 3, 0,
321 3, 0,
322 "\0",
323 "\0")
324GST_GL_EXT_FUNCTION (const GLubyte*, GetStringi,
325 (GLenum name, GLint index))
326GST_GL_EXT_FUNCTION (void *, MapBufferRange,
327 (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access))
328GST_GL_EXT_END ()
329

source code of include/gstreamer-1.0/gst/gl/glprototypes/base.h