Qt 4.8
qglfunctions.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/legal
5 **
6 ** This file is part of the QtOpenGL module of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia. For licensing terms and
14 ** conditions see http://qt.digia.com/licensing. For further information
15 ** use the contact form at http://qt.digia.com/contact-us.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 **
25 ** In addition, as a special exception, Digia gives you certain additional
26 ** rights. These rights are described in the Digia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 **
29 ** GNU General Public License Usage
30 ** Alternatively, this file may be used under the terms of the GNU
31 ** General Public License version 3.0 as published by the Free Software
32 ** Foundation and appearing in the file LICENSE.GPL included in the
33 ** packaging of this file. Please review the following information to
34 ** ensure the GNU General Public License version 3.0 requirements will be
35 ** met: http://www.gnu.org/copyleft/gpl.html.
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 
53 
55 
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 #ifndef Q_WS_MAC
63 # ifndef QGLF_APIENTRYP
64 # ifdef QGLF_APIENTRY
65 # define QGLF_APIENTRYP QGLF_APIENTRY *
66 # else
67 # define QGLF_APIENTRY
68 # define QGLF_APIENTRYP *
69 # endif
70 # endif
71 #else
72 # define QGLF_APIENTRY
73 # define QGLF_APIENTRYP *
74 #endif
75 
76 struct QGLFunctionsPrivate;
77 
78 // Undefine any macros from GLEW, qglextensions_p.h, etc that
79 // may interfere with the definition of QGLFunctions.
80 #undef glActiveTexture
81 #undef glAttachShader
82 #undef glBindAttribLocation
83 #undef glBindBuffer
84 #undef glBindFramebuffer
85 #undef glBindRenderbuffer
86 #undef glBlendColor
87 #undef glBlendEquation
88 #undef glBlendEquationSeparate
89 #undef glBlendFuncSeparate
90 #undef glBufferData
91 #undef glBufferSubData
92 #undef glCheckFramebufferStatus
93 #undef glClearDepthf
94 #undef glCompileShader
95 #undef glCompressedTexImage2D
96 #undef glCompressedTexSubImage2D
97 #undef glCreateProgram
98 #undef glCreateShader
99 #undef glDeleteBuffers
100 #undef glDeleteFramebuffers
101 #undef glDeleteProgram
102 #undef glDeleteRenderbuffers
103 #undef glDeleteShader
104 #undef glDepthRangef
105 #undef glDetachShader
106 #undef glDisableVertexAttribArray
107 #undef glEnableVertexAttribArray
108 #undef glFramebufferRenderbuffer
109 #undef glFramebufferTexture2D
110 #undef glGenBuffers
111 #undef glGenerateMipmap
112 #undef glGenFramebuffers
113 #undef glGenRenderbuffers
114 #undef glGetActiveAttrib
115 #undef glGetActiveUniform
116 #undef glGetAttachedShaders
117 #undef glGetAttribLocation
118 #undef glGetBufferParameteriv
119 #undef glGetFramebufferAttachmentParameteriv
120 #undef glGetProgramiv
121 #undef glGetProgramInfoLog
122 #undef glGetRenderbufferParameteriv
123 #undef glGetShaderiv
124 #undef glGetShaderInfoLog
125 #undef glGetShaderPrecisionFormat
126 #undef glGetShaderSource
127 #undef glGetUniformfv
128 #undef glGetUniformiv
129 #undef glGetUniformLocation
130 #undef glGetVertexAttribfv
131 #undef glGetVertexAttribiv
132 #undef glGetVertexAttribPointerv
133 #undef glIsBuffer
134 #undef glIsFramebuffer
135 #undef glIsProgram
136 #undef glIsRenderbuffer
137 #undef glIsShader
138 #undef glLinkProgram
139 #undef glReleaseShaderCompiler
140 #undef glRenderbufferStorage
141 #undef glSampleCoverage
142 #undef glShaderBinary
143 #undef glShaderSource
144 #undef glStencilFuncSeparate
145 #undef glStencilMaskSeparate
146 #undef glStencilOpSeparate
147 #undef glUniform1f
148 #undef glUniform1fv
149 #undef glUniform1i
150 #undef glUniform1iv
151 #undef glUniform2f
152 #undef glUniform2fv
153 #undef glUniform2i
154 #undef glUniform2iv
155 #undef glUniform3f
156 #undef glUniform3fv
157 #undef glUniform3i
158 #undef glUniform3iv
159 #undef glUniform4f
160 #undef glUniform4fv
161 #undef glUniform4i
162 #undef glUniform4iv
163 #undef glUniformMatrix2fv
164 #undef glUniformMatrix3fv
165 #undef glUniformMatrix4fv
166 #undef glUseProgram
167 #undef glValidateProgram
168 #undef glVertexAttrib1f
169 #undef glVertexAttrib1fv
170 #undef glVertexAttrib2f
171 #undef glVertexAttrib2fv
172 #undef glVertexAttrib3f
173 #undef glVertexAttrib3fv
174 #undef glVertexAttrib4f
175 #undef glVertexAttrib4fv
176 #undef glVertexAttribPointer
177 
179 {
180 public:
181  QGLFunctions();
182  explicit QGLFunctions(const QGLContext *context);
184 
186  {
187  Multitexture = 0x0001,
188  Shaders = 0x0002,
189  Buffers = 0x0004,
190  Framebuffers = 0x0008,
191  BlendColor = 0x0010,
192  BlendEquation = 0x0020,
193  BlendEquationSeparate = 0x0040,
194  BlendFuncSeparate = 0x0080,
195  BlendSubtract = 0x0100,
196  CompressedTextures = 0x0200,
197  Multisample = 0x0400,
198  StencilSeparate = 0x0800,
199  NPOTTextures = 0x1000
200  };
201  Q_DECLARE_FLAGS(OpenGLFeatures, OpenGLFeature)
202 
203  QGLFunctions::OpenGLFeatures openGLFeatures() const;
204  bool hasOpenGLFeature(QGLFunctions::OpenGLFeature feature) const;
205 
206  void initializeGLFunctions(const QGLContext *context = 0);
207 
208  void glActiveTexture(GLenum texture);
209  void glAttachShader(GLuint program, GLuint shader);
210  void glBindAttribLocation(GLuint program, GLuint index, const char* name);
211  void glBindBuffer(GLenum target, GLuint buffer);
212  void glBindFramebuffer(GLenum target, GLuint framebuffer);
213  void glBindRenderbuffer(GLenum target, GLuint renderbuffer);
214  void glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
215  void glBlendEquation(GLenum mode);
216  void glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha);
217  void glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
218  void glBufferData(GLenum target, qgl_GLsizeiptr size, const void* data, GLenum usage);
219  void glBufferSubData(GLenum target, qgl_GLintptr offset, qgl_GLsizeiptr size, const void* data);
221  void glClearDepthf(GLclampf depth);
222  void glCompileShader(GLuint shader);
223  void glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data);
224  void glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data);
225  GLuint glCreateProgram();
226  GLuint glCreateShader(GLenum type);
227  void glDeleteBuffers(GLsizei n, const GLuint* buffers);
228  void glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers);
229  void glDeleteProgram(GLuint program);
230  void glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers);
231  void glDeleteShader(GLuint shader);
232  void glDepthRangef(GLclampf zNear, GLclampf zFar);
233  void glDetachShader(GLuint program, GLuint shader);
234  void glDisableVertexAttribArray(GLuint index);
235  void glEnableVertexAttribArray(GLuint index);
236  void glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
237  void glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
238  void glGenBuffers(GLsizei n, GLuint* buffers);
239  void glGenerateMipmap(GLenum target);
240  void glGenFramebuffers(GLsizei n, GLuint* framebuffers);
241  void glGenRenderbuffers(GLsizei n, GLuint* renderbuffers);
242  void glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name);
243  void glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name);
244  void glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders);
245  int glGetAttribLocation(GLuint program, const char* name);
246  void glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params);
247  void glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params);
248  void glGetProgramiv(GLuint program, GLenum pname, GLint* params);
249  void glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, char* infolog);
250  void glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params);
251  void glGetShaderiv(GLuint shader, GLenum pname, GLint* params);
252  void glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog);
253  void glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
254  void glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, char* source);
255  void glGetUniformfv(GLuint program, GLint location, GLfloat* params);
256  void glGetUniformiv(GLuint program, GLint location, GLint* params);
257  int glGetUniformLocation(GLuint program, const char* name);
258  void glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params);
259  void glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params);
260  void glGetVertexAttribPointerv(GLuint index, GLenum pname, void** pointer);
261  GLboolean glIsBuffer(GLuint buffer);
262  GLboolean glIsFramebuffer(GLuint framebuffer);
263  GLboolean glIsProgram(GLuint program);
264  GLboolean glIsRenderbuffer(GLuint renderbuffer);
265  GLboolean glIsShader(GLuint shader);
266  void glLinkProgram(GLuint program);
267  void glReleaseShaderCompiler();
268  void glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
269  void glSampleCoverage(GLclampf value, GLboolean invert);
270  void glShaderBinary(GLint n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLint length);
271  void glShaderSource(GLuint shader, GLsizei count, const char** string, const GLint* length);
272  void glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask);
273  void glStencilMaskSeparate(GLenum face, GLuint mask);
274  void glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
275  void glUniform1f(GLint location, GLfloat x);
276  void glUniform1fv(GLint location, GLsizei count, const GLfloat* v);
277  void glUniform1i(GLint location, GLint x);
278  void glUniform1iv(GLint location, GLsizei count, const GLint* v);
279  void glUniform2f(GLint location, GLfloat x, GLfloat y);
280  void glUniform2fv(GLint location, GLsizei count, const GLfloat* v);
281  void glUniform2i(GLint location, GLint x, GLint y);
282  void glUniform2iv(GLint location, GLsizei count, const GLint* v);
283  void glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z);
284  void glUniform3fv(GLint location, GLsizei count, const GLfloat* v);
285  void glUniform3i(GLint location, GLint x, GLint y, GLint z);
286  void glUniform3iv(GLint location, GLsizei count, const GLint* v);
287  void glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
288  void glUniform4fv(GLint location, GLsizei count, const GLfloat* v);
289  void glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w);
290  void glUniform4iv(GLint location, GLsizei count, const GLint* v);
291  void glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
292  void glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
293  void glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
294  void glUseProgram(GLuint program);
295  void glValidateProgram(GLuint program);
296  void glVertexAttrib1f(GLuint indx, GLfloat x);
297  void glVertexAttrib1fv(GLuint indx, const GLfloat* values);
298  void glVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y);
299  void glVertexAttrib2fv(GLuint indx, const GLfloat* values);
300  void glVertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z);
301  void glVertexAttrib3fv(GLuint indx, const GLfloat* values);
302  void glVertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
303  void glVertexAttrib4fv(GLuint indx, const GLfloat* values);
304  void glVertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr);
305 
306 private:
308  static bool isInitialized(const QGLFunctionsPrivate *d) { return d != 0; }
309 };
310 
311 Q_DECLARE_OPERATORS_FOR_FLAGS(QGLFunctions::OpenGLFeatures)
312 
314 {
315  QGLFunctionsPrivate(const QGLContext *context = 0);
316 
317 #ifndef QT_OPENGL_ES_2
318  void (QGLF_APIENTRYP activeTexture)(GLenum texture);
319  void (QGLF_APIENTRYP attachShader)(GLuint program, GLuint shader);
320  void (QGLF_APIENTRYP bindAttribLocation)(GLuint program, GLuint index, const char* name);
321  void (QGLF_APIENTRYP bindBuffer)(GLenum target, GLuint buffer);
322  void (QGLF_APIENTRYP bindFramebuffer)(GLenum target, GLuint framebuffer);
323  void (QGLF_APIENTRYP bindRenderbuffer)(GLenum target, GLuint renderbuffer);
324  void (QGLF_APIENTRYP blendColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
325  void (QGLF_APIENTRYP blendEquation)(GLenum mode);
326  void (QGLF_APIENTRYP blendEquationSeparate)(GLenum modeRGB, GLenum modeAlpha);
327  void (QGLF_APIENTRYP blendFuncSeparate)(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
328  void (QGLF_APIENTRYP bufferData)(GLenum target, qgl_GLsizeiptr size, const void* data, GLenum usage);
329  void (QGLF_APIENTRYP bufferSubData)(GLenum target, qgl_GLintptr offset, qgl_GLsizeiptr size, const void* data);
330  GLenum (QGLF_APIENTRYP checkFramebufferStatus)(GLenum target);
331  void (QGLF_APIENTRYP compileShader)(GLuint shader);
332  void (QGLF_APIENTRYP compressedTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data);
333  void (QGLF_APIENTRYP compressedTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data);
334  GLuint (QGLF_APIENTRYP createProgram)();
335  GLuint (QGLF_APIENTRYP createShader)(GLenum type);
336  void (QGLF_APIENTRYP deleteBuffers)(GLsizei n, const GLuint* buffers);
337  void (QGLF_APIENTRYP deleteFramebuffers)(GLsizei n, const GLuint* framebuffers);
338  void (QGLF_APIENTRYP deleteProgram)(GLuint program);
339  void (QGLF_APIENTRYP deleteRenderbuffers)(GLsizei n, const GLuint* renderbuffers);
340  void (QGLF_APIENTRYP deleteShader)(GLuint shader);
341  void (QGLF_APIENTRYP detachShader)(GLuint program, GLuint shader);
342  void (QGLF_APIENTRYP disableVertexAttribArray)(GLuint index);
343  void (QGLF_APIENTRYP enableVertexAttribArray)(GLuint index);
344  void (QGLF_APIENTRYP framebufferRenderbuffer)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
345  void (QGLF_APIENTRYP framebufferTexture2D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
346  void (QGLF_APIENTRYP genBuffers)(GLsizei n, GLuint* buffers);
347  void (QGLF_APIENTRYP generateMipmap)(GLenum target);
348  void (QGLF_APIENTRYP genFramebuffers)(GLsizei n, GLuint* framebuffers);
349  void (QGLF_APIENTRYP genRenderbuffers)(GLsizei n, GLuint* renderbuffers);
350  void (QGLF_APIENTRYP getActiveAttrib)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name);
351  void (QGLF_APIENTRYP getActiveUniform)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name);
352  void (QGLF_APIENTRYP getAttachedShaders)(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders);
353  int (QGLF_APIENTRYP getAttribLocation)(GLuint program, const char* name);
354  void (QGLF_APIENTRYP getBufferParameteriv)(GLenum target, GLenum pname, GLint* params);
355  void (QGLF_APIENTRYP getFramebufferAttachmentParameteriv)(GLenum target, GLenum attachment, GLenum pname, GLint* params);
356  void (QGLF_APIENTRYP getProgramiv)(GLuint program, GLenum pname, GLint* params);
357  void (QGLF_APIENTRYP getProgramInfoLog)(GLuint program, GLsizei bufsize, GLsizei* length, char* infolog);
358  void (QGLF_APIENTRYP getRenderbufferParameteriv)(GLenum target, GLenum pname, GLint* params);
359  void (QGLF_APIENTRYP getShaderiv)(GLuint shader, GLenum pname, GLint* params);
360  void (QGLF_APIENTRYP getShaderInfoLog)(GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog);
361  void (QGLF_APIENTRYP getShaderPrecisionFormat)(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
362  void (QGLF_APIENTRYP getShaderSource)(GLuint shader, GLsizei bufsize, GLsizei* length, char* source);
363  void (QGLF_APIENTRYP getUniformfv)(GLuint program, GLint location, GLfloat* params);
364  void (QGLF_APIENTRYP getUniformiv)(GLuint program, GLint location, GLint* params);
365  int (QGLF_APIENTRYP getUniformLocation)(GLuint program, const char* name);
366  void (QGLF_APIENTRYP getVertexAttribfv)(GLuint index, GLenum pname, GLfloat* params);
367  void (QGLF_APIENTRYP getVertexAttribiv)(GLuint index, GLenum pname, GLint* params);
368  void (QGLF_APIENTRYP getVertexAttribPointerv)(GLuint index, GLenum pname, void** pointer);
369  GLboolean (QGLF_APIENTRYP isBuffer)(GLuint buffer);
370  GLboolean (QGLF_APIENTRYP isFramebuffer)(GLuint framebuffer);
371  GLboolean (QGLF_APIENTRYP isProgram)(GLuint program);
372  GLboolean (QGLF_APIENTRYP isRenderbuffer)(GLuint renderbuffer);
373  GLboolean (QGLF_APIENTRYP isShader)(GLuint shader);
374  void (QGLF_APIENTRYP linkProgram)(GLuint program);
375  void (QGLF_APIENTRYP releaseShaderCompiler)();
376  void (QGLF_APIENTRYP renderbufferStorage)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
377  void (QGLF_APIENTRYP sampleCoverage)(GLclampf value, GLboolean invert);
378  void (QGLF_APIENTRYP shaderBinary)(GLint n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLint length);
379  void (QGLF_APIENTRYP shaderSource)(GLuint shader, GLsizei count, const char** string, const GLint* length);
380  void (QGLF_APIENTRYP stencilFuncSeparate)(GLenum face, GLenum func, GLint ref, GLuint mask);
381  void (QGLF_APIENTRYP stencilMaskSeparate)(GLenum face, GLuint mask);
382  void (QGLF_APIENTRYP stencilOpSeparate)(GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
383  void (QGLF_APIENTRYP uniform1f)(GLint location, GLfloat x);
384  void (QGLF_APIENTRYP uniform1fv)(GLint location, GLsizei count, const GLfloat* v);
385  void (QGLF_APIENTRYP uniform1i)(GLint location, GLint x);
386  void (QGLF_APIENTRYP uniform1iv)(GLint location, GLsizei count, const GLint* v);
387  void (QGLF_APIENTRYP uniform2f)(GLint location, GLfloat x, GLfloat y);
388  void (QGLF_APIENTRYP uniform2fv)(GLint location, GLsizei count, const GLfloat* v);
389  void (QGLF_APIENTRYP uniform2i)(GLint location, GLint x, GLint y);
390  void (QGLF_APIENTRYP uniform2iv)(GLint location, GLsizei count, const GLint* v);
391  void (QGLF_APIENTRYP uniform3f)(GLint location, GLfloat x, GLfloat y, GLfloat z);
392  void (QGLF_APIENTRYP uniform3fv)(GLint location, GLsizei count, const GLfloat* v);
393  void (QGLF_APIENTRYP uniform3i)(GLint location, GLint x, GLint y, GLint z);
394  void (QGLF_APIENTRYP uniform3iv)(GLint location, GLsizei count, const GLint* v);
395  void (QGLF_APIENTRYP uniform4f)(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
396  void (QGLF_APIENTRYP uniform4fv)(GLint location, GLsizei count, const GLfloat* v);
397  void (QGLF_APIENTRYP uniform4i)(GLint location, GLint x, GLint y, GLint z, GLint w);
398  void (QGLF_APIENTRYP uniform4iv)(GLint location, GLsizei count, const GLint* v);
399  void (QGLF_APIENTRYP uniformMatrix2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
400  void (QGLF_APIENTRYP uniformMatrix3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
401  void (QGLF_APIENTRYP uniformMatrix4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
402  void (QGLF_APIENTRYP useProgram)(GLuint program);
403  void (QGLF_APIENTRYP validateProgram)(GLuint program);
404  void (QGLF_APIENTRYP vertexAttrib1f)(GLuint indx, GLfloat x);
405  void (QGLF_APIENTRYP vertexAttrib1fv)(GLuint indx, const GLfloat* values);
406  void (QGLF_APIENTRYP vertexAttrib2f)(GLuint indx, GLfloat x, GLfloat y);
407  void (QGLF_APIENTRYP vertexAttrib2fv)(GLuint indx, const GLfloat* values);
408  void (QGLF_APIENTRYP vertexAttrib3f)(GLuint indx, GLfloat x, GLfloat y, GLfloat z);
409  void (QGLF_APIENTRYP vertexAttrib3fv)(GLuint indx, const GLfloat* values);
410  void (QGLF_APIENTRYP vertexAttrib4f)(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
411  void (QGLF_APIENTRYP vertexAttrib4fv)(GLuint indx, const GLfloat* values);
412  void (QGLF_APIENTRYP vertexAttribPointer)(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr);
413 #endif
414 };
415 
417 {
418 #if defined(QT_OPENGL_ES_1) || defined(QT_OPENGL_ES_2)
419  ::glActiveTexture(texture);
420 #else
422  d_ptr->activeTexture(texture);
423 #endif
424 }
425 
426 inline void QGLFunctions::glAttachShader(GLuint program, GLuint shader)
427 {
428 #if defined(QT_OPENGL_ES_2)
429  ::glAttachShader(program, shader);
430 #else
432  d_ptr->attachShader(program, shader);
433 #endif
434 }
435 
436 inline void QGLFunctions::glBindAttribLocation(GLuint program, GLuint index, const char* name)
437 {
438 #if defined(QT_OPENGL_ES_2)
439  ::glBindAttribLocation(program, index, name);
440 #else
442  d_ptr->bindAttribLocation(program, index, name);
443 #endif
444 }
445 
446 inline void QGLFunctions::glBindBuffer(GLenum target, GLuint buffer)
447 {
448 #if defined(QT_OPENGL_ES_1) || defined(QT_OPENGL_ES_2)
449  ::glBindBuffer(target, buffer);
450 #else
452  d_ptr->bindBuffer(target, buffer);
453 #endif
454 }
455 
456 inline void QGLFunctions::glBindFramebuffer(GLenum target, GLuint framebuffer)
457 {
458 #if defined(QT_OPENGL_ES_2)
459  ::glBindFramebuffer(target, framebuffer);
460 #else
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
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
482  d_ptr->blendColor(red, green, blue, alpha);
483 #endif
484 }
485 
487 {
488 #if defined(QT_OPENGL_ES_2)
489  ::glBlendEquation(mode);
490 #else
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
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
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_1) || defined(QT_OPENGL_ES_2)
519  ::glBufferData(target, size, data, usage);
520 #else
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_1) || defined(QT_OPENGL_ES_2)
529  ::glBufferSubData(target, offset, size, data);
530 #else
532  d_ptr->bufferSubData(target, offset, size, data);
533 #endif
534 }
535 
537 {
538 #if defined(QT_OPENGL_ES_2)
540 #else
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
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_1) || defined(QT_OPENGL_ES_2)
568  ::glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data);
569 #else
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_1) || defined(QT_OPENGL_ES_2)
578  ::glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data);
579 #else
581  d_ptr->compressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data);
582 #endif
583 }
584 
586 {
587 #if defined(QT_OPENGL_ES_2)
589 #else
591  return d_ptr->createProgram();
592 #endif
593 }
594 
596 {
597 #if defined(QT_OPENGL_ES_2)
599 #else
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_1) || defined(QT_OPENGL_ES_2)
608  ::glDeleteBuffers(n, buffers);
609 #else
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
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
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
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
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
670  d_ptr->detachShader(program, shader);
671 #endif
672 }
673 
675 {
676 #if defined(QT_OPENGL_ES_2)
678 #else
680  d_ptr->disableVertexAttribArray(index);
681 #endif
682 }
683 
685 {
686 #if defined(QT_OPENGL_ES_2)
688 #else
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
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
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_1) || defined(QT_OPENGL_ES_2)
717  ::glGenBuffers(n, buffers);
718 #else
720  d_ptr->genBuffers(n, buffers);
721 #endif
722 }
723 
725 {
726 #if defined(QT_OPENGL_ES_2)
727  ::glGenerateMipmap(target);
728 #else
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
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
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
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
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
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
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
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
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
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
830  d_ptr->getProgramInfoLog(program, bufsize, length, infolog);
831 #endif
832 }
833 
835 {
836 #if defined(QT_OPENGL_ES_2)
837  ::glGetRenderbufferParameteriv(target, pname, params);
838 #else
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
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
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
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
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
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
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
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
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
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
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_1) || defined(QT_OPENGL_ES_2)
947  return ::glIsBuffer(buffer);
948 #else
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
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
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
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
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
1000  d_ptr->linkProgram(program);
1001 #endif
1002 }
1003 
1005 {
1006 #if defined(QT_OPENGL_ES_2)
1007  ::glReleaseShaderCompiler();
1008 #else
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
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_1) || defined(QT_OPENGL_ES_2)
1027  ::glSampleCoverage(value, invert);
1028 #else
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
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
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
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
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
1080  d_ptr->stencilOpSeparate(face, fail, zfail, zpass);
1081 #endif
1082 }
1083 
1085 {
1086 #if defined(QT_OPENGL_ES_2)
1087  ::glUniform1f(location, x);
1088 #else
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
1100  d_ptr->uniform1fv(location, count, v);
1101 #endif
1102 }
1103 
1105 {
1106 #if defined(QT_OPENGL_ES_2)
1107  ::glUniform1i(location, x);
1108 #else
1110  d_ptr->uniform1i(location, x);
1111 #endif
1112 }
1113 
1115 {
1116 #if defined(QT_OPENGL_ES_2)
1117  ::glUniform1iv(location, count, v);
1118 #else
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
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
1140  d_ptr->uniform2fv(location, count, v);
1141 #endif
1142 }
1143 
1145 {
1146 #if defined(QT_OPENGL_ES_2)
1147  ::glUniform2i(location, x, y);
1148 #else
1150  d_ptr->uniform2i(location, x, y);
1151 #endif
1152 }
1153 
1155 {
1156 #if defined(QT_OPENGL_ES_2)
1157  ::glUniform2iv(location, count, v);
1158 #else
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
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
1180  d_ptr->uniform3fv(location, count, v);
1181 #endif
1182 }
1183 
1185 {
1186 #if defined(QT_OPENGL_ES_2)
1187  ::glUniform3i(location, x, y, z);
1188 #else
1190  d_ptr->uniform3i(location, x, y, z);
1191 #endif
1192 }
1193 
1195 {
1196 #if defined(QT_OPENGL_ES_2)
1197  ::glUniform3iv(location, count, v);
1198 #else
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
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
1220  d_ptr->uniform4fv(location, count, v);
1221 #endif
1222 }
1223 
1225 {
1226 #if defined(QT_OPENGL_ES_2)
1227  ::glUniform4i(location, x, y, z, w);
1228 #else
1230  d_ptr->uniform4i(location, x, y, z, w);
1231 #endif
1232 }
1233 
1235 {
1236 #if defined(QT_OPENGL_ES_2)
1237  ::glUniform4iv(location, count, v);
1238 #else
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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_SAMPLE_ALPHA_TO_COVERAGE
1949 #define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
1950 #endif
1951 #ifndef GL_SAMPLE_BUFFERS
1952 #define GL_SAMPLE_BUFFERS 0x80A8
1953 #endif
1954 #ifndef GL_SAMPLE_COVERAGE
1955 #define GL_SAMPLE_COVERAGE 0x80A0
1956 #endif
1957 #ifndef GL_SAMPLE_COVERAGE_INVERT
1958 #define GL_SAMPLE_COVERAGE_INVERT 0x80AB
1959 #endif
1960 #ifndef GL_SAMPLE_COVERAGE_VALUE
1961 #define GL_SAMPLE_COVERAGE_VALUE 0x80AA
1962 #endif
1963 #ifndef GL_SAMPLER_2D
1964 #define GL_SAMPLER_2D 0x8B5E
1965 #endif
1966 #ifndef GL_SAMPLER_CUBE
1967 #define GL_SAMPLER_CUBE 0x8B60
1968 #endif
1969 #ifndef GL_SAMPLES
1970 #define GL_SAMPLES 0x80A9
1971 #endif
1972 #ifndef GL_SCISSOR_BOX
1973 #define GL_SCISSOR_BOX 0x0C10
1974 #endif
1975 #ifndef GL_SCISSOR_TEST
1976 #define GL_SCISSOR_TEST 0x0C11
1977 #endif
1978 #ifndef GL_SHADER_BINARY_FORMATS
1979 #define GL_SHADER_BINARY_FORMATS 0x8DF8
1980 #endif
1981 #ifndef GL_SHADER_COMPILER
1982 #define GL_SHADER_COMPILER 0x8DFA
1983 #endif
1984 #ifndef GL_SHADER_SOURCE_LENGTH
1985 #define GL_SHADER_SOURCE_LENGTH 0x8B88
1986 #endif
1987 #ifndef GL_SHADER_TYPE
1988 #define GL_SHADER_TYPE 0x8B4F
1989 #endif
1990 #ifndef GL_SHADING_LANGUAGE_VERSION
1991 #define GL_SHADING_LANGUAGE_VERSION 0x8B8C
1992 #endif
1993 #ifndef GL_SHORT
1994 #define GL_SHORT 0x1402
1995 #endif
1996 #ifndef GL_SRC_ALPHA
1997 #define GL_SRC_ALPHA 0x0302
1998 #endif
1999 #ifndef GL_SRC_ALPHA_SATURATE
2000 #define GL_SRC_ALPHA_SATURATE 0x0308
2001 #endif
2002 #ifndef GL_SRC_COLOR
2003 #define GL_SRC_COLOR 0x0300
2004 #endif
2005 #ifndef GL_STATIC_DRAW
2006 #define GL_STATIC_DRAW 0x88E4
2007 #endif
2008 #ifndef GL_STENCIL_ATTACHMENT
2009 #define GL_STENCIL_ATTACHMENT 0x8D20
2010 #endif
2011 #ifndef GL_STENCIL_BACK_FAIL
2012 #define GL_STENCIL_BACK_FAIL 0x8801
2013 #endif
2014 #ifndef GL_STENCIL_BACK_FUNC
2015 #define GL_STENCIL_BACK_FUNC 0x8800
2016 #endif
2017 #ifndef GL_STENCIL_BACK_PASS_DEPTH_FAIL
2018 #define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
2019 #endif
2020 #ifndef GL_STENCIL_BACK_PASS_DEPTH_PASS
2021 #define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
2022 #endif
2023 #ifndef GL_STENCIL_BACK_REF
2024 #define GL_STENCIL_BACK_REF 0x8CA3
2025 #endif
2026 #ifndef GL_STENCIL_BACK_VALUE_MASK
2027 #define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
2028 #endif
2029 #ifndef GL_STENCIL_BACK_WRITEMASK
2030 #define GL_STENCIL_BACK_WRITEMASK 0x8CA5
2031 #endif
2032 #ifndef GL_STENCIL_BITS
2033 #define GL_STENCIL_BITS 0x0D57
2034 #endif
2035 #ifndef GL_STENCIL_BUFFER_BIT
2036 #define GL_STENCIL_BUFFER_BIT 0x00000400
2037 #endif
2038 #ifndef GL_STENCIL_CLEAR_VALUE
2039 #define GL_STENCIL_CLEAR_VALUE 0x0B91
2040 #endif
2041 #ifndef GL_STENCIL_FAIL
2042 #define GL_STENCIL_FAIL 0x0B94
2043 #endif
2044 #ifndef GL_STENCIL_FUNC
2045 #define GL_STENCIL_FUNC 0x0B92
2046 #endif
2047 #ifndef GL_STENCIL_INDEX
2048 #define GL_STENCIL_INDEX 0x1901
2049 #endif
2050 #ifndef GL_STENCIL_INDEX8
2051 #define GL_STENCIL_INDEX8 0x8D48
2052 #endif
2053 #ifndef GL_STENCIL_PASS_DEPTH_FAIL
2054 #define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
2055 #endif
2056 #ifndef GL_STENCIL_PASS_DEPTH_PASS
2057 #define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
2058 #endif
2059 #ifndef GL_STENCIL_REF
2060 #define GL_STENCIL_REF 0x0B97
2061 #endif
2062 #ifndef GL_STENCIL_TEST
2063 #define GL_STENCIL_TEST 0x0B90
2064 #endif
2065 #ifndef GL_STENCIL_VALUE_MASK
2066 #define GL_STENCIL_VALUE_MASK 0x0B93
2067 #endif
2068 #ifndef GL_STENCIL_WRITEMASK
2069 #define GL_STENCIL_WRITEMASK 0x0B98
2070 #endif
2071 #ifndef GL_STREAM_DRAW
2072 #define GL_STREAM_DRAW 0x88E0
2073 #endif
2074 #ifndef GL_SUBPIXEL_BITS
2075 #define GL_SUBPIXEL_BITS 0x0D50
2076 #endif
2077 #ifndef GL_TEXTURE0
2078 #define GL_TEXTURE0 0x84C0
2079 #endif
2080 #ifndef GL_TEXTURE
2081 #define GL_TEXTURE 0x1702
2082 #endif
2083 #ifndef GL_TEXTURE10
2084 #define GL_TEXTURE10 0x84CA
2085 #endif
2086 #ifndef GL_TEXTURE1
2087 #define GL_TEXTURE1 0x84C1
2088 #endif
2089 #ifndef GL_TEXTURE11
2090 #define GL_TEXTURE11 0x84CB
2091 #endif
2092 #ifndef GL_TEXTURE12
2093 #define GL_TEXTURE12 0x84CC
2094 #endif
2095 #ifndef GL_TEXTURE13
2096 #define GL_TEXTURE13 0x84CD
2097 #endif
2098 #ifndef GL_TEXTURE14
2099 #define GL_TEXTURE14 0x84CE
2100 #endif
2101 #ifndef GL_TEXTURE15
2102 #define GL_TEXTURE15 0x84CF
2103 #endif
2104 #ifndef GL_TEXTURE16
2105 #define GL_TEXTURE16 0x84D0
2106 #endif
2107 #ifndef GL_TEXTURE17
2108 #define GL_TEXTURE17 0x84D1
2109 #endif
2110 #ifndef GL_TEXTURE18
2111 #define GL_TEXTURE18 0x84D2
2112 #endif
2113 #ifndef GL_TEXTURE19
2114 #define GL_TEXTURE19 0x84D3
2115 #endif
2116 #ifndef GL_TEXTURE20
2117 #define GL_TEXTURE20 0x84D4
2118 #endif
2119 #ifndef GL_TEXTURE2
2120 #define GL_TEXTURE2 0x84C2
2121 #endif
2122 #ifndef GL_TEXTURE21
2123 #define GL_TEXTURE21 0x84D5
2124 #endif
2125 #ifndef GL_TEXTURE22
2126 #define GL_TEXTURE22 0x84D6
2127 #endif
2128 #ifndef GL_TEXTURE23
2129 #define GL_TEXTURE23 0x84D7
2130 #endif
2131 #ifndef GL_TEXTURE24
2132 #define GL_TEXTURE24 0x84D8
2133 #endif
2134 #ifndef GL_TEXTURE25
2135 #define GL_TEXTURE25 0x84D9
2136 #endif
2137 #ifndef GL_TEXTURE26
2138 #define GL_TEXTURE26 0x84DA
2139 #endif
2140 #ifndef GL_TEXTURE27
2141 #define GL_TEXTURE27 0x84DB
2142 #endif
2143 #ifndef GL_TEXTURE28
2144 #define GL_TEXTURE28 0x84DC
2145 #endif
2146 #ifndef GL_TEXTURE29
2147 #define GL_TEXTURE29 0x84DD
2148 #endif
2149 #ifndef GL_TEXTURE_2D
2150 #define GL_TEXTURE_2D 0x0DE1
2151 #endif
2152 #ifndef GL_TEXTURE30
2153 #define GL_TEXTURE30 0x84DE
2154 #endif
2155 #ifndef GL_TEXTURE3
2156 #define GL_TEXTURE3 0x84C3
2157 #endif
2158 #ifndef GL_TEXTURE31
2159 #define GL_TEXTURE31 0x84DF
2160 #endif
2161 #ifndef GL_TEXTURE4
2162 #define GL_TEXTURE4 0x84C4
2163 #endif
2164 #ifndef GL_TEXTURE5
2165 #define GL_TEXTURE5 0x84C5
2166 #endif
2167 #ifndef GL_TEXTURE6
2168 #define GL_TEXTURE6 0x84C6
2169 #endif
2170 #ifndef GL_TEXTURE7
2171 #define GL_TEXTURE7 0x84C7
2172 #endif
2173 #ifndef GL_TEXTURE8
2174 #define GL_TEXTURE8 0x84C8
2175 #endif
2176 #ifndef GL_TEXTURE9
2177 #define GL_TEXTURE9 0x84C9
2178 #endif
2179 #ifndef GL_TEXTURE_BINDING_2D
2180 #define GL_TEXTURE_BINDING_2D 0x8069
2181 #endif
2182 #ifndef GL_TEXTURE_BINDING_CUBE_MAP
2183 #define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
2184 #endif
2185 #ifndef GL_TEXTURE_CUBE_MAP
2186 #define GL_TEXTURE_CUBE_MAP 0x8513
2187 #endif
2188 #ifndef GL_TEXTURE_CUBE_MAP_NEGATIVE_X
2189 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
2190 #endif
2191 #ifndef GL_TEXTURE_CUBE_MAP_NEGATIVE_Y
2192 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
2193 #endif
2194 #ifndef GL_TEXTURE_CUBE_MAP_NEGATIVE_Z
2195 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
2196 #endif
2197 #ifndef GL_TEXTURE_CUBE_MAP_POSITIVE_X
2198 #define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
2199 #endif
2200 #ifndef GL_TEXTURE_CUBE_MAP_POSITIVE_Y
2201 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
2202 #endif
2203 #ifndef GL_TEXTURE_CUBE_MAP_POSITIVE_Z
2204 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
2205 #endif
2206 #ifndef GL_TEXTURE_MAG_FILTER
2207 #define GL_TEXTURE_MAG_FILTER 0x2800
2208 #endif
2209 #ifndef GL_TEXTURE_MIN_FILTER
2210 #define GL_TEXTURE_MIN_FILTER 0x2801
2211 #endif
2212 #ifndef GL_TEXTURE_WRAP_S
2213 #define GL_TEXTURE_WRAP_S 0x2802
2214 #endif
2215 #ifndef GL_TEXTURE_WRAP_T
2216 #define GL_TEXTURE_WRAP_T 0x2803
2217 #endif
2218 #ifndef GL_TRIANGLE_FAN
2219 #define GL_TRIANGLE_FAN 0x0006
2220 #endif
2221 #ifndef GL_TRIANGLES
2222 #define GL_TRIANGLES 0x0004
2223 #endif
2224 #ifndef GL_TRIANGLE_STRIP
2225 #define GL_TRIANGLE_STRIP 0x0005
2226 #endif
2227 #ifndef GL_TRUE
2228 #define GL_TRUE 1
2229 #endif
2230 #ifndef GL_UNPACK_ALIGNMENT
2231 #define GL_UNPACK_ALIGNMENT 0x0CF5
2232 #endif
2233 #ifndef GL_UNSIGNED_BYTE
2234 #define GL_UNSIGNED_BYTE 0x1401
2235 #endif
2236 #ifndef GL_UNSIGNED_INT
2237 #define GL_UNSIGNED_INT 0x1405
2238 #endif
2239 #ifndef GL_UNSIGNED_SHORT
2240 #define GL_UNSIGNED_SHORT 0x1403
2241 #endif
2242 #ifndef GL_UNSIGNED_SHORT_4_4_4_4
2243 #define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
2244 #endif
2245 #ifndef GL_UNSIGNED_SHORT_5_5_5_1
2246 #define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
2247 #endif
2248 #ifndef GL_UNSIGNED_SHORT_5_6_5
2249 #define GL_UNSIGNED_SHORT_5_6_5 0x8363
2250 #endif
2251 #ifndef GL_VALIDATE_STATUS
2252 #define GL_VALIDATE_STATUS 0x8B83
2253 #endif
2254 #ifndef GL_VENDOR
2255 #define GL_VENDOR 0x1F00
2256 #endif
2257 #ifndef GL_VERSION
2258 #define GL_VERSION 0x1F02
2259 #endif
2260 #ifndef GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING
2261 #define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
2262 #endif
2263 #ifndef GL_VERTEX_ATTRIB_ARRAY_ENABLED
2264 #define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
2265 #endif
2266 #ifndef GL_VERTEX_ATTRIB_ARRAY_NORMALIZED
2267 #define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
2268 #endif
2269 #ifndef GL_VERTEX_ATTRIB_ARRAY_POINTER
2270 #define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
2271 #endif
2272 #ifndef GL_VERTEX_ATTRIB_ARRAY_SIZE
2273 #define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
2274 #endif
2275 #ifndef GL_VERTEX_ATTRIB_ARRAY_STRIDE
2276 #define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
2277 #endif
2278 #ifndef GL_VERTEX_ATTRIB_ARRAY_TYPE
2279 #define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
2280 #endif
2281 #ifndef GL_VERTEX_SHADER
2282 #define GL_VERTEX_SHADER 0x8B31
2283 #endif
2284 #ifndef GL_VIEWPORT
2285 #define GL_VIEWPORT 0x0BA2
2286 #endif
2287 #ifndef GL_ZERO
2288 #define GL_ZERO 0
2289 #endif
2290 
2292 
2294 
2295 #endif
double d
Definition: qnumeric_p.h:62
~QGLFunctions()
Destroys this function resolver.
Definition: qglfunctions.h:183
QGLFunctionsPrivate * d_ptr
Definition: qglfunctions.h:307
void glUniform3fv(GLint location, GLsizei count, const GLfloat *v)
Convenience function that calls glUniform3fv(location, count, v).
const char * name
Definition: qglfunctions.h:353
GLboolean glIsFramebuffer(GLuint framebuffer)
Convenience function that calls glIsFramebuffer(framebuffer).
Definition: qglfunctions.h:954
int type
Definition: qmetatype.cpp:239
void glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w)
Convenience function that calls glUniform4i(location, x, y, z, w).
#define glCreateProgram
#define glUseProgram
#define glUniform3fv
#define QT_END_NAMESPACE
This macro expands to.
Definition: qglobal.h:90
#define glIsFramebuffer
#define glShaderBinary
GLboolean glIsBuffer(GLuint buffer)
Convenience function that calls glIsBuffer(buffer).
Definition: qglfunctions.h:944
static void usage()
#define QT_MODULE(x)
Definition: qglobal.h:2783
void glDisableVertexAttribArray(GLuint index)
Convenience function that calls glDisableVertexAttribArray(index).
Definition: qglfunctions.h:674
void glVertexAttrib1fv(GLuint indx, const GLfloat *values)
Convenience function that calls glVertexAttrib1fv(indx, values).
#define glUniform1iv
#define glStencilOpSeparate
void glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data)
Convenience function that calls glCompressedTexSubImage2D(target, level, xoffset, yoffset...
Definition: qglfunctions.h:575
void glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name)
Convenience function that calls glGetActiveUniform(program, index, bufsize, length, size, type, name).
Definition: qglfunctions.h:764
void glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
Convenience function that calls glUniformMatrix2fv(location, count, transpose, value).
#define glGetShaderSource
#define glBufferSubData
#define glIsShader
#define QT_BEGIN_HEADER
Definition: qglobal.h:136
#define Q_DECLARE_FLAGS(Flags, Enum)
The Q_DECLARE_FLAGS() macro expands to.
Definition: qglobal.h:2348
void glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
Convenience function that calls glRenderbufferStorage(target, internalformat, width, height).
#define glCompressedTexImage2D
void glDeleteFramebuffers(GLsizei n, const GLuint *framebuffers)
Convenience function that calls glDeleteFramebuffers(n, framebuffers).
Definition: qglfunctions.h:615
#define Q_OPENGL_EXPORT
Definition: qglobal.h:1455
void glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name)
Convenience function that calls glGetActiveAttrib(program, index, bufsize, length, size, type, name).
Definition: qglfunctions.h:754
void glGetVertexAttribiv(GLuint index, GLenum pname, GLint *params)
Convenience function that calls glGetVertexAttribiv(index, pname, params).
Definition: qglfunctions.h:924
void glEnableVertexAttribArray(GLuint index)
Convenience function that calls glEnableVertexAttribArray(index).
Definition: qglfunctions.h:684
#define glUniform2fv
void glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha)
Convenience function that calls glBlendEquationSeparate(modeRGB, modeAlpha).
Definition: qglfunctions.h:496
#define glGetFramebufferAttachmentParameteriv
void glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data)
Convenience function that calls glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data).
Definition: qglfunctions.h:565
void glGetProgramiv(GLuint program, GLenum pname, GLint *params)
Convenience function that calls glGetProgramiv(program, pname, params).
Definition: qglfunctions.h:814
void glDeleteRenderbuffers(GLsizei n, const GLuint *renderbuffers)
Convenience function that calls glDeleteRenderbuffers(n, renderbuffers).
Definition: qglfunctions.h:635
void glBindAttribLocation(GLuint program, GLuint index, const char *name)
Convenience function that calls glBindAttribLocation(program, index, name).
Definition: qglfunctions.h:436
ptrdiff_t qgl_GLintptr
Definition: qglfunctions.h:59
void glVertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z)
Convenience function that calls glVertexAttrib3f(indx, x, y, z).
#define QGLF_APIENTRYP
Definition: qglfunctions.h:73
#define glGenRenderbuffers
void glUniform2i(GLint location, GLint x, GLint y)
Convenience function that calls glUniform2i(location, x, y).
void glVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y)
Convenience function that calls glVertexAttrib2f(indx, x, y).
#define glBindAttribLocation
void glBlendEquation(GLenum mode)
Convenience function that calls glBlendEquation(mode).
Definition: qglfunctions.h:486
#define glVertexAttribPointer
Definition: glfunctions.h:71
#define glVertexAttrib3fv
#define glVertexAttrib2fv
OpenGLFeature
This enum defines OpenGL/ES 2.
Definition: qglfunctions.h:185
#define glEnableVertexAttribArray
void glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass)
Convenience function that calls glStencilOpSeparate(face, fail, zfail, zpass).
void glStencilMaskSeparate(GLenum face, GLuint mask)
Convenience function that calls glStencilMaskSeparate(face, mask).
#define glVertexAttrib1fv
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
void glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
Convenience function that calls glFramebufferTexture2D(target, attachment, textarget, texture, level).
Definition: qglfunctions.h:704
void glShaderSource(GLuint shader, GLsizei count, const char **string, const GLint *length)
Convenience function that calls glShaderSource(shader, count, string, length).
#define glBindFramebuffer
void glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
Convenience function that calls glBlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha).
Definition: qglfunctions.h:506
void glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
Convenience function that calls glBlendColor(red, green, blue, alpha).
Definition: qglfunctions.h:476
void glValidateProgram(GLuint program)
Convenience function that calls glValidateProgram(program).
void glUniform4iv(GLint location, GLsizei count, const GLint *v)
Convenience function that calls glUniform4iv(location, count, v).
void glVertexAttrib1f(GLuint indx, GLfloat x)
Convenience function that calls glVertexAttrib1f(indx, x).
#define glDeleteRenderbuffers
void glDeleteBuffers(GLsizei n, const GLuint *buffers)
Convenience function that calls glDeleteBuffers(n, buffers).
Definition: qglfunctions.h:605
#define glGetAttribLocation
int glGetUniformLocation(GLuint program, const char *name)
Convenience function that calls glGetUniformLocation(program, name).
Definition: qglfunctions.h:904
void glUniform1i(GLint location, GLint x)
Convenience function that calls glUniform1i(location, x).
void glUniform4fv(GLint location, GLsizei count, const GLfloat *v)
Convenience function that calls glUniform4fv(location, count, v).
void glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei *length, char *infolog)
Convenience function that calls glGetProgramInfoLog(program, bufsize, length, infolog).
Definition: qglfunctions.h:824
#define glVertexAttrib4fv
#define glGetBufferParameteriv
#define glShaderSource
GLboolean glIsProgram(GLuint program)
Convenience function that calls glIsProgram(program).
Definition: qglfunctions.h:964
The QGLFunctions class provides cross-platform access to the OpenGL/ES 2.0 API.
Definition: qglfunctions.h:178
void glDepthRangef(GLclampf zNear, GLclampf zFar)
Convenience function that calls glDepthRange(zNear, zFar) on desktop OpenGL systems and glDepthRangef...
Definition: qglfunctions.h:655
ptrdiff_t qgl_GLsizeiptr
Definition: qglfunctions.h:60
#define glUniformMatrix3fv
#define glLinkProgram
#define glGenBuffers
void glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
Convenience function that calls glUniform4f(location, x, y, z, w).
#define QT_BEGIN_NAMESPACE
This macro expands to.
Definition: qglobal.h:89
void glUniform3iv(GLint location, GLsizei count, const GLint *v)
Convenience function that calls glUniform3iv(location, count, v).
void glUniform1fv(GLint location, GLsizei count, const GLfloat *v)
Convenience function that calls glUniform1fv(location, count, v).
void glBufferSubData(GLenum target, qgl_GLintptr offset, qgl_GLsizeiptr size, const void *data)
Convenience function that calls glBufferSubData(target, offset, size, data).
Definition: qglfunctions.h:526
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
The Q_DECLARE_OPERATORS_FOR_FLAGS() macro declares global operator|() functions for Flags...
Definition: qglobal.h:2355
void glCompileShader(GLuint shader)
Convenience function that calls glCompileShader(shader).
Definition: qglfunctions.h:555
The QGLContext class encapsulates an OpenGL rendering context.
Definition: qgl.h:310
GLuint glCreateShader(GLenum type)
Convenience function that calls glCreateShader(type).
Definition: qglfunctions.h:595
#define glCheckFramebufferStatus
#define glDeleteFramebuffers
const char * name
#define glIsRenderbuffer
#define glIsProgram
GLboolean glIsShader(GLuint shader)
Convenience function that calls glIsShader(shader).
Definition: qglfunctions.h:984
void glBindFramebuffer(GLenum target, GLuint framebuffer)
Convenience function that calls glBindFramebuffer(target, framebuffer).
Definition: qglfunctions.h:456
#define glGenFramebuffers
void glGetUniformiv(GLuint program, GLint location, GLint *params)
Convenience function that calls glGetUniformiv(program, location, params).
Definition: qglfunctions.h:894
static const char * data(const QByteArray &arr)
#define glAttachShader
void glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint *params)
Convenience function that calls glGetFramebufferAttachmentParameteriv(target, attachment, pname, params).
Definition: qglfunctions.h:804
#define glBlendColor
void glUniform3i(GLint location, GLint x, GLint y, GLint z)
Convenience function that calls glUniform3i(location, x, y, z).
const T * ptr(const T &t)
#define glGetShaderInfoLog
void glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask)
Convenience function that calls glStencilFuncSeparate(face, func, ref, mask).
quint16 values[128]
void glGenBuffers(GLsizei n, GLuint *buffers)
Convenience function that calls glGenBuffers(n, buffers).
Definition: qglfunctions.h:714
#define glUniform4fv
#define glGetRenderbufferParameteriv
#define glGetProgramiv
#define glBindRenderbuffer
#define glDeleteBuffers
void glVertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *ptr)
Convenience function that calls glVertexAttribPointer(indx, size, type, normalized, stride, ptr).
#define glActiveTexture
Definition: glfunctions.h:69
void glUniform1f(GLint location, GLfloat x)
Convenience function that calls glUniform1f(location, x).
void glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint *params)
Convenience function that calls glGetRenderbufferParameteriv(target, pname, params).
Definition: qglfunctions.h:834
void glUniform2fv(GLint location, GLsizei count, const GLfloat *v)
Convenience function that calls glUniform2fv(location, count, v).
void glVertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
Convenience function that calls glVertexAttrib4f(indx, x, y, z, w).
void glLinkProgram(GLuint program)
Convenience function that calls glLinkProgram(program).
Definition: qglfunctions.h:994
void glShaderBinary(GLint n, const GLuint *shaders, GLenum binaryformat, const void *binary, GLint length)
Convenience function that calls glShaderBinary(n, shaders, binaryformat, binary, length).
#define glUniform1i
GLuint glCreateProgram()
Convenience function that calls glCreateProgram().
Definition: qglfunctions.h:585
void glGetVertexAttribPointerv(GLuint index, GLenum pname, void **pointer)
Convenience function that calls glGetVertexAttribPointerv(index, pname, pointer). ...
Definition: qglfunctions.h:934
unsigned int GLenum
Definition: main.cpp:50
Q_STATIC_TEMPLATE_FUNCTION void blendColor(int count, const QSpan *spans, void *userData)
#define glDetachShader
void glDeleteShader(GLuint shader)
Convenience function that calls glDeleteShader(shader).
Definition: qglfunctions.h:645
void glReleaseShaderCompiler()
Convenience function that calls glReleaseShaderCompiler().
void glClearDepthf(GLclampf depth)
Convenience function that calls glClearDepth(depth) on desktop OpenGL systems and glClearDepthf(depth...
Definition: qglfunctions.h:546
void glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
Convenience function that calls glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer).
Definition: qglfunctions.h:694
#define glDisableVertexAttribArray
#define glUniformMatrix4fv
void glBufferData(GLenum target, qgl_GLsizeiptr size, const void *data, GLenum usage)
Convenience function that calls glBufferData(target, size, data, usage).
Definition: qglfunctions.h:516
static QTestResult::TestLocation location
Definition: qtestresult.cpp:63
#define glCreateShader
void glGenRenderbuffers(GLsizei n, GLuint *renderbuffers)
Convenience function that calls glGenRenderbuffers(n, renderbuffers).
Definition: qglfunctions.h:744
void glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei *length, char *infolog)
Convenience function that calls glGetShaderInfoLog(shader, bufsize, length, infolog).
Definition: qglfunctions.h:854
void glDetachShader(GLuint program, GLuint shader)
Convenience function that calls glDetachShader(program, shader).
Definition: qglfunctions.h:664
#define glDeleteProgram
void glGenFramebuffers(GLsizei n, GLuint *framebuffers)
Convenience function that calls glGenFramebuffers(n, framebuffers).
Definition: qglfunctions.h:734
static bool isInitialized(const QGLFunctionsPrivate *d)
Definition: qglfunctions.h:308
void glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei *count, GLuint *shaders)
Convenience function that calls glGetAttachedShaders(program, maxcount, count, shaders).
Definition: qglfunctions.h:774
#define glGetUniformLocation
quint16 index
int GLsizei
Definition: main.cpp:49
#define glGetShaderiv
void glVertexAttrib2fv(GLuint indx, const GLfloat *values)
Convenience function that calls glVertexAttrib2fv(indx, values).
typedef GLint
Definition: glfunctions.h:67
void glGetUniformfv(GLuint program, GLint location, GLfloat *params)
Convenience function that calls glGetUniformfv(program, location, params).
Definition: qglfunctions.h:884
void glGetBufferParameteriv(GLenum target, GLenum pname, GLint *params)
Convenience function that calls glGetBufferParameteriv(target, pname, params).
Definition: qglfunctions.h:794
void glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei *length, char *source)
Convenience function that calls glGetShaderSource(shader, bufsize, length, source).
Definition: qglfunctions.h:874
#define glFramebufferRenderbuffer
GLboolean glIsRenderbuffer(GLuint renderbuffer)
Convenience function that calls glIsRenderbuffer(renderbuffer).
Definition: qglfunctions.h:974
void glGetShaderiv(GLuint shader, GLenum pname, GLint *params)
Convenience function that calls glGetShaderiv(shader, pname, params).
Definition: qglfunctions.h:844
#define glCompileShader
void glBindRenderbuffer(GLenum target, GLuint renderbuffer)
Convenience function that calls glBindRenderbuffer(target, renderbuffer).
Definition: qglfunctions.h:466
int glGetAttribLocation(GLuint program, const char *name)
Convenience function that calls glGetAttribLocation(program, name).
Definition: qglfunctions.h:784
#define glFramebufferTexture2D
void glUseProgram(GLuint program)
Convenience function that calls glUseProgram(program).
#define glBindBuffer
void glGenerateMipmap(GLenum target)
Convenience function that calls glGenerateMipmap(target).
Definition: qglfunctions.h:724
#define glUniformMatrix2fv
void glAttachShader(GLuint program, GLuint shader)
Convenience function that calls glAttachShader(program, shader).
Definition: qglfunctions.h:426
void glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z)
Convenience function that calls glUniform3f(location, x, y, z).
void glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat *params)
Convenience function that calls glGetVertexAttribfv(index, pname, params).
Definition: qglfunctions.h:914
void glUniform2f(GLint location, GLfloat x, GLfloat y)
Convenience function that calls glUniform2f(location, x, y).
#define QT_END_HEADER
Definition: qglobal.h:137
void glDeleteProgram(GLuint program)
Convenience function that calls glDeleteProgram(program).
Definition: qglfunctions.h:625
#define glGenerateMipmap
Definition: glfunctions.h:70
typedef GLboolean
Definition: glfunctions.h:67
#define glRenderbufferStorage
void glBindBuffer(GLenum target, GLuint buffer)
Convenience function that calls glBindBuffer(target, buffer).
Definition: qglfunctions.h:446
void glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
Convenience function that calls glUniformMatrix3fv(location, count, transpose, value).
void glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision)
Convenience function that calls glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision).
Definition: qglfunctions.h:864
void glSampleCoverage(GLclampf value, GLboolean invert)
Convenience function that calls glSampleCoverage(value, invert).
GLenum glCheckFramebufferStatus(GLenum target)
Convenience function that calls glCheckFramebufferStatus(target).
Definition: qglfunctions.h:536
void glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
Convenience function that calls glUniformMatrix4fv(location, count, transpose, value).
#define glUniform1fv
void glUniform2iv(GLint location, GLsizei count, const GLint *v)
Convenience function that calls glUniform2iv(location, count, v).
#define glGetProgramInfoLog
#define glBufferData
void glUniform1iv(GLint location, GLsizei count, const GLint *v)
Convenience function that calls glUniform1iv(location, count, v).
void glVertexAttrib4fv(GLuint indx, const GLfloat *values)
Convenience function that calls glVertexAttrib4fv(indx, values).
#define glDeleteShader
void glActiveTexture(GLenum texture)
Convenience function that calls glActiveTexture(texture).
Definition: qglfunctions.h:416
void glVertexAttrib3fv(GLuint indx, const GLfloat *values)
Convenience function that calls glVertexAttrib3fv(indx, values).