"Initial commit to Gerrit"
[profile/ivi/cogl.git] / cogl / gl-prototypes / cogl-fixed-functions.h
1 /*
2  * Cogl
3  *
4  * An object oriented GL/GLES Abstraction/Utility Layer
5  *
6  * Copyright (C) 2009, 2011 Intel Corporation.
7  *
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.
12  *
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.
17  *
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/>.
20  *
21  *
22  */
23
24 /* This is included multiple times with different definitions for
25  * these macros. The macros are given the following arguments:
26  *
27  * COGL_EXT_BEGIN:
28  *
29  * @name: a unique symbol name for this feature
30  *
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
33  * any version.
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
36  * any version.
37  *
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.
41  *
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.
47  *
48  * @extension_names: A list of extension names to try. If any of these
49  * extensions match then it will be used.
50  */
51
52 /* These are the core GL functions which are available when the API
53    supports fixed-function (ie, GL and GLES1.1) */
54 COGL_EXT_BEGIN (fixed_function_core,
55                 0, 0,
56                 COGL_EXT_IN_GLES,
57                 "\0",
58                 "\0")
59 COGL_EXT_FUNCTION (void, glAlphaFunc,
60                    (GLenum func, GLclampf ref))
61 COGL_EXT_FUNCTION (void, glFogf,
62                    (GLenum pname, GLfloat param))
63 COGL_EXT_FUNCTION (void, glFogfv,
64                    (GLenum pname, const GLfloat *params))
65 COGL_EXT_FUNCTION (void, glLoadMatrixf,
66                    (const GLfloat *m))
67 COGL_EXT_FUNCTION (void, glMaterialfv,
68                    (GLenum face, GLenum pname, const GLfloat *params))
69 COGL_EXT_FUNCTION (void, glPointSize,
70                    (GLfloat size))
71 COGL_EXT_FUNCTION (void, glTexEnvfv,
72                    (GLenum target, GLenum pname, const GLfloat *params))
73 COGL_EXT_FUNCTION (void, glColor4ub,
74                    (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha))
75 COGL_EXT_FUNCTION (void, glColorPointer,
76                    (GLint size,
77                     GLenum type,
78                     GLsizei stride,
79                     const GLvoid *pointer))
80 COGL_EXT_FUNCTION (void, glDisableClientState,
81                    (GLenum array))
82 COGL_EXT_FUNCTION (void, glEnableClientState,
83                    (GLenum array))
84 COGL_EXT_FUNCTION (void, glLoadIdentity,
85                    (void))
86 COGL_EXT_FUNCTION (void, glMatrixMode,
87                    (GLenum mode))
88 COGL_EXT_FUNCTION (void, glNormalPointer,
89                    (GLenum type, GLsizei stride, const GLvoid *pointer))
90 COGL_EXT_FUNCTION (void, glTexCoordPointer,
91                    (GLint size,
92                     GLenum type,
93                     GLsizei stride,
94                     const GLvoid *pointer))
95 COGL_EXT_FUNCTION (void, glTexEnvi,
96                    (GLenum target,
97                     GLenum pname,
98                     GLint param))
99 COGL_EXT_FUNCTION (void, glVertexPointer,
100                    (GLint size,
101                     GLenum type,
102                     GLsizei stride,
103                     const GLvoid *pointer))
104 COGL_EXT_END ()