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