4 * An object oriented GL/GLES Abstraction/Utility Layer
6 * Copyright (C) 2009, 2011 Intel Corporation.
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
24 /* This is included multiple times with different definitions for
25 * these macros. The macros are given the following arguments:
29 * @name: a unique symbol name for this feature
31 * @min_gl_major: the major part of the minimum GL version where these
32 * functions are available in core, or 255 if it isn't available in
34 * @min_gl_minor: the minor part of the minimum GL version where these
35 * functions are available in core, or 255 if it isn't available in
38 * @gles_availability: flags to specify which versions of GLES the
39 * functions are available in. Should be a combination of
40 * COGL_EXT_IN_GLES and COGL_EXT_IN_GLES2.
42 * @extension_suffixes: A zero-separated list of suffixes in a
43 * string. These are appended to the extension name to get a complete
44 * extension name to try. The suffix is also appended to all of the
45 * function names. The suffix can optionally include a ':' to specify
46 * an alternate suffix for the function names.
48 * @extension_names: A list of extension names to try. If any of these
49 * extensions match then it will be used.
52 COGL_EXT_BEGIN (offscreen,
55 /* for some reason the ARB version of this
56 extension doesn't have an ARB suffix for the
59 "framebuffer_object\0")
60 COGL_EXT_FUNCTION (void, glGenRenderbuffers,
62 GLuint *renderbuffers))
63 COGL_EXT_FUNCTION (void, glDeleteRenderbuffers,
65 const GLuint *renderbuffers))
66 COGL_EXT_FUNCTION (void, glBindRenderbuffer,
69 COGL_EXT_FUNCTION (void, glRenderbufferStorage,
71 GLenum internalformat,
74 COGL_EXT_FUNCTION (void, glGenFramebuffers,
76 GLuint *framebuffers))
77 COGL_EXT_FUNCTION (void, glBindFramebuffer,
80 COGL_EXT_FUNCTION (void, glFramebufferTexture2D,
86 COGL_EXT_FUNCTION (void, glFramebufferRenderbuffer,
89 GLenum renderbuffertarget,
91 COGL_EXT_FUNCTION (GLboolean, glIsRenderbuffer,
92 (GLuint renderbuffer))
93 COGL_EXT_FUNCTION (GLenum, glCheckFramebufferStatus,
95 COGL_EXT_FUNCTION (void, glDeleteFramebuffers,
97 const GLuint *framebuffers))
98 COGL_EXT_FUNCTION (void, glGenerateMipmap,
100 COGL_EXT_FUNCTION (void, glGetFramebufferAttachmentParameteriv,
105 COGL_EXT_FUNCTION (void, glGetRenderbufferParameteriv,
109 COGL_EXT_FUNCTION (GLboolean, glIsFramebuffer,
110 (GLuint framebuffer))
113 COGL_EXT_BEGIN (blending, 1, 2,
117 COGL_EXT_FUNCTION (void, glBlendEquation,
119 COGL_EXT_FUNCTION (void, glBlendColor,
126 /* Optional, declared in 1.4 or GLES 1.2 */
127 COGL_EXT_BEGIN (blend_func_separate, 1, 4,
130 "blend_func_separate\0")
131 COGL_EXT_FUNCTION (void, glBlendFuncSeparate,
138 /* Optional, declared in 2.0 */
139 COGL_EXT_BEGIN (blend_equation_separate, 2, 0,
142 "blend_equation_separate\0")
143 COGL_EXT_FUNCTION (void, glBlendEquationSeparate,
148 COGL_EXT_BEGIN (gles2_only_api,
153 COGL_EXT_FUNCTION (void, glReleaseShaderCompiler, (void))
154 COGL_EXT_FUNCTION (void, glGetShaderPrecisionFormat,
156 GLenum precisiontype,
159 COGL_EXT_FUNCTION (void, glShaderBinary,
161 const GLuint* shaders,
163 const GLvoid* binary,
167 /* GL and GLES 2.0 apis */
168 COGL_EXT_BEGIN (two_point_zero_api,
173 COGL_EXT_FUNCTION (void, glStencilFuncSeparate,
174 (GLenum face, GLenum func, GLint ref, GLuint mask))
175 COGL_EXT_FUNCTION (void, glStencilMaskSeparate,
176 (GLenum face, GLuint mask))
177 COGL_EXT_FUNCTION (void, glStencilOpSeparate,
178 (GLenum face, GLenum fail, GLenum zfail, GLenum zpass))