Update copyright year in license headers.
[profile/ivi/qtbase.git] / src / opengl / qglfunctions.h
1 /****************************************************************************
2 **
3 ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
4 ** All rights reserved.
5 ** Contact: Nokia Corporation (qt-info@nokia.com)
6 **
7 ** This file is part of the QtOpenGL module of the Qt Toolkit.
8 **
9 ** $QT_BEGIN_LICENSE:LGPL$
10 ** GNU Lesser General Public License Usage
11 ** This file may be used under the terms of the GNU Lesser General Public
12 ** License version 2.1 as published by the Free Software Foundation and
13 ** appearing in the file LICENSE.LGPL included in the packaging of this
14 ** file. Please review the following information to ensure the GNU Lesser
15 ** General Public License version 2.1 requirements will be met:
16 ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
17 **
18 ** In addition, as a special exception, Nokia gives you certain additional
19 ** rights. These rights are described in the Nokia Qt LGPL Exception
20 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
21 **
22 ** GNU General Public License Usage
23 ** Alternatively, this file may be used under the terms of the GNU General
24 ** Public License version 3.0 as published by the Free Software Foundation
25 ** and appearing in the file LICENSE.GPL included in the packaging of this
26 ** file. Please review the following information to ensure the GNU General
27 ** Public License version 3.0 requirements will be met:
28 ** http://www.gnu.org/copyleft/gpl.html.
29 **
30 ** Other Usage
31 ** Alternatively, this file may be used in accordance with the terms and
32 ** conditions contained in a signed written agreement between you and Nokia.
33 **
34 **
35 **
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41
42 #ifndef QGLFUNCTIONS_H
43 #define QGLFUNCTIONS_H
44
45 #ifdef __GLEW_H__
46 #warning qglfunctions.h is not compatible with GLEW, GLEW defines will be undefined
47 #warning To use GLEW with Qt, do not include <QtOpenGL> or <QGLFunctions> after glew.h
48 #endif
49
50 #include <QtOpenGL/qgl.h>
51
52 QT_BEGIN_HEADER
53
54 QT_BEGIN_NAMESPACE
55
56 QT_MODULE(OpenGL)
57
58 // Types that aren't defined in all system's gl.h files.
59 typedef ptrdiff_t qgl_GLintptr;
60 typedef ptrdiff_t qgl_GLsizeiptr;
61
62
63 # ifndef QGLF_APIENTRYP
64 #   ifdef QGLF_APIENTRY
65 #     define QGLF_APIENTRYP QGLF_APIENTRY *
66 #   else
67 #     define QGLF_APIENTRY
68 #     define QGLF_APIENTRYP *
69 #   endif
70 # endif
71
72 struct QGLFunctionsPrivate;
73
74 // Undefine any macros from GLEW, qglextensions_p.h, etc that
75 // may interfere with the definition of QGLFunctions.
76 #undef glActiveTexture
77 #undef glAttachShader
78 #undef glBindAttribLocation
79 #undef glBindBuffer
80 #undef glBindFramebuffer
81 #undef glBindRenderbuffer
82 #undef glBlendColor
83 #undef glBlendEquation
84 #undef glBlendEquationSeparate
85 #undef glBlendFuncSeparate
86 #undef glBufferData
87 #undef glBufferSubData
88 #undef glCheckFramebufferStatus
89 #undef glClearDepthf
90 #undef glCompileShader
91 #undef glCompressedTexImage2D
92 #undef glCompressedTexSubImage2D
93 #undef glCreateProgram
94 #undef glCreateShader
95 #undef glDeleteBuffers
96 #undef glDeleteFramebuffers
97 #undef glDeleteProgram
98 #undef glDeleteRenderbuffers
99 #undef glDeleteShader
100 #undef glDepthRangef
101 #undef glDetachShader
102 #undef glDisableVertexAttribArray
103 #undef glEnableVertexAttribArray
104 #undef glFramebufferRenderbuffer
105 #undef glFramebufferTexture2D
106 #undef glGenBuffers
107 #undef glGenerateMipmap
108 #undef glGenFramebuffers
109 #undef glGenRenderbuffers
110 #undef glGetActiveAttrib
111 #undef glGetActiveUniform
112 #undef glGetAttachedShaders
113 #undef glGetAttribLocation
114 #undef glGetBufferParameteriv
115 #undef glGetFramebufferAttachmentParameteriv
116 #undef glGetProgramiv
117 #undef glGetProgramInfoLog
118 #undef glGetRenderbufferParameteriv
119 #undef glGetShaderiv
120 #undef glGetShaderInfoLog
121 #undef glGetShaderPrecisionFormat
122 #undef glGetShaderSource
123 #undef glGetUniformfv
124 #undef glGetUniformiv
125 #undef glGetUniformLocation
126 #undef glGetVertexAttribfv
127 #undef glGetVertexAttribiv
128 #undef glGetVertexAttribPointerv
129 #undef glIsBuffer
130 #undef glIsFramebuffer
131 #undef glIsProgram
132 #undef glIsRenderbuffer
133 #undef glIsShader
134 #undef glLinkProgram
135 #undef glReleaseShaderCompiler
136 #undef glRenderbufferStorage
137 #undef glSampleCoverage
138 #undef glShaderBinary
139 #undef glShaderSource
140 #undef glStencilFuncSeparate
141 #undef glStencilMaskSeparate
142 #undef glStencilOpSeparate
143 #undef glUniform1f
144 #undef glUniform1fv
145 #undef glUniform1i
146 #undef glUniform1iv
147 #undef glUniform2f
148 #undef glUniform2fv
149 #undef glUniform2i
150 #undef glUniform2iv
151 #undef glUniform3f
152 #undef glUniform3fv
153 #undef glUniform3i
154 #undef glUniform3iv
155 #undef glUniform4f
156 #undef glUniform4fv
157 #undef glUniform4i
158 #undef glUniform4iv
159 #undef glUniformMatrix2fv
160 #undef glUniformMatrix3fv
161 #undef glUniformMatrix4fv
162 #undef glUseProgram
163 #undef glValidateProgram
164 #undef glVertexAttrib1f
165 #undef glVertexAttrib1fv
166 #undef glVertexAttrib2f
167 #undef glVertexAttrib2fv
168 #undef glVertexAttrib3f
169 #undef glVertexAttrib3fv
170 #undef glVertexAttrib4f
171 #undef glVertexAttrib4fv
172 #undef glVertexAttribPointer
173
174 class Q_OPENGL_EXPORT QGLFunctions
175 {
176 public:
177     QGLFunctions();
178     explicit QGLFunctions(const QGLContext *context);
179     ~QGLFunctions() {}
180
181     enum OpenGLFeature
182     {
183         Multitexture          = 0x0001,
184         Shaders               = 0x0002,
185         Buffers               = 0x0004,
186         Framebuffers          = 0x0008,
187         BlendColor            = 0x0010,
188         BlendEquation         = 0x0020,
189         BlendEquationSeparate = 0x0040,
190         BlendFuncSeparate     = 0x0080,
191         BlendSubtract         = 0x0100,
192         CompressedTextures    = 0x0200,
193         Multisample           = 0x0400,
194         StencilSeparate       = 0x0800,
195         NPOTTextures          = 0x1000
196     };
197     Q_DECLARE_FLAGS(OpenGLFeatures, OpenGLFeature)
198
199     QGLFunctions::OpenGLFeatures openGLFeatures() const;
200     bool hasOpenGLFeature(QGLFunctions::OpenGLFeature feature) const;
201
202     void initializeGLFunctions(const QGLContext *context = 0);
203
204     void glActiveTexture(GLenum texture);
205     void glAttachShader(GLuint program, GLuint shader);
206     void glBindAttribLocation(GLuint program, GLuint index, const char* name);
207     void glBindBuffer(GLenum target, GLuint buffer);
208     void glBindFramebuffer(GLenum target, GLuint framebuffer);
209     void glBindRenderbuffer(GLenum target, GLuint renderbuffer);
210     void glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
211     void glBlendEquation(GLenum mode);
212     void glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha);
213     void glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
214     void glBufferData(GLenum target, qgl_GLsizeiptr size, const void* data, GLenum usage);
215     void glBufferSubData(GLenum target, qgl_GLintptr offset, qgl_GLsizeiptr size, const void* data);
216     GLenum glCheckFramebufferStatus(GLenum target);
217     void glClearDepthf(GLclampf depth);
218     void glCompileShader(GLuint shader);
219     void glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data);
220     void glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data);
221     GLuint glCreateProgram();
222     GLuint glCreateShader(GLenum type);
223     void glDeleteBuffers(GLsizei n, const GLuint* buffers);
224     void glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers);
225     void glDeleteProgram(GLuint program);
226     void glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers);
227     void glDeleteShader(GLuint shader);
228     void glDepthRangef(GLclampf zNear, GLclampf zFar);
229     void glDetachShader(GLuint program, GLuint shader);
230     void glDisableVertexAttribArray(GLuint index);
231     void glEnableVertexAttribArray(GLuint index);
232     void glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
233     void glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
234     void glGenBuffers(GLsizei n, GLuint* buffers);
235     void glGenerateMipmap(GLenum target);
236     void glGenFramebuffers(GLsizei n, GLuint* framebuffers);
237     void glGenRenderbuffers(GLsizei n, GLuint* renderbuffers);
238     void glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name);
239     void glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name);
240     void glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders);
241     int glGetAttribLocation(GLuint program, const char* name);
242     void glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params);
243     void glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params);
244     void glGetProgramiv(GLuint program, GLenum pname, GLint* params);
245     void glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, char* infolog);
246     void glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params);
247     void glGetShaderiv(GLuint shader, GLenum pname, GLint* params);
248     void glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog);
249     void glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
250     void glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, char* source);
251     void glGetUniformfv(GLuint program, GLint location, GLfloat* params);
252     void glGetUniformiv(GLuint program, GLint location, GLint* params);
253     int glGetUniformLocation(GLuint program, const char* name);
254     void glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params);
255     void glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params);
256     void glGetVertexAttribPointerv(GLuint index, GLenum pname, void** pointer);
257     GLboolean glIsBuffer(GLuint buffer);
258     GLboolean glIsFramebuffer(GLuint framebuffer);
259     GLboolean glIsProgram(GLuint program);
260     GLboolean glIsRenderbuffer(GLuint renderbuffer);
261     GLboolean glIsShader(GLuint shader);
262     void glLinkProgram(GLuint program);
263     void glReleaseShaderCompiler();
264     void glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
265     void glSampleCoverage(GLclampf value, GLboolean invert);
266     void glShaderBinary(GLint n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLint length);
267     void glShaderSource(GLuint shader, GLsizei count, const char** string, const GLint* length);
268     void glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask);
269     void glStencilMaskSeparate(GLenum face, GLuint mask);
270     void glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
271     void glUniform1f(GLint location, GLfloat x);
272     void glUniform1fv(GLint location, GLsizei count, const GLfloat* v);
273     void glUniform1i(GLint location, GLint x);
274     void glUniform1iv(GLint location, GLsizei count, const GLint* v);
275     void glUniform2f(GLint location, GLfloat x, GLfloat y);
276     void glUniform2fv(GLint location, GLsizei count, const GLfloat* v);
277     void glUniform2i(GLint location, GLint x, GLint y);
278     void glUniform2iv(GLint location, GLsizei count, const GLint* v);
279     void glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z);
280     void glUniform3fv(GLint location, GLsizei count, const GLfloat* v);
281     void glUniform3i(GLint location, GLint x, GLint y, GLint z);
282     void glUniform3iv(GLint location, GLsizei count, const GLint* v);
283     void glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
284     void glUniform4fv(GLint location, GLsizei count, const GLfloat* v);
285     void glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w);
286     void glUniform4iv(GLint location, GLsizei count, const GLint* v);
287     void glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
288     void glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
289     void glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
290     void glUseProgram(GLuint program);
291     void glValidateProgram(GLuint program);
292     void glVertexAttrib1f(GLuint indx, GLfloat x);
293     void glVertexAttrib1fv(GLuint indx, const GLfloat* values);
294     void glVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y);
295     void glVertexAttrib2fv(GLuint indx, const GLfloat* values);
296     void glVertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z);
297     void glVertexAttrib3fv(GLuint indx, const GLfloat* values);
298     void glVertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
299     void glVertexAttrib4fv(GLuint indx, const GLfloat* values);
300     void glVertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr);
301
302 private:
303     QGLFunctionsPrivate *d_ptr;
304     static bool isInitialized(const QGLFunctionsPrivate *d) { return d != 0; }
305 };
306
307 Q_DECLARE_OPERATORS_FOR_FLAGS(QGLFunctions::OpenGLFeatures)
308
309 struct QGLFunctionsPrivate
310 {
311     QGLFunctionsPrivate(const QGLContext *context = 0);
312
313 #ifndef QT_OPENGL_ES_2
314     void (QGLF_APIENTRYP activeTexture)(GLenum texture);
315     void (QGLF_APIENTRYP attachShader)(GLuint program, GLuint shader);
316     void (QGLF_APIENTRYP bindAttribLocation)(GLuint program, GLuint index, const char* name);
317     void (QGLF_APIENTRYP bindBuffer)(GLenum target, GLuint buffer);
318     void (QGLF_APIENTRYP bindFramebuffer)(GLenum target, GLuint framebuffer);
319     void (QGLF_APIENTRYP bindRenderbuffer)(GLenum target, GLuint renderbuffer);
320     void (QGLF_APIENTRYP blendColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
321     void (QGLF_APIENTRYP blendEquation)(GLenum mode);
322     void (QGLF_APIENTRYP blendEquationSeparate)(GLenum modeRGB, GLenum modeAlpha);
323     void (QGLF_APIENTRYP blendFuncSeparate)(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
324     void (QGLF_APIENTRYP bufferData)(GLenum target, qgl_GLsizeiptr size, const void* data, GLenum usage);
325     void (QGLF_APIENTRYP bufferSubData)(GLenum target, qgl_GLintptr offset, qgl_GLsizeiptr size, const void* data);
326     GLenum (QGLF_APIENTRYP checkFramebufferStatus)(GLenum target);
327     void (QGLF_APIENTRYP compileShader)(GLuint shader);
328     void (QGLF_APIENTRYP compressedTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data);
329     void (QGLF_APIENTRYP compressedTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data);
330     GLuint (QGLF_APIENTRYP createProgram)();
331     GLuint (QGLF_APIENTRYP createShader)(GLenum type);
332     void (QGLF_APIENTRYP deleteBuffers)(GLsizei n, const GLuint* buffers);
333     void (QGLF_APIENTRYP deleteFramebuffers)(GLsizei n, const GLuint* framebuffers);
334     void (QGLF_APIENTRYP deleteProgram)(GLuint program);
335     void (QGLF_APIENTRYP deleteRenderbuffers)(GLsizei n, const GLuint* renderbuffers);
336     void (QGLF_APIENTRYP deleteShader)(GLuint shader);
337     void (QGLF_APIENTRYP detachShader)(GLuint program, GLuint shader);
338     void (QGLF_APIENTRYP disableVertexAttribArray)(GLuint index);
339     void (QGLF_APIENTRYP enableVertexAttribArray)(GLuint index);
340     void (QGLF_APIENTRYP framebufferRenderbuffer)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
341     void (QGLF_APIENTRYP framebufferTexture2D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
342     void (QGLF_APIENTRYP genBuffers)(GLsizei n, GLuint* buffers);
343     void (QGLF_APIENTRYP generateMipmap)(GLenum target);
344     void (QGLF_APIENTRYP genFramebuffers)(GLsizei n, GLuint* framebuffers);
345     void (QGLF_APIENTRYP genRenderbuffers)(GLsizei n, GLuint* renderbuffers);
346     void (QGLF_APIENTRYP getActiveAttrib)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name);
347     void (QGLF_APIENTRYP getActiveUniform)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name);
348     void (QGLF_APIENTRYP getAttachedShaders)(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders);
349     int (QGLF_APIENTRYP getAttribLocation)(GLuint program, const char* name);
350     void (QGLF_APIENTRYP getBufferParameteriv)(GLenum target, GLenum pname, GLint* params);
351     void (QGLF_APIENTRYP getFramebufferAttachmentParameteriv)(GLenum target, GLenum attachment, GLenum pname, GLint* params);
352     void (QGLF_APIENTRYP getProgramiv)(GLuint program, GLenum pname, GLint* params);
353     void (QGLF_APIENTRYP getProgramInfoLog)(GLuint program, GLsizei bufsize, GLsizei* length, char* infolog);
354     void (QGLF_APIENTRYP getRenderbufferParameteriv)(GLenum target, GLenum pname, GLint* params);
355     void (QGLF_APIENTRYP getShaderiv)(GLuint shader, GLenum pname, GLint* params);
356     void (QGLF_APIENTRYP getShaderInfoLog)(GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog);
357     void (QGLF_APIENTRYP getShaderPrecisionFormat)(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
358     void (QGLF_APIENTRYP getShaderSource)(GLuint shader, GLsizei bufsize, GLsizei* length, char* source);
359     void (QGLF_APIENTRYP getUniformfv)(GLuint program, GLint location, GLfloat* params);
360     void (QGLF_APIENTRYP getUniformiv)(GLuint program, GLint location, GLint* params);
361     int (QGLF_APIENTRYP getUniformLocation)(GLuint program, const char* name);
362     void (QGLF_APIENTRYP getVertexAttribfv)(GLuint index, GLenum pname, GLfloat* params);
363     void (QGLF_APIENTRYP getVertexAttribiv)(GLuint index, GLenum pname, GLint* params);
364     void (QGLF_APIENTRYP getVertexAttribPointerv)(GLuint index, GLenum pname, void** pointer);
365     GLboolean (QGLF_APIENTRYP isBuffer)(GLuint buffer);
366     GLboolean (QGLF_APIENTRYP isFramebuffer)(GLuint framebuffer);
367     GLboolean (QGLF_APIENTRYP isProgram)(GLuint program);
368     GLboolean (QGLF_APIENTRYP isRenderbuffer)(GLuint renderbuffer);
369     GLboolean (QGLF_APIENTRYP isShader)(GLuint shader);
370     void (QGLF_APIENTRYP linkProgram)(GLuint program);
371     void (QGLF_APIENTRYP releaseShaderCompiler)();
372     void (QGLF_APIENTRYP renderbufferStorage)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
373     void (QGLF_APIENTRYP sampleCoverage)(GLclampf value, GLboolean invert);
374     void (QGLF_APIENTRYP shaderBinary)(GLint n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLint length);
375     void (QGLF_APIENTRYP shaderSource)(GLuint shader, GLsizei count, const char** string, const GLint* length);
376     void (QGLF_APIENTRYP stencilFuncSeparate)(GLenum face, GLenum func, GLint ref, GLuint mask);
377     void (QGLF_APIENTRYP stencilMaskSeparate)(GLenum face, GLuint mask);
378     void (QGLF_APIENTRYP stencilOpSeparate)(GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
379     void (QGLF_APIENTRYP uniform1f)(GLint location, GLfloat x);
380     void (QGLF_APIENTRYP uniform1fv)(GLint location, GLsizei count, const GLfloat* v);
381     void (QGLF_APIENTRYP uniform1i)(GLint location, GLint x);
382     void (QGLF_APIENTRYP uniform1iv)(GLint location, GLsizei count, const GLint* v);
383     void (QGLF_APIENTRYP uniform2f)(GLint location, GLfloat x, GLfloat y);
384     void (QGLF_APIENTRYP uniform2fv)(GLint location, GLsizei count, const GLfloat* v);
385     void (QGLF_APIENTRYP uniform2i)(GLint location, GLint x, GLint y);
386     void (QGLF_APIENTRYP uniform2iv)(GLint location, GLsizei count, const GLint* v);
387     void (QGLF_APIENTRYP uniform3f)(GLint location, GLfloat x, GLfloat y, GLfloat z);
388     void (QGLF_APIENTRYP uniform3fv)(GLint location, GLsizei count, const GLfloat* v);
389     void (QGLF_APIENTRYP uniform3i)(GLint location, GLint x, GLint y, GLint z);
390     void (QGLF_APIENTRYP uniform3iv)(GLint location, GLsizei count, const GLint* v);
391     void (QGLF_APIENTRYP uniform4f)(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
392     void (QGLF_APIENTRYP uniform4fv)(GLint location, GLsizei count, const GLfloat* v);
393     void (QGLF_APIENTRYP uniform4i)(GLint location, GLint x, GLint y, GLint z, GLint w);
394     void (QGLF_APIENTRYP uniform4iv)(GLint location, GLsizei count, const GLint* v);
395     void (QGLF_APIENTRYP uniformMatrix2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
396     void (QGLF_APIENTRYP uniformMatrix3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
397     void (QGLF_APIENTRYP uniformMatrix4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
398     void (QGLF_APIENTRYP useProgram)(GLuint program);
399     void (QGLF_APIENTRYP validateProgram)(GLuint program);
400     void (QGLF_APIENTRYP vertexAttrib1f)(GLuint indx, GLfloat x);
401     void (QGLF_APIENTRYP vertexAttrib1fv)(GLuint indx, const GLfloat* values);
402     void (QGLF_APIENTRYP vertexAttrib2f)(GLuint indx, GLfloat x, GLfloat y);
403     void (QGLF_APIENTRYP vertexAttrib2fv)(GLuint indx, const GLfloat* values);
404     void (QGLF_APIENTRYP vertexAttrib3f)(GLuint indx, GLfloat x, GLfloat y, GLfloat z);
405     void (QGLF_APIENTRYP vertexAttrib3fv)(GLuint indx, const GLfloat* values);
406     void (QGLF_APIENTRYP vertexAttrib4f)(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
407     void (QGLF_APIENTRYP vertexAttrib4fv)(GLuint indx, const GLfloat* values);
408     void (QGLF_APIENTRYP vertexAttribPointer)(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr);
409 #endif
410 };
411
412 inline void QGLFunctions::glActiveTexture(GLenum texture)
413 {
414 #if defined(QT_OPENGL_ES_2)
415     ::glActiveTexture(texture);
416 #else
417     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
418     d_ptr->activeTexture(texture);
419 #endif
420 }
421
422 inline void QGLFunctions::glAttachShader(GLuint program, GLuint shader)
423 {
424 #if defined(QT_OPENGL_ES_2)
425     ::glAttachShader(program, shader);
426 #else
427     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
428     d_ptr->attachShader(program, shader);
429 #endif
430 }
431
432 inline void QGLFunctions::glBindAttribLocation(GLuint program, GLuint index, const char* name)
433 {
434 #if defined(QT_OPENGL_ES_2)
435     ::glBindAttribLocation(program, index, name);
436 #else
437     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
438     d_ptr->bindAttribLocation(program, index, name);
439 #endif
440 }
441
442 inline void QGLFunctions::glBindBuffer(GLenum target, GLuint buffer)
443 {
444 #if defined(QT_OPENGL_ES_2)
445     ::glBindBuffer(target, buffer);
446 #else
447     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
448     d_ptr->bindBuffer(target, buffer);
449 #endif
450 }
451
452 inline void QGLFunctions::glBindFramebuffer(GLenum target, GLuint framebuffer)
453 {
454 #if defined(QT_OPENGL_ES_2)
455     ::glBindFramebuffer(target, framebuffer);
456 #else
457     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
458     d_ptr->bindFramebuffer(target, framebuffer);
459 #endif
460 }
461
462 inline void QGLFunctions::glBindRenderbuffer(GLenum target, GLuint renderbuffer)
463 {
464 #if defined(QT_OPENGL_ES_2)
465     ::glBindRenderbuffer(target, renderbuffer);
466 #else
467     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
468     d_ptr->bindRenderbuffer(target, renderbuffer);
469 #endif
470 }
471
472 inline void QGLFunctions::glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
473 {
474 #if defined(QT_OPENGL_ES_2)
475     ::glBlendColor(red, green, blue, alpha);
476 #else
477     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
478     d_ptr->blendColor(red, green, blue, alpha);
479 #endif
480 }
481
482 inline void QGLFunctions::glBlendEquation(GLenum mode)
483 {
484 #if defined(QT_OPENGL_ES_2)
485     ::glBlendEquation(mode);
486 #else
487     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
488     d_ptr->blendEquation(mode);
489 #endif
490 }
491
492 inline void QGLFunctions::glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha)
493 {
494 #if defined(QT_OPENGL_ES_2)
495     ::glBlendEquationSeparate(modeRGB, modeAlpha);
496 #else
497     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
498     d_ptr->blendEquationSeparate(modeRGB, modeAlpha);
499 #endif
500 }
501
502 inline void QGLFunctions::glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
503 {
504 #if defined(QT_OPENGL_ES_2)
505     ::glBlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha);
506 #else
507     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
508     d_ptr->blendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha);
509 #endif
510 }
511
512 inline void QGLFunctions::glBufferData(GLenum target, qgl_GLsizeiptr size, const void* data, GLenum usage)
513 {
514 #if defined(QT_OPENGL_ES_2)
515     ::glBufferData(target, size, data, usage);
516 #else
517     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
518     d_ptr->bufferData(target, size, data, usage);
519 #endif
520 }
521
522 inline void QGLFunctions::glBufferSubData(GLenum target, qgl_GLintptr offset, qgl_GLsizeiptr size, const void* data)
523 {
524 #if defined(QT_OPENGL_ES_2)
525     ::glBufferSubData(target, offset, size, data);
526 #else
527     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
528     d_ptr->bufferSubData(target, offset, size, data);
529 #endif
530 }
531
532 inline GLenum QGLFunctions::glCheckFramebufferStatus(GLenum target)
533 {
534 #if defined(QT_OPENGL_ES_2)
535     return ::glCheckFramebufferStatus(target);
536 #else
537     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
538     return d_ptr->checkFramebufferStatus(target);
539 #endif
540 }
541
542 inline void QGLFunctions::glClearDepthf(GLclampf depth)
543 {
544 #ifndef QT_OPENGL_ES
545     ::glClearDepth(depth);
546 #else
547     ::glClearDepthf(depth);
548 #endif
549 }
550
551 inline void QGLFunctions::glCompileShader(GLuint shader)
552 {
553 #if defined(QT_OPENGL_ES_2)
554     ::glCompileShader(shader);
555 #else
556     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
557     d_ptr->compileShader(shader);
558 #endif
559 }
560
561 inline void QGLFunctions::glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data)
562 {
563 #if defined(QT_OPENGL_ES_2)
564     ::glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data);
565 #else
566     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
567     d_ptr->compressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data);
568 #endif
569 }
570
571 inline void QGLFunctions::glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data)
572 {
573 #if defined(QT_OPENGL_ES_2)
574     ::glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data);
575 #else
576     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
577     d_ptr->compressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data);
578 #endif
579 }
580
581 inline GLuint QGLFunctions::glCreateProgram()
582 {
583 #if defined(QT_OPENGL_ES_2)
584     return ::glCreateProgram();
585 #else
586     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
587     return d_ptr->createProgram();
588 #endif
589 }
590
591 inline GLuint QGLFunctions::glCreateShader(GLenum type)
592 {
593 #if defined(QT_OPENGL_ES_2)
594     return ::glCreateShader(type);
595 #else
596     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
597     return d_ptr->createShader(type);
598 #endif
599 }
600
601 inline void QGLFunctions::glDeleteBuffers(GLsizei n, const GLuint* buffers)
602 {
603 #if defined(QT_OPENGL_ES_2)
604     ::glDeleteBuffers(n, buffers);
605 #else
606     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
607     d_ptr->deleteBuffers(n, buffers);
608 #endif
609 }
610
611 inline void QGLFunctions::glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers)
612 {
613 #if defined(QT_OPENGL_ES_2)
614     ::glDeleteFramebuffers(n, framebuffers);
615 #else
616     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
617     d_ptr->deleteFramebuffers(n, framebuffers);
618 #endif
619 }
620
621 inline void QGLFunctions::glDeleteProgram(GLuint program)
622 {
623 #if defined(QT_OPENGL_ES_2)
624     ::glDeleteProgram(program);
625 #else
626     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
627     d_ptr->deleteProgram(program);
628 #endif
629 }
630
631 inline void QGLFunctions::glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers)
632 {
633 #if defined(QT_OPENGL_ES_2)
634     ::glDeleteRenderbuffers(n, renderbuffers);
635 #else
636     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
637     d_ptr->deleteRenderbuffers(n, renderbuffers);
638 #endif
639 }
640
641 inline void QGLFunctions::glDeleteShader(GLuint shader)
642 {
643 #if defined(QT_OPENGL_ES_2)
644     ::glDeleteShader(shader);
645 #else
646     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
647     d_ptr->deleteShader(shader);
648 #endif
649 }
650
651 inline void QGLFunctions::glDepthRangef(GLclampf zNear, GLclampf zFar)
652 {
653 #ifndef QT_OPENGL_ES
654     ::glDepthRange(zNear, zFar);
655 #else
656     ::glDepthRangef(zNear, zFar);
657 #endif
658 }
659
660 inline void QGLFunctions::glDetachShader(GLuint program, GLuint shader)
661 {
662 #if defined(QT_OPENGL_ES_2)
663     ::glDetachShader(program, shader);
664 #else
665     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
666     d_ptr->detachShader(program, shader);
667 #endif
668 }
669
670 inline void QGLFunctions::glDisableVertexAttribArray(GLuint index)
671 {
672 #if defined(QT_OPENGL_ES_2)
673     ::glDisableVertexAttribArray(index);
674 #else
675     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
676     d_ptr->disableVertexAttribArray(index);
677 #endif
678 }
679
680 inline void QGLFunctions::glEnableVertexAttribArray(GLuint index)
681 {
682 #if defined(QT_OPENGL_ES_2)
683     ::glEnableVertexAttribArray(index);
684 #else
685     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
686     d_ptr->enableVertexAttribArray(index);
687 #endif
688 }
689
690 inline void QGLFunctions::glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
691 {
692 #if defined(QT_OPENGL_ES_2)
693     ::glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);
694 #else
695     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
696     d_ptr->framebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);
697 #endif
698 }
699
700 inline void QGLFunctions::glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
701 {
702 #if defined(QT_OPENGL_ES_2)
703     ::glFramebufferTexture2D(target, attachment, textarget, texture, level);
704 #else
705     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
706     d_ptr->framebufferTexture2D(target, attachment, textarget, texture, level);
707 #endif
708 }
709
710 inline void QGLFunctions::glGenBuffers(GLsizei n, GLuint* buffers)
711 {
712 #if defined(QT_OPENGL_ES_2)
713     ::glGenBuffers(n, buffers);
714 #else
715     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
716     d_ptr->genBuffers(n, buffers);
717 #endif
718 }
719
720 inline void QGLFunctions::glGenerateMipmap(GLenum target)
721 {
722 #if defined(QT_OPENGL_ES_2)
723     ::glGenerateMipmap(target);
724 #else
725     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
726     d_ptr->generateMipmap(target);
727 #endif
728 }
729
730 inline void QGLFunctions::glGenFramebuffers(GLsizei n, GLuint* framebuffers)
731 {
732 #if defined(QT_OPENGL_ES_2)
733     ::glGenFramebuffers(n, framebuffers);
734 #else
735     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
736     d_ptr->genFramebuffers(n, framebuffers);
737 #endif
738 }
739
740 inline void QGLFunctions::glGenRenderbuffers(GLsizei n, GLuint* renderbuffers)
741 {
742 #if defined(QT_OPENGL_ES_2)
743     ::glGenRenderbuffers(n, renderbuffers);
744 #else
745     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
746     d_ptr->genRenderbuffers(n, renderbuffers);
747 #endif
748 }
749
750 inline void QGLFunctions::glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name)
751 {
752 #if defined(QT_OPENGL_ES_2)
753     ::glGetActiveAttrib(program, index, bufsize, length, size, type, name);
754 #else
755     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
756     d_ptr->getActiveAttrib(program, index, bufsize, length, size, type, name);
757 #endif
758 }
759
760 inline void QGLFunctions::glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name)
761 {
762 #if defined(QT_OPENGL_ES_2)
763     ::glGetActiveUniform(program, index, bufsize, length, size, type, name);
764 #else
765     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
766     d_ptr->getActiveUniform(program, index, bufsize, length, size, type, name);
767 #endif
768 }
769
770 inline void QGLFunctions::glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders)
771 {
772 #if defined(QT_OPENGL_ES_2)
773     ::glGetAttachedShaders(program, maxcount, count, shaders);
774 #else
775     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
776     d_ptr->getAttachedShaders(program, maxcount, count, shaders);
777 #endif
778 }
779
780 inline int QGLFunctions::glGetAttribLocation(GLuint program, const char* name)
781 {
782 #if defined(QT_OPENGL_ES_2)
783     return ::glGetAttribLocation(program, name);
784 #else
785     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
786     return d_ptr->getAttribLocation(program, name);
787 #endif
788 }
789
790 inline void QGLFunctions::glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params)
791 {
792 #if defined(QT_OPENGL_ES_2)
793     ::glGetBufferParameteriv(target, pname, params);
794 #else
795     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
796     d_ptr->getBufferParameteriv(target, pname, params);
797 #endif
798 }
799
800 inline void QGLFunctions::glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params)
801 {
802 #if defined(QT_OPENGL_ES_2)
803     ::glGetFramebufferAttachmentParameteriv(target, attachment, pname, params);
804 #else
805     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
806     d_ptr->getFramebufferAttachmentParameteriv(target, attachment, pname, params);
807 #endif
808 }
809
810 inline void QGLFunctions::glGetProgramiv(GLuint program, GLenum pname, GLint* params)
811 {
812 #if defined(QT_OPENGL_ES_2)
813     ::glGetProgramiv(program, pname, params);
814 #else
815     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
816     d_ptr->getProgramiv(program, pname, params);
817 #endif
818 }
819
820 inline void QGLFunctions::glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, char* infolog)
821 {
822 #if defined(QT_OPENGL_ES_2)
823     ::glGetProgramInfoLog(program, bufsize, length, infolog);
824 #else
825     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
826     d_ptr->getProgramInfoLog(program, bufsize, length, infolog);
827 #endif
828 }
829
830 inline void QGLFunctions::glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params)
831 {
832 #if defined(QT_OPENGL_ES_2)
833     ::glGetRenderbufferParameteriv(target, pname, params);
834 #else
835     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
836     d_ptr->getRenderbufferParameteriv(target, pname, params);
837 #endif
838 }
839
840 inline void QGLFunctions::glGetShaderiv(GLuint shader, GLenum pname, GLint* params)
841 {
842 #if defined(QT_OPENGL_ES_2)
843     ::glGetShaderiv(shader, pname, params);
844 #else
845     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
846     d_ptr->getShaderiv(shader, pname, params);
847 #endif
848 }
849
850 inline void QGLFunctions::glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog)
851 {
852 #if defined(QT_OPENGL_ES_2)
853     ::glGetShaderInfoLog(shader, bufsize, length, infolog);
854 #else
855     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
856     d_ptr->getShaderInfoLog(shader, bufsize, length, infolog);
857 #endif
858 }
859
860 inline void QGLFunctions::glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision)
861 {
862 #if defined(QT_OPENGL_ES_2)
863     ::glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision);
864 #else
865     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
866     d_ptr->getShaderPrecisionFormat(shadertype, precisiontype, range, precision);
867 #endif
868 }
869
870 inline void QGLFunctions::glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, char* source)
871 {
872 #if defined(QT_OPENGL_ES_2)
873     ::glGetShaderSource(shader, bufsize, length, source);
874 #else
875     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
876     d_ptr->getShaderSource(shader, bufsize, length, source);
877 #endif
878 }
879
880 inline void QGLFunctions::glGetUniformfv(GLuint program, GLint location, GLfloat* params)
881 {
882 #if defined(QT_OPENGL_ES_2)
883     ::glGetUniformfv(program, location, params);
884 #else
885     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
886     d_ptr->getUniformfv(program, location, params);
887 #endif
888 }
889
890 inline void QGLFunctions::glGetUniformiv(GLuint program, GLint location, GLint* params)
891 {
892 #if defined(QT_OPENGL_ES_2)
893     ::glGetUniformiv(program, location, params);
894 #else
895     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
896     d_ptr->getUniformiv(program, location, params);
897 #endif
898 }
899
900 inline int QGLFunctions::glGetUniformLocation(GLuint program, const char* name)
901 {
902 #if defined(QT_OPENGL_ES_2)
903     return ::glGetUniformLocation(program, name);
904 #else
905     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
906     return d_ptr->getUniformLocation(program, name);
907 #endif
908 }
909
910 inline void QGLFunctions::glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params)
911 {
912 #if defined(QT_OPENGL_ES_2)
913     ::glGetVertexAttribfv(index, pname, params);
914 #else
915     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
916     d_ptr->getVertexAttribfv(index, pname, params);
917 #endif
918 }
919
920 inline void QGLFunctions::glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params)
921 {
922 #if defined(QT_OPENGL_ES_2)
923     ::glGetVertexAttribiv(index, pname, params);
924 #else
925     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
926     d_ptr->getVertexAttribiv(index, pname, params);
927 #endif
928 }
929
930 inline void QGLFunctions::glGetVertexAttribPointerv(GLuint index, GLenum pname, void** pointer)
931 {
932 #if defined(QT_OPENGL_ES_2)
933     ::glGetVertexAttribPointerv(index, pname, pointer);
934 #else
935     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
936     d_ptr->getVertexAttribPointerv(index, pname, pointer);
937 #endif
938 }
939
940 inline GLboolean QGLFunctions::glIsBuffer(GLuint buffer)
941 {
942 #if defined(QT_OPENGL_ES_2)
943     return ::glIsBuffer(buffer);
944 #else
945     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
946     return d_ptr->isBuffer(buffer);
947 #endif
948 }
949
950 inline GLboolean QGLFunctions::glIsFramebuffer(GLuint framebuffer)
951 {
952 #if defined(QT_OPENGL_ES_2)
953     return ::glIsFramebuffer(framebuffer);
954 #else
955     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
956     return d_ptr->isFramebuffer(framebuffer);
957 #endif
958 }
959
960 inline GLboolean QGLFunctions::glIsProgram(GLuint program)
961 {
962 #if defined(QT_OPENGL_ES_2)
963     return ::glIsProgram(program);
964 #else
965     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
966     return d_ptr->isProgram(program);
967 #endif
968 }
969
970 inline GLboolean QGLFunctions::glIsRenderbuffer(GLuint renderbuffer)
971 {
972 #if defined(QT_OPENGL_ES_2)
973     return ::glIsRenderbuffer(renderbuffer);
974 #else
975     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
976     return d_ptr->isRenderbuffer(renderbuffer);
977 #endif
978 }
979
980 inline GLboolean QGLFunctions::glIsShader(GLuint shader)
981 {
982 #if defined(QT_OPENGL_ES_2)
983     return ::glIsShader(shader);
984 #else
985     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
986     return d_ptr->isShader(shader);
987 #endif
988 }
989
990 inline void QGLFunctions::glLinkProgram(GLuint program)
991 {
992 #if defined(QT_OPENGL_ES_2)
993     ::glLinkProgram(program);
994 #else
995     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
996     d_ptr->linkProgram(program);
997 #endif
998 }
999
1000 inline void QGLFunctions::glReleaseShaderCompiler()
1001 {
1002 #if defined(QT_OPENGL_ES_2)
1003     ::glReleaseShaderCompiler();
1004 #else
1005     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1006     d_ptr->releaseShaderCompiler();
1007 #endif
1008 }
1009
1010 inline void QGLFunctions::glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
1011 {
1012 #if defined(QT_OPENGL_ES_2)
1013     ::glRenderbufferStorage(target, internalformat, width, height);
1014 #else
1015     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1016     d_ptr->renderbufferStorage(target, internalformat, width, height);
1017 #endif
1018 }
1019
1020 inline void QGLFunctions::glSampleCoverage(GLclampf value, GLboolean invert)
1021 {
1022 #if defined(QT_OPENGL_ES_2)
1023     ::glSampleCoverage(value, invert);
1024 #else
1025     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1026     d_ptr->sampleCoverage(value, invert);
1027 #endif
1028 }
1029
1030 inline void QGLFunctions::glShaderBinary(GLint n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLint length)
1031 {
1032 #if defined(QT_OPENGL_ES_2)
1033     ::glShaderBinary(n, shaders, binaryformat, binary, length);
1034 #else
1035     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1036     d_ptr->shaderBinary(n, shaders, binaryformat, binary, length);
1037 #endif
1038 }
1039
1040 inline void QGLFunctions::glShaderSource(GLuint shader, GLsizei count, const char** string, const GLint* length)
1041 {
1042 #if defined(QT_OPENGL_ES_2)
1043     ::glShaderSource(shader, count, string, length);
1044 #else
1045     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1046     d_ptr->shaderSource(shader, count, string, length);
1047 #endif
1048 }
1049
1050 inline void QGLFunctions::glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask)
1051 {
1052 #if defined(QT_OPENGL_ES_2)
1053     ::glStencilFuncSeparate(face, func, ref, mask);
1054 #else
1055     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1056     d_ptr->stencilFuncSeparate(face, func, ref, mask);
1057 #endif
1058 }
1059
1060 inline void QGLFunctions::glStencilMaskSeparate(GLenum face, GLuint mask)
1061 {
1062 #if defined(QT_OPENGL_ES_2)
1063     ::glStencilMaskSeparate(face, mask);
1064 #else
1065     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1066     d_ptr->stencilMaskSeparate(face, mask);
1067 #endif
1068 }
1069
1070 inline void QGLFunctions::glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass)
1071 {
1072 #if defined(QT_OPENGL_ES_2)
1073     ::glStencilOpSeparate(face, fail, zfail, zpass);
1074 #else
1075     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1076     d_ptr->stencilOpSeparate(face, fail, zfail, zpass);
1077 #endif
1078 }
1079
1080 inline void QGLFunctions::glUniform1f(GLint location, GLfloat x)
1081 {
1082 #if defined(QT_OPENGL_ES_2)
1083     ::glUniform1f(location, x);
1084 #else
1085     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1086     d_ptr->uniform1f(location, x);
1087 #endif
1088 }
1089
1090 inline void QGLFunctions::glUniform1fv(GLint location, GLsizei count, const GLfloat* v)
1091 {
1092 #if defined(QT_OPENGL_ES_2)
1093     ::glUniform1fv(location, count, v);
1094 #else
1095     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1096     d_ptr->uniform1fv(location, count, v);
1097 #endif
1098 }
1099
1100 inline void QGLFunctions::glUniform1i(GLint location, GLint x)
1101 {
1102 #if defined(QT_OPENGL_ES_2)
1103     ::glUniform1i(location, x);
1104 #else
1105     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1106     d_ptr->uniform1i(location, x);
1107 #endif
1108 }
1109
1110 inline void QGLFunctions::glUniform1iv(GLint location, GLsizei count, const GLint* v)
1111 {
1112 #if defined(QT_OPENGL_ES_2)
1113     ::glUniform1iv(location, count, v);
1114 #else
1115     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1116     d_ptr->uniform1iv(location, count, v);
1117 #endif
1118 }
1119
1120 inline void QGLFunctions::glUniform2f(GLint location, GLfloat x, GLfloat y)
1121 {
1122 #if defined(QT_OPENGL_ES_2)
1123     ::glUniform2f(location, x, y);
1124 #else
1125     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1126     d_ptr->uniform2f(location, x, y);
1127 #endif
1128 }
1129
1130 inline void QGLFunctions::glUniform2fv(GLint location, GLsizei count, const GLfloat* v)
1131 {
1132 #if defined(QT_OPENGL_ES_2)
1133     ::glUniform2fv(location, count, v);
1134 #else
1135     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1136     d_ptr->uniform2fv(location, count, v);
1137 #endif
1138 }
1139
1140 inline void QGLFunctions::glUniform2i(GLint location, GLint x, GLint y)
1141 {
1142 #if defined(QT_OPENGL_ES_2)
1143     ::glUniform2i(location, x, y);
1144 #else
1145     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1146     d_ptr->uniform2i(location, x, y);
1147 #endif
1148 }
1149
1150 inline void QGLFunctions::glUniform2iv(GLint location, GLsizei count, const GLint* v)
1151 {
1152 #if defined(QT_OPENGL_ES_2)
1153     ::glUniform2iv(location, count, v);
1154 #else
1155     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1156     d_ptr->uniform2iv(location, count, v);
1157 #endif
1158 }
1159
1160 inline void QGLFunctions::glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z)
1161 {
1162 #if defined(QT_OPENGL_ES_2)
1163     ::glUniform3f(location, x, y, z);
1164 #else
1165     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1166     d_ptr->uniform3f(location, x, y, z);
1167 #endif
1168 }
1169
1170 inline void QGLFunctions::glUniform3fv(GLint location, GLsizei count, const GLfloat* v)
1171 {
1172 #if defined(QT_OPENGL_ES_2)
1173     ::glUniform3fv(location, count, v);
1174 #else
1175     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1176     d_ptr->uniform3fv(location, count, v);
1177 #endif
1178 }
1179
1180 inline void QGLFunctions::glUniform3i(GLint location, GLint x, GLint y, GLint z)
1181 {
1182 #if defined(QT_OPENGL_ES_2)
1183     ::glUniform3i(location, x, y, z);
1184 #else
1185     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1186     d_ptr->uniform3i(location, x, y, z);
1187 #endif
1188 }
1189
1190 inline void QGLFunctions::glUniform3iv(GLint location, GLsizei count, const GLint* v)
1191 {
1192 #if defined(QT_OPENGL_ES_2)
1193     ::glUniform3iv(location, count, v);
1194 #else
1195     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1196     d_ptr->uniform3iv(location, count, v);
1197 #endif
1198 }
1199
1200 inline void QGLFunctions::glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
1201 {
1202 #if defined(QT_OPENGL_ES_2)
1203     ::glUniform4f(location, x, y, z, w);
1204 #else
1205     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1206     d_ptr->uniform4f(location, x, y, z, w);
1207 #endif
1208 }
1209
1210 inline void QGLFunctions::glUniform4fv(GLint location, GLsizei count, const GLfloat* v)
1211 {
1212 #if defined(QT_OPENGL_ES_2)
1213     ::glUniform4fv(location, count, v);
1214 #else
1215     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1216     d_ptr->uniform4fv(location, count, v);
1217 #endif
1218 }
1219
1220 inline void QGLFunctions::glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w)
1221 {
1222 #if defined(QT_OPENGL_ES_2)
1223     ::glUniform4i(location, x, y, z, w);
1224 #else
1225     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1226     d_ptr->uniform4i(location, x, y, z, w);
1227 #endif
1228 }
1229
1230 inline void QGLFunctions::glUniform4iv(GLint location, GLsizei count, const GLint* v)
1231 {
1232 #if defined(QT_OPENGL_ES_2)
1233     ::glUniform4iv(location, count, v);
1234 #else
1235     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1236     d_ptr->uniform4iv(location, count, v);
1237 #endif
1238 }
1239
1240 inline void QGLFunctions::glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
1241 {
1242 #if defined(QT_OPENGL_ES_2)
1243     ::glUniformMatrix2fv(location, count, transpose, value);
1244 #else
1245     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1246     d_ptr->uniformMatrix2fv(location, count, transpose, value);
1247 #endif
1248 }
1249
1250 inline void QGLFunctions::glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
1251 {
1252 #if defined(QT_OPENGL_ES_2)
1253     ::glUniformMatrix3fv(location, count, transpose, value);
1254 #else
1255     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1256     d_ptr->uniformMatrix3fv(location, count, transpose, value);
1257 #endif
1258 }
1259
1260 inline void QGLFunctions::glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
1261 {
1262 #if defined(QT_OPENGL_ES_2)
1263     ::glUniformMatrix4fv(location, count, transpose, value);
1264 #else
1265     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1266     d_ptr->uniformMatrix4fv(location, count, transpose, value);
1267 #endif
1268 }
1269
1270 inline void QGLFunctions::glUseProgram(GLuint program)
1271 {
1272 #if defined(QT_OPENGL_ES_2)
1273     ::glUseProgram(program);
1274 #else
1275     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1276     d_ptr->useProgram(program);
1277 #endif
1278 }
1279
1280 inline void QGLFunctions::glValidateProgram(GLuint program)
1281 {
1282 #if defined(QT_OPENGL_ES_2)
1283     ::glValidateProgram(program);
1284 #else
1285     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1286     d_ptr->validateProgram(program);
1287 #endif
1288 }
1289
1290 inline void QGLFunctions::glVertexAttrib1f(GLuint indx, GLfloat x)
1291 {
1292 #if defined(QT_OPENGL_ES_2)
1293     ::glVertexAttrib1f(indx, x);
1294 #else
1295     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1296     d_ptr->vertexAttrib1f(indx, x);
1297 #endif
1298 }
1299
1300 inline void QGLFunctions::glVertexAttrib1fv(GLuint indx, const GLfloat* values)
1301 {
1302 #if defined(QT_OPENGL_ES_2)
1303     ::glVertexAttrib1fv(indx, values);
1304 #else
1305     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1306     d_ptr->vertexAttrib1fv(indx, values);
1307 #endif
1308 }
1309
1310 inline void QGLFunctions::glVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y)
1311 {
1312 #if defined(QT_OPENGL_ES_2)
1313     ::glVertexAttrib2f(indx, x, y);
1314 #else
1315     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1316     d_ptr->vertexAttrib2f(indx, x, y);
1317 #endif
1318 }
1319
1320 inline void QGLFunctions::glVertexAttrib2fv(GLuint indx, const GLfloat* values)
1321 {
1322 #if defined(QT_OPENGL_ES_2)
1323     ::glVertexAttrib2fv(indx, values);
1324 #else
1325     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1326     d_ptr->vertexAttrib2fv(indx, values);
1327 #endif
1328 }
1329
1330 inline void QGLFunctions::glVertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z)
1331 {
1332 #if defined(QT_OPENGL_ES_2)
1333     ::glVertexAttrib3f(indx, x, y, z);
1334 #else
1335     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1336     d_ptr->vertexAttrib3f(indx, x, y, z);
1337 #endif
1338 }
1339
1340 inline void QGLFunctions::glVertexAttrib3fv(GLuint indx, const GLfloat* values)
1341 {
1342 #if defined(QT_OPENGL_ES_2)
1343     ::glVertexAttrib3fv(indx, values);
1344 #else
1345     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1346     d_ptr->vertexAttrib3fv(indx, values);
1347 #endif
1348 }
1349
1350 inline void QGLFunctions::glVertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
1351 {
1352 #if defined(QT_OPENGL_ES_2)
1353     ::glVertexAttrib4f(indx, x, y, z, w);
1354 #else
1355     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1356     d_ptr->vertexAttrib4f(indx, x, y, z, w);
1357 #endif
1358 }
1359
1360 inline void QGLFunctions::glVertexAttrib4fv(GLuint indx, const GLfloat* values)
1361 {
1362 #if defined(QT_OPENGL_ES_2)
1363     ::glVertexAttrib4fv(indx, values);
1364 #else
1365     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1366     d_ptr->vertexAttrib4fv(indx, values);
1367 #endif
1368 }
1369
1370 inline void QGLFunctions::glVertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr)
1371 {
1372 #if defined(QT_OPENGL_ES_2)
1373     ::glVertexAttribPointer(indx, size, type, normalized, stride, ptr);
1374 #else
1375     Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1376     d_ptr->vertexAttribPointer(indx, size, type, normalized, stride, ptr);
1377 #endif
1378 }
1379
1380 #ifndef GL_ACTIVE_ATTRIBUTE_MAX_LENGTH
1381 #define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
1382 #endif
1383 #ifndef GL_ACTIVE_ATTRIBUTES
1384 #define GL_ACTIVE_ATTRIBUTES 0x8B89
1385 #endif
1386 #ifndef GL_ACTIVE_TEXTURE
1387 #define GL_ACTIVE_TEXTURE 0x84E0
1388 #endif
1389 #ifndef GL_ACTIVE_UNIFORM_MAX_LENGTH
1390 #define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
1391 #endif
1392 #ifndef GL_ACTIVE_UNIFORMS
1393 #define GL_ACTIVE_UNIFORMS 0x8B86
1394 #endif
1395 #ifndef GL_ALIASED_LINE_WIDTH_RANGE
1396 #define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
1397 #endif
1398 #ifndef GL_ALIASED_POINT_SIZE_RANGE
1399 #define GL_ALIASED_POINT_SIZE_RANGE 0x846D
1400 #endif
1401 #ifndef GL_ALPHA
1402 #define GL_ALPHA 0x1906
1403 #endif
1404 #ifndef GL_ALPHA_BITS
1405 #define GL_ALPHA_BITS 0x0D55
1406 #endif
1407 #ifndef GL_ALWAYS
1408 #define GL_ALWAYS 0x0207
1409 #endif
1410 #ifndef GL_ARRAY_BUFFER
1411 #define GL_ARRAY_BUFFER 0x8892
1412 #endif
1413 #ifndef GL_ARRAY_BUFFER_BINDING
1414 #define GL_ARRAY_BUFFER_BINDING 0x8894
1415 #endif
1416 #ifndef GL_ATTACHED_SHADERS
1417 #define GL_ATTACHED_SHADERS 0x8B85
1418 #endif
1419 #ifndef GL_BACK
1420 #define GL_BACK 0x0405
1421 #endif
1422 #ifndef GL_BLEND
1423 #define GL_BLEND 0x0BE2
1424 #endif
1425 #ifndef GL_BLEND_COLOR
1426 #define GL_BLEND_COLOR 0x8005
1427 #endif
1428 #ifndef GL_BLEND_DST_ALPHA
1429 #define GL_BLEND_DST_ALPHA 0x80CA
1430 #endif
1431 #ifndef GL_BLEND_DST_RGB
1432 #define GL_BLEND_DST_RGB 0x80C8
1433 #endif
1434 #ifndef GL_BLEND_EQUATION
1435 #define GL_BLEND_EQUATION 0x8009
1436 #endif
1437 #ifndef GL_BLEND_EQUATION_ALPHA
1438 #define GL_BLEND_EQUATION_ALPHA 0x883D
1439 #endif
1440 #ifndef GL_BLEND_EQUATION_RGB
1441 #define GL_BLEND_EQUATION_RGB 0x8009
1442 #endif
1443 #ifndef GL_BLEND_SRC_ALPHA
1444 #define GL_BLEND_SRC_ALPHA 0x80CB
1445 #endif
1446 #ifndef GL_BLEND_SRC_RGB
1447 #define GL_BLEND_SRC_RGB 0x80C9
1448 #endif
1449 #ifndef GL_BLUE_BITS
1450 #define GL_BLUE_BITS 0x0D54
1451 #endif
1452 #ifndef GL_BOOL
1453 #define GL_BOOL 0x8B56
1454 #endif
1455 #ifndef GL_BOOL_VEC2
1456 #define GL_BOOL_VEC2 0x8B57
1457 #endif
1458 #ifndef GL_BOOL_VEC3
1459 #define GL_BOOL_VEC3 0x8B58
1460 #endif
1461 #ifndef GL_BOOL_VEC4
1462 #define GL_BOOL_VEC4 0x8B59
1463 #endif
1464 #ifndef GL_BUFFER_SIZE
1465 #define GL_BUFFER_SIZE 0x8764
1466 #endif
1467 #ifndef GL_BUFFER_USAGE
1468 #define GL_BUFFER_USAGE 0x8765
1469 #endif
1470 #ifndef GL_BYTE
1471 #define GL_BYTE 0x1400
1472 #endif
1473 #ifndef GL_CCW
1474 #define GL_CCW 0x0901
1475 #endif
1476 #ifndef GL_CLAMP_TO_EDGE
1477 #define GL_CLAMP_TO_EDGE 0x812F
1478 #endif
1479 #ifndef GL_COLOR_ATTACHMENT0
1480 #define GL_COLOR_ATTACHMENT0 0x8CE0
1481 #endif
1482 #ifndef GL_COLOR_BUFFER_BIT
1483 #define GL_COLOR_BUFFER_BIT 0x00004000
1484 #endif
1485 #ifndef GL_COLOR_CLEAR_VALUE
1486 #define GL_COLOR_CLEAR_VALUE 0x0C22
1487 #endif
1488 #ifndef GL_COLOR_WRITEMASK
1489 #define GL_COLOR_WRITEMASK 0x0C23
1490 #endif
1491 #ifndef GL_COMPILE_STATUS
1492 #define GL_COMPILE_STATUS 0x8B81
1493 #endif
1494 #ifndef GL_COMPRESSED_TEXTURE_FORMATS
1495 #define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
1496 #endif
1497 #ifndef GL_CONSTANT_ALPHA
1498 #define GL_CONSTANT_ALPHA 0x8003
1499 #endif
1500 #ifndef GL_CONSTANT_COLOR
1501 #define GL_CONSTANT_COLOR 0x8001
1502 #endif
1503 #ifndef GL_CULL_FACE
1504 #define GL_CULL_FACE 0x0B44
1505 #endif
1506 #ifndef GL_CULL_FACE_MODE
1507 #define GL_CULL_FACE_MODE 0x0B45
1508 #endif
1509 #ifndef GL_CURRENT_PROGRAM
1510 #define GL_CURRENT_PROGRAM 0x8B8D
1511 #endif
1512 #ifndef GL_CURRENT_VERTEX_ATTRIB
1513 #define GL_CURRENT_VERTEX_ATTRIB 0x8626
1514 #endif
1515 #ifndef GL_CW
1516 #define GL_CW 0x0900
1517 #endif
1518 #ifndef GL_DECR
1519 #define GL_DECR 0x1E03
1520 #endif
1521 #ifndef GL_DECR_WRAP
1522 #define GL_DECR_WRAP 0x8508
1523 #endif
1524 #ifndef GL_DELETE_STATUS
1525 #define GL_DELETE_STATUS 0x8B80
1526 #endif
1527 #ifndef GL_DEPTH_ATTACHMENT
1528 #define GL_DEPTH_ATTACHMENT 0x8D00
1529 #endif
1530 #ifndef GL_DEPTH_BITS
1531 #define GL_DEPTH_BITS 0x0D56
1532 #endif
1533 #ifndef GL_DEPTH_BUFFER_BIT
1534 #define GL_DEPTH_BUFFER_BIT 0x00000100
1535 #endif
1536 #ifndef GL_DEPTH_CLEAR_VALUE
1537 #define GL_DEPTH_CLEAR_VALUE 0x0B73
1538 #endif
1539 #ifndef GL_DEPTH_COMPONENT
1540 #define GL_DEPTH_COMPONENT 0x1902
1541 #endif
1542 #ifndef GL_DEPTH_COMPONENT16
1543 #define GL_DEPTH_COMPONENT16 0x81A5
1544 #endif
1545 #ifndef GL_DEPTH_FUNC
1546 #define GL_DEPTH_FUNC 0x0B74
1547 #endif
1548 #ifndef GL_DEPTH_RANGE
1549 #define GL_DEPTH_RANGE 0x0B70
1550 #endif
1551 #ifndef GL_DEPTH_TEST
1552 #define GL_DEPTH_TEST 0x0B71
1553 #endif
1554 #ifndef GL_DEPTH_WRITEMASK
1555 #define GL_DEPTH_WRITEMASK 0x0B72
1556 #endif
1557 #ifndef GL_DITHER
1558 #define GL_DITHER 0x0BD0
1559 #endif
1560 #ifndef GL_DONT_CARE
1561 #define GL_DONT_CARE 0x1100
1562 #endif
1563 #ifndef GL_DST_ALPHA
1564 #define GL_DST_ALPHA 0x0304
1565 #endif
1566 #ifndef GL_DST_COLOR
1567 #define GL_DST_COLOR 0x0306
1568 #endif
1569 #ifndef GL_DYNAMIC_DRAW
1570 #define GL_DYNAMIC_DRAW 0x88E8
1571 #endif
1572 #ifndef GL_ELEMENT_ARRAY_BUFFER
1573 #define GL_ELEMENT_ARRAY_BUFFER 0x8893
1574 #endif
1575 #ifndef GL_ELEMENT_ARRAY_BUFFER_BINDING
1576 #define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
1577 #endif
1578 #ifndef GL_EQUAL
1579 #define GL_EQUAL 0x0202
1580 #endif
1581 #ifndef GL_EXTENSIONS
1582 #define GL_EXTENSIONS 0x1F03
1583 #endif
1584 #ifndef GL_FALSE
1585 #define GL_FALSE 0
1586 #endif
1587 #ifndef GL_FASTEST
1588 #define GL_FASTEST 0x1101
1589 #endif
1590 #ifndef GL_FIXED
1591 #define GL_FIXED 0x140C
1592 #endif
1593 #ifndef GL_FLOAT
1594 #define GL_FLOAT 0x1406
1595 #endif
1596 #ifndef GL_FLOAT_MAT2
1597 #define GL_FLOAT_MAT2 0x8B5A
1598 #endif
1599 #ifndef GL_FLOAT_MAT3
1600 #define GL_FLOAT_MAT3 0x8B5B
1601 #endif
1602 #ifndef GL_FLOAT_MAT4
1603 #define GL_FLOAT_MAT4 0x8B5C
1604 #endif
1605 #ifndef GL_FLOAT_VEC2
1606 #define GL_FLOAT_VEC2 0x8B50
1607 #endif
1608 #ifndef GL_FLOAT_VEC3
1609 #define GL_FLOAT_VEC3 0x8B51
1610 #endif
1611 #ifndef GL_FLOAT_VEC4
1612 #define GL_FLOAT_VEC4 0x8B52
1613 #endif
1614 #ifndef GL_FRAGMENT_SHADER
1615 #define GL_FRAGMENT_SHADER 0x8B30
1616 #endif
1617 #ifndef GL_FRAMEBUFFER
1618 #define GL_FRAMEBUFFER 0x8D40
1619 #endif
1620 #ifndef GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME
1621 #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
1622 #endif
1623 #ifndef GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE
1624 #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
1625 #endif
1626 #ifndef GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE
1627 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
1628 #endif
1629 #ifndef GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL
1630 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
1631 #endif
1632 #ifndef GL_FRAMEBUFFER_BINDING
1633 #define GL_FRAMEBUFFER_BINDING 0x8CA6
1634 #endif
1635 #ifndef GL_FRAMEBUFFER_COMPLETE
1636 #define GL_FRAMEBUFFER_COMPLETE 0x8CD5
1637 #endif
1638 #ifndef GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT
1639 #define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
1640 #endif
1641 #ifndef GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS
1642 #define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9
1643 #endif
1644 #ifndef GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT
1645 #define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
1646 #endif
1647 #ifndef GL_FRAMEBUFFER_UNSUPPORTED
1648 #define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
1649 #endif
1650 #ifndef GL_FRONT
1651 #define GL_FRONT 0x0404
1652 #endif
1653 #ifndef GL_FRONT_AND_BACK
1654 #define GL_FRONT_AND_BACK 0x0408
1655 #endif
1656 #ifndef GL_FRONT_FACE
1657 #define GL_FRONT_FACE 0x0B46
1658 #endif
1659 #ifndef GL_FUNC_ADD
1660 #define GL_FUNC_ADD 0x8006
1661 #endif
1662 #ifndef GL_FUNC_REVERSE_SUBTRACT
1663 #define GL_FUNC_REVERSE_SUBTRACT 0x800B
1664 #endif
1665 #ifndef GL_FUNC_SUBTRACT
1666 #define GL_FUNC_SUBTRACT 0x800A
1667 #endif
1668 #ifndef GL_GENERATE_MIPMAP_HINT
1669 #define GL_GENERATE_MIPMAP_HINT 0x8192
1670 #endif
1671 #ifndef GL_GEQUAL
1672 #define GL_GEQUAL 0x0206
1673 #endif
1674 #ifndef GL_GREATER
1675 #define GL_GREATER 0x0204
1676 #endif
1677 #ifndef GL_GREEN_BITS
1678 #define GL_GREEN_BITS 0x0D53
1679 #endif
1680 #ifndef GL_HIGH_FLOAT
1681 #define GL_HIGH_FLOAT 0x8DF2
1682 #endif
1683 #ifndef GL_HIGH_INT
1684 #define GL_HIGH_INT 0x8DF5
1685 #endif
1686 #ifndef GL_IMPLEMENTATION_COLOR_READ_FORMAT
1687 #define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
1688 #endif
1689 #ifndef GL_IMPLEMENTATION_COLOR_READ_TYPE
1690 #define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A
1691 #endif
1692 #ifndef GL_INCR
1693 #define GL_INCR 0x1E02
1694 #endif
1695 #ifndef GL_INCR_WRAP
1696 #define GL_INCR_WRAP 0x8507
1697 #endif
1698 #ifndef GL_INFO_LOG_LENGTH
1699 #define GL_INFO_LOG_LENGTH 0x8B84
1700 #endif
1701 #ifndef GL_INT
1702 #define GL_INT 0x1404
1703 #endif
1704 #ifndef GL_INT_VEC2
1705 #define GL_INT_VEC2 0x8B53
1706 #endif
1707 #ifndef GL_INT_VEC3
1708 #define GL_INT_VEC3 0x8B54
1709 #endif
1710 #ifndef GL_INT_VEC4
1711 #define GL_INT_VEC4 0x8B55
1712 #endif
1713 #ifndef GL_INVALID_ENUM
1714 #define GL_INVALID_ENUM 0x0500
1715 #endif
1716 #ifndef GL_INVALID_FRAMEBUFFER_OPERATION
1717 #define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506
1718 #endif
1719 #ifndef GL_INVALID_OPERATION
1720 #define GL_INVALID_OPERATION 0x0502
1721 #endif
1722 #ifndef GL_INVALID_VALUE
1723 #define GL_INVALID_VALUE 0x0501
1724 #endif
1725 #ifndef GL_INVERT
1726 #define GL_INVERT 0x150A
1727 #endif
1728 #ifndef GL_KEEP
1729 #define GL_KEEP 0x1E00
1730 #endif
1731 #ifndef GL_LEQUAL
1732 #define GL_LEQUAL 0x0203
1733 #endif
1734 #ifndef GL_LESS
1735 #define GL_LESS 0x0201
1736 #endif
1737 #ifndef GL_LINEAR
1738 #define GL_LINEAR 0x2601
1739 #endif
1740 #ifndef GL_LINEAR_MIPMAP_LINEAR
1741 #define GL_LINEAR_MIPMAP_LINEAR 0x2703
1742 #endif
1743 #ifndef GL_LINEAR_MIPMAP_NEAREST
1744 #define GL_LINEAR_MIPMAP_NEAREST 0x2701
1745 #endif
1746 #ifndef GL_LINE_LOOP
1747 #define GL_LINE_LOOP 0x0002
1748 #endif
1749 #ifndef GL_LINES
1750 #define GL_LINES 0x0001
1751 #endif
1752 #ifndef GL_LINE_STRIP
1753 #define GL_LINE_STRIP 0x0003
1754 #endif
1755 #ifndef GL_LINE_WIDTH
1756 #define GL_LINE_WIDTH 0x0B21
1757 #endif
1758 #ifndef GL_LINK_STATUS
1759 #define GL_LINK_STATUS 0x8B82
1760 #endif
1761 #ifndef GL_LOW_FLOAT
1762 #define GL_LOW_FLOAT 0x8DF0
1763 #endif
1764 #ifndef GL_LOW_INT
1765 #define GL_LOW_INT 0x8DF3
1766 #endif
1767 #ifndef GL_LUMINANCE
1768 #define GL_LUMINANCE 0x1909
1769 #endif
1770 #ifndef GL_LUMINANCE_ALPHA
1771 #define GL_LUMINANCE_ALPHA 0x190A
1772 #endif
1773 #ifndef GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS
1774 #define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
1775 #endif
1776 #ifndef GL_MAX_CUBE_MAP_TEXTURE_SIZE
1777 #define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
1778 #endif
1779 #ifndef GL_MAX_FRAGMENT_UNIFORM_VECTORS
1780 #define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD
1781 #endif
1782 #ifndef GL_MAX_RENDERBUFFER_SIZE
1783 #define GL_MAX_RENDERBUFFER_SIZE 0x84E8
1784 #endif
1785 #ifndef GL_MAX_TEXTURE_IMAGE_UNITS
1786 #define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
1787 #endif
1788 #ifndef GL_MAX_TEXTURE_SIZE
1789 #define GL_MAX_TEXTURE_SIZE 0x0D33
1790 #endif
1791 #ifndef GL_MAX_VARYING_VECTORS
1792 #define GL_MAX_VARYING_VECTORS 0x8DFC
1793 #endif
1794 #ifndef GL_MAX_VERTEX_ATTRIBS
1795 #define GL_MAX_VERTEX_ATTRIBS 0x8869
1796 #endif
1797 #ifndef GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS
1798 #define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
1799 #endif
1800 #ifndef GL_MAX_VERTEX_UNIFORM_VECTORS
1801 #define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB
1802 #endif
1803 #ifndef GL_MAX_VIEWPORT_DIMS
1804 #define GL_MAX_VIEWPORT_DIMS 0x0D3A
1805 #endif
1806 #ifndef GL_MEDIUM_FLOAT
1807 #define GL_MEDIUM_FLOAT 0x8DF1
1808 #endif
1809 #ifndef GL_MEDIUM_INT
1810 #define GL_MEDIUM_INT 0x8DF4
1811 #endif
1812 #ifndef GL_MIRRORED_REPEAT
1813 #define GL_MIRRORED_REPEAT 0x8370
1814 #endif
1815 #ifndef GL_NEAREST
1816 #define GL_NEAREST 0x2600
1817 #endif
1818 #ifndef GL_NEAREST_MIPMAP_LINEAR
1819 #define GL_NEAREST_MIPMAP_LINEAR 0x2702
1820 #endif
1821 #ifndef GL_NEAREST_MIPMAP_NEAREST
1822 #define GL_NEAREST_MIPMAP_NEAREST 0x2700
1823 #endif
1824 #ifndef GL_NEVER
1825 #define GL_NEVER 0x0200
1826 #endif
1827 #ifndef GL_NICEST
1828 #define GL_NICEST 0x1102
1829 #endif
1830 #ifndef GL_NO_ERROR
1831 #define GL_NO_ERROR 0
1832 #endif
1833 #ifndef GL_NONE
1834 #define GL_NONE 0
1835 #endif
1836 #ifndef GL_NOTEQUAL
1837 #define GL_NOTEQUAL 0x0205
1838 #endif
1839 #ifndef GL_NUM_COMPRESSED_TEXTURE_FORMATS
1840 #define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
1841 #endif
1842 #ifndef GL_NUM_SHADER_BINARY_FORMATS
1843 #define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9
1844 #endif
1845 #ifndef GL_ONE
1846 #define GL_ONE 1
1847 #endif
1848 #ifndef GL_ONE_MINUS_CONSTANT_ALPHA
1849 #define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
1850 #endif
1851 #ifndef GL_ONE_MINUS_CONSTANT_COLOR
1852 #define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
1853 #endif
1854 #ifndef GL_ONE_MINUS_DST_ALPHA
1855 #define GL_ONE_MINUS_DST_ALPHA 0x0305
1856 #endif
1857 #ifndef GL_ONE_MINUS_DST_COLOR
1858 #define GL_ONE_MINUS_DST_COLOR 0x0307
1859 #endif
1860 #ifndef GL_ONE_MINUS_SRC_ALPHA
1861 #define GL_ONE_MINUS_SRC_ALPHA 0x0303
1862 #endif
1863 #ifndef GL_ONE_MINUS_SRC_COLOR
1864 #define GL_ONE_MINUS_SRC_COLOR 0x0301
1865 #endif
1866 #ifndef GL_OUT_OF_MEMORY
1867 #define GL_OUT_OF_MEMORY 0x0505
1868 #endif
1869 #ifndef GL_PACK_ALIGNMENT
1870 #define GL_PACK_ALIGNMENT 0x0D05
1871 #endif
1872 #ifndef GL_POINTS
1873 #define GL_POINTS 0x0000
1874 #endif
1875 #ifndef GL_POLYGON_OFFSET_FACTOR
1876 #define GL_POLYGON_OFFSET_FACTOR 0x8038
1877 #endif
1878 #ifndef GL_POLYGON_OFFSET_FILL
1879 #define GL_POLYGON_OFFSET_FILL 0x8037
1880 #endif
1881 #ifndef GL_POLYGON_OFFSET_UNITS
1882 #define GL_POLYGON_OFFSET_UNITS 0x2A00
1883 #endif
1884 #ifndef GL_RED_BITS
1885 #define GL_RED_BITS 0x0D52
1886 #endif
1887 #ifndef GL_RENDERBUFFER
1888 #define GL_RENDERBUFFER 0x8D41
1889 #endif
1890 #ifndef GL_RENDERBUFFER_ALPHA_SIZE
1891 #define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53
1892 #endif
1893 #ifndef GL_RENDERBUFFER_BINDING
1894 #define GL_RENDERBUFFER_BINDING 0x8CA7
1895 #endif
1896 #ifndef GL_RENDERBUFFER_BLUE_SIZE
1897 #define GL_RENDERBUFFER_BLUE_SIZE 0x8D52
1898 #endif
1899 #ifndef GL_RENDERBUFFER_DEPTH_SIZE
1900 #define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54
1901 #endif
1902 #ifndef GL_RENDERBUFFER_GREEN_SIZE
1903 #define GL_RENDERBUFFER_GREEN_SIZE 0x8D51
1904 #endif
1905 #ifndef GL_RENDERBUFFER_HEIGHT
1906 #define GL_RENDERBUFFER_HEIGHT 0x8D43
1907 #endif
1908 #ifndef GL_RENDERBUFFER_INTERNAL_FORMAT
1909 #define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44
1910 #endif
1911 #ifndef GL_RENDERBUFFER_RED_SIZE
1912 #define GL_RENDERBUFFER_RED_SIZE 0x8D50
1913 #endif
1914 #ifndef GL_RENDERBUFFER_STENCIL_SIZE
1915 #define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55
1916 #endif
1917 #ifndef GL_RENDERBUFFER_WIDTH
1918 #define GL_RENDERBUFFER_WIDTH 0x8D42
1919 #endif
1920 #ifndef GL_RENDERER
1921 #define GL_RENDERER 0x1F01
1922 #endif
1923 #ifndef GL_REPEAT
1924 #define GL_REPEAT 0x2901
1925 #endif
1926 #ifndef GL_REPLACE
1927 #define GL_REPLACE 0x1E01
1928 #endif
1929 #ifndef GL_RGB
1930 #define GL_RGB 0x1907
1931 #endif
1932 #ifndef GL_RGB565
1933 #define GL_RGB565 0x8D62
1934 #endif
1935 #ifndef GL_RGB5_A1
1936 #define GL_RGB5_A1 0x8057
1937 #endif
1938 #ifndef GL_RGBA
1939 #define GL_RGBA 0x1908
1940 #endif
1941 #ifndef GL_RGBA4
1942 #define GL_RGBA4 0x8056
1943 #endif
1944 #ifndef GL_BGRA
1945 #define GL_BGRA 0x80E1
1946 #endif
1947 #ifndef GL_SAMPLE_ALPHA_TO_COVERAGE
1948 #define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
1949 #endif
1950 #ifndef GL_SAMPLE_BUFFERS
1951 #define GL_SAMPLE_BUFFERS 0x80A8
1952 #endif
1953 #ifndef GL_SAMPLE_COVERAGE
1954 #define GL_SAMPLE_COVERAGE 0x80A0
1955 #endif
1956 #ifndef GL_SAMPLE_COVERAGE_INVERT
1957 #define GL_SAMPLE_COVERAGE_INVERT 0x80AB
1958 #endif
1959 #ifndef GL_SAMPLE_COVERAGE_VALUE
1960 #define GL_SAMPLE_COVERAGE_VALUE 0x80AA
1961 #endif
1962 #ifndef GL_SAMPLER_2D
1963 #define GL_SAMPLER_2D 0x8B5E
1964 #endif
1965 #ifndef GL_SAMPLER_CUBE
1966 #define GL_SAMPLER_CUBE 0x8B60
1967 #endif
1968 #ifndef GL_SAMPLES
1969 #define GL_SAMPLES 0x80A9
1970 #endif
1971 #ifndef GL_SCISSOR_BOX
1972 #define GL_SCISSOR_BOX 0x0C10
1973 #endif
1974 #ifndef GL_SCISSOR_TEST
1975 #define GL_SCISSOR_TEST 0x0C11
1976 #endif
1977 #ifndef GL_SHADER_BINARY_FORMATS
1978 #define GL_SHADER_BINARY_FORMATS 0x8DF8
1979 #endif
1980 #ifndef GL_SHADER_COMPILER
1981 #define GL_SHADER_COMPILER 0x8DFA
1982 #endif
1983 #ifndef GL_SHADER_SOURCE_LENGTH
1984 #define GL_SHADER_SOURCE_LENGTH 0x8B88
1985 #endif
1986 #ifndef GL_SHADER_TYPE
1987 #define GL_SHADER_TYPE 0x8B4F
1988 #endif
1989 #ifndef GL_SHADING_LANGUAGE_VERSION
1990 #define GL_SHADING_LANGUAGE_VERSION 0x8B8C
1991 #endif
1992 #ifndef GL_SHORT
1993 #define GL_SHORT 0x1402
1994 #endif
1995 #ifndef GL_SRC_ALPHA
1996 #define GL_SRC_ALPHA 0x0302
1997 #endif
1998 #ifndef GL_SRC_ALPHA_SATURATE
1999 #define GL_SRC_ALPHA_SATURATE 0x0308
2000 #endif
2001 #ifndef GL_SRC_COLOR
2002 #define GL_SRC_COLOR 0x0300
2003 #endif
2004 #ifndef GL_STATIC_DRAW
2005 #define GL_STATIC_DRAW 0x88E4
2006 #endif
2007 #ifndef GL_STENCIL_ATTACHMENT
2008 #define GL_STENCIL_ATTACHMENT 0x8D20
2009 #endif
2010 #ifndef GL_STENCIL_BACK_FAIL
2011 #define GL_STENCIL_BACK_FAIL 0x8801
2012 #endif
2013 #ifndef GL_STENCIL_BACK_FUNC
2014 #define GL_STENCIL_BACK_FUNC 0x8800
2015 #endif
2016 #ifndef GL_STENCIL_BACK_PASS_DEPTH_FAIL
2017 #define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
2018 #endif
2019 #ifndef GL_STENCIL_BACK_PASS_DEPTH_PASS
2020 #define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
2021 #endif
2022 #ifndef GL_STENCIL_BACK_REF
2023 #define GL_STENCIL_BACK_REF 0x8CA3
2024 #endif
2025 #ifndef GL_STENCIL_BACK_VALUE_MASK
2026 #define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
2027 #endif
2028 #ifndef GL_STENCIL_BACK_WRITEMASK
2029 #define GL_STENCIL_BACK_WRITEMASK 0x8CA5
2030 #endif
2031 #ifndef GL_STENCIL_BITS
2032 #define GL_STENCIL_BITS 0x0D57
2033 #endif
2034 #ifndef GL_STENCIL_BUFFER_BIT
2035 #define GL_STENCIL_BUFFER_BIT 0x00000400
2036 #endif
2037 #ifndef GL_STENCIL_CLEAR_VALUE
2038 #define GL_STENCIL_CLEAR_VALUE 0x0B91
2039 #endif
2040 #ifndef GL_STENCIL_FAIL
2041 #define GL_STENCIL_FAIL 0x0B94
2042 #endif
2043 #ifndef GL_STENCIL_FUNC
2044 #define GL_STENCIL_FUNC 0x0B92
2045 #endif
2046 #ifndef GL_STENCIL_INDEX
2047 #define GL_STENCIL_INDEX 0x1901
2048 #endif
2049 #ifndef GL_STENCIL_INDEX8
2050 #define GL_STENCIL_INDEX8 0x8D48
2051 #endif
2052 #ifndef GL_STENCIL_PASS_DEPTH_FAIL
2053 #define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
2054 #endif
2055 #ifndef GL_STENCIL_PASS_DEPTH_PASS
2056 #define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
2057 #endif
2058 #ifndef GL_STENCIL_REF
2059 #define GL_STENCIL_REF 0x0B97
2060 #endif
2061 #ifndef GL_STENCIL_TEST
2062 #define GL_STENCIL_TEST 0x0B90
2063 #endif
2064 #ifndef GL_STENCIL_VALUE_MASK
2065 #define GL_STENCIL_VALUE_MASK 0x0B93
2066 #endif
2067 #ifndef GL_STENCIL_WRITEMASK
2068 #define GL_STENCIL_WRITEMASK 0x0B98
2069 #endif
2070 #ifndef GL_STREAM_DRAW
2071 #define GL_STREAM_DRAW 0x88E0
2072 #endif
2073 #ifndef GL_SUBPIXEL_BITS
2074 #define GL_SUBPIXEL_BITS 0x0D50
2075 #endif
2076 #ifndef GL_TEXTURE0
2077 #define GL_TEXTURE0 0x84C0
2078 #endif
2079 #ifndef GL_TEXTURE
2080 #define GL_TEXTURE 0x1702
2081 #endif
2082 #ifndef GL_TEXTURE10
2083 #define GL_TEXTURE10 0x84CA
2084 #endif
2085 #ifndef GL_TEXTURE1
2086 #define GL_TEXTURE1 0x84C1
2087 #endif
2088 #ifndef GL_TEXTURE11
2089 #define GL_TEXTURE11 0x84CB
2090 #endif
2091 #ifndef GL_TEXTURE12
2092 #define GL_TEXTURE12 0x84CC
2093 #endif
2094 #ifndef GL_TEXTURE13
2095 #define GL_TEXTURE13 0x84CD
2096 #endif
2097 #ifndef GL_TEXTURE14
2098 #define GL_TEXTURE14 0x84CE
2099 #endif
2100 #ifndef GL_TEXTURE15
2101 #define GL_TEXTURE15 0x84CF
2102 #endif
2103 #ifndef GL_TEXTURE16
2104 #define GL_TEXTURE16 0x84D0
2105 #endif
2106 #ifndef GL_TEXTURE17
2107 #define GL_TEXTURE17 0x84D1
2108 #endif
2109 #ifndef GL_TEXTURE18
2110 #define GL_TEXTURE18 0x84D2
2111 #endif
2112 #ifndef GL_TEXTURE19
2113 #define GL_TEXTURE19 0x84D3
2114 #endif
2115 #ifndef GL_TEXTURE20
2116 #define GL_TEXTURE20 0x84D4
2117 #endif
2118 #ifndef GL_TEXTURE2
2119 #define GL_TEXTURE2 0x84C2
2120 #endif
2121 #ifndef GL_TEXTURE21
2122 #define GL_TEXTURE21 0x84D5
2123 #endif
2124 #ifndef GL_TEXTURE22
2125 #define GL_TEXTURE22 0x84D6
2126 #endif
2127 #ifndef GL_TEXTURE23
2128 #define GL_TEXTURE23 0x84D7
2129 #endif
2130 #ifndef GL_TEXTURE24
2131 #define GL_TEXTURE24 0x84D8
2132 #endif
2133 #ifndef GL_TEXTURE25
2134 #define GL_TEXTURE25 0x84D9
2135 #endif
2136 #ifndef GL_TEXTURE26
2137 #define GL_TEXTURE26 0x84DA
2138 #endif
2139 #ifndef GL_TEXTURE27
2140 #define GL_TEXTURE27 0x84DB
2141 #endif
2142 #ifndef GL_TEXTURE28
2143 #define GL_TEXTURE28 0x84DC
2144 #endif
2145 #ifndef GL_TEXTURE29
2146 #define GL_TEXTURE29 0x84DD
2147 #endif
2148 #ifndef GL_TEXTURE_2D
2149 #define GL_TEXTURE_2D 0x0DE1
2150 #endif
2151 #ifndef GL_TEXTURE30
2152 #define GL_TEXTURE30 0x84DE
2153 #endif
2154 #ifndef GL_TEXTURE3
2155 #define GL_TEXTURE3 0x84C3
2156 #endif
2157 #ifndef GL_TEXTURE31
2158 #define GL_TEXTURE31 0x84DF
2159 #endif
2160 #ifndef GL_TEXTURE4
2161 #define GL_TEXTURE4 0x84C4
2162 #endif
2163 #ifndef GL_TEXTURE5
2164 #define GL_TEXTURE5 0x84C5
2165 #endif
2166 #ifndef GL_TEXTURE6
2167 #define GL_TEXTURE6 0x84C6
2168 #endif
2169 #ifndef GL_TEXTURE7
2170 #define GL_TEXTURE7 0x84C7
2171 #endif
2172 #ifndef GL_TEXTURE8
2173 #define GL_TEXTURE8 0x84C8
2174 #endif
2175 #ifndef GL_TEXTURE9
2176 #define GL_TEXTURE9 0x84C9
2177 #endif
2178 #ifndef GL_TEXTURE_BINDING_2D
2179 #define GL_TEXTURE_BINDING_2D 0x8069
2180 #endif
2181 #ifndef GL_TEXTURE_BINDING_CUBE_MAP
2182 #define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
2183 #endif
2184 #ifndef GL_TEXTURE_CUBE_MAP
2185 #define GL_TEXTURE_CUBE_MAP 0x8513
2186 #endif
2187 #ifndef GL_TEXTURE_CUBE_MAP_NEGATIVE_X
2188 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
2189 #endif
2190 #ifndef GL_TEXTURE_CUBE_MAP_NEGATIVE_Y
2191 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
2192 #endif
2193 #ifndef GL_TEXTURE_CUBE_MAP_NEGATIVE_Z
2194 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
2195 #endif
2196 #ifndef GL_TEXTURE_CUBE_MAP_POSITIVE_X
2197 #define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
2198 #endif
2199 #ifndef GL_TEXTURE_CUBE_MAP_POSITIVE_Y
2200 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
2201 #endif
2202 #ifndef GL_TEXTURE_CUBE_MAP_POSITIVE_Z
2203 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
2204 #endif
2205 #ifndef GL_TEXTURE_MAG_FILTER
2206 #define GL_TEXTURE_MAG_FILTER 0x2800
2207 #endif
2208 #ifndef GL_TEXTURE_MIN_FILTER
2209 #define GL_TEXTURE_MIN_FILTER 0x2801
2210 #endif
2211 #ifndef GL_TEXTURE_WRAP_S
2212 #define GL_TEXTURE_WRAP_S 0x2802
2213 #endif
2214 #ifndef GL_TEXTURE_WRAP_T
2215 #define GL_TEXTURE_WRAP_T 0x2803
2216 #endif
2217 #ifndef GL_TRIANGLE_FAN
2218 #define GL_TRIANGLE_FAN 0x0006
2219 #endif
2220 #ifndef GL_TRIANGLES
2221 #define GL_TRIANGLES 0x0004
2222 #endif
2223 #ifndef GL_TRIANGLE_STRIP
2224 #define GL_TRIANGLE_STRIP 0x0005
2225 #endif
2226 #ifndef GL_TRUE
2227 #define GL_TRUE 1
2228 #endif
2229 #ifndef GL_UNPACK_ALIGNMENT
2230 #define GL_UNPACK_ALIGNMENT 0x0CF5
2231 #endif
2232 #ifndef GL_UNSIGNED_BYTE
2233 #define GL_UNSIGNED_BYTE 0x1401
2234 #endif
2235 #ifndef GL_UNSIGNED_INT
2236 #define GL_UNSIGNED_INT 0x1405
2237 #endif
2238 #ifndef GL_UNSIGNED_SHORT
2239 #define GL_UNSIGNED_SHORT 0x1403
2240 #endif
2241 #ifndef GL_UNSIGNED_SHORT_4_4_4_4
2242 #define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
2243 #endif
2244 #ifndef GL_UNSIGNED_SHORT_5_5_5_1
2245 #define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
2246 #endif
2247 #ifndef GL_UNSIGNED_SHORT_5_6_5
2248 #define GL_UNSIGNED_SHORT_5_6_5 0x8363
2249 #endif
2250 #ifndef GL_VALIDATE_STATUS
2251 #define GL_VALIDATE_STATUS 0x8B83
2252 #endif
2253 #ifndef GL_VENDOR
2254 #define GL_VENDOR 0x1F00
2255 #endif
2256 #ifndef GL_VERSION
2257 #define GL_VERSION 0x1F02
2258 #endif
2259 #ifndef GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING
2260 #define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
2261 #endif
2262 #ifndef GL_VERTEX_ATTRIB_ARRAY_ENABLED
2263 #define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
2264 #endif
2265 #ifndef GL_VERTEX_ATTRIB_ARRAY_NORMALIZED
2266 #define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
2267 #endif
2268 #ifndef GL_VERTEX_ATTRIB_ARRAY_POINTER
2269 #define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
2270 #endif
2271 #ifndef GL_VERTEX_ATTRIB_ARRAY_SIZE
2272 #define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
2273 #endif
2274 #ifndef GL_VERTEX_ATTRIB_ARRAY_STRIDE
2275 #define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
2276 #endif
2277 #ifndef GL_VERTEX_ATTRIB_ARRAY_TYPE
2278 #define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
2279 #endif
2280 #ifndef GL_VERTEX_SHADER
2281 #define GL_VERTEX_SHADER 0x8B31
2282 #endif
2283 #ifndef GL_VIEWPORT
2284 #define GL_VIEWPORT 0x0BA2
2285 #endif
2286 #ifndef GL_ZERO
2287 #define GL_ZERO 0
2288 #endif
2289
2290 QT_END_NAMESPACE
2291
2292 QT_END_HEADER
2293
2294 #endif