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