1 /****************************************************************************
3 ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/
6 ** This file is part of the QtOpenGL module of the Qt Toolkit.
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** GNU Lesser General Public License Usage
10 ** This file may be used under the terms of the GNU Lesser General Public
11 ** License version 2.1 as published by the Free Software Foundation and
12 ** appearing in the file LICENSE.LGPL included in the packaging of this
13 ** file. Please review the following information to ensure the GNU Lesser
14 ** General Public License version 2.1 requirements will be met:
15 ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
17 ** In addition, as a special exception, Nokia gives you certain additional
18 ** rights. These rights are described in the Nokia Qt LGPL Exception
19 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
21 ** GNU General Public License Usage
22 ** Alternatively, this file may be used under the terms of the GNU General
23 ** Public License version 3.0 as published by the Free Software Foundation
24 ** and appearing in the file LICENSE.GPL included in the packaging of this
25 ** file. Please review the following information to ensure the GNU General
26 ** Public License version 3.0 requirements will be met:
27 ** http://www.gnu.org/copyleft/gpl.html.
30 ** Alternatively, this file may be used in accordance with the terms and
31 ** conditions contained in a signed written agreement between you and Nokia.
40 ****************************************************************************/
42 #ifndef QGLFUNCTIONS_H
43 #define QGLFUNCTIONS_H
47 #warning qglfunctions.h is not compatible with GLEW, GLEW defines will be undefined
48 #warning To use GLEW with Qt, do not include <QtOpenGL> or <QGLFunctions> after glew.h
52 #include <QtOpenGL/qgl.h>
53 #include <QtGui/qopenglcontext.h>
60 // Types that aren't defined in all system's gl.h files.
61 typedef ptrdiff_t qgl_GLintptr;
62 typedef ptrdiff_t qgl_GLsizeiptr;
65 # ifndef QGLF_APIENTRYP
67 # define QGLF_APIENTRYP QGLF_APIENTRY *
69 # define QGLF_APIENTRY
70 # define QGLF_APIENTRYP *
74 struct QGLFunctionsPrivate;
76 // Undefine any macros from GLEW, qglextensions_p.h, etc that
77 // may interfere with the definition of QGLFunctions.
78 #undef glActiveTexture
80 #undef glBindAttribLocation
82 #undef glBindFramebuffer
83 #undef glBindRenderbuffer
85 #undef glBlendEquation
86 #undef glBlendEquationSeparate
87 #undef glBlendFuncSeparate
89 #undef glBufferSubData
90 #undef glCheckFramebufferStatus
92 #undef glCompileShader
93 #undef glCompressedTexImage2D
94 #undef glCompressedTexSubImage2D
95 #undef glCreateProgram
97 #undef glDeleteBuffers
98 #undef glDeleteFramebuffers
99 #undef glDeleteProgram
100 #undef glDeleteRenderbuffers
101 #undef glDeleteShader
103 #undef glDetachShader
104 #undef glDisableVertexAttribArray
105 #undef glEnableVertexAttribArray
106 #undef glFramebufferRenderbuffer
107 #undef glFramebufferTexture2D
109 #undef glGenerateMipmap
110 #undef glGenFramebuffers
111 #undef glGenRenderbuffers
112 #undef glGetActiveAttrib
113 #undef glGetActiveUniform
114 #undef glGetAttachedShaders
115 #undef glGetAttribLocation
116 #undef glGetBufferParameteriv
117 #undef glGetFramebufferAttachmentParameteriv
118 #undef glGetProgramiv
119 #undef glGetProgramInfoLog
120 #undef glGetRenderbufferParameteriv
122 #undef glGetShaderInfoLog
123 #undef glGetShaderPrecisionFormat
124 #undef glGetShaderSource
125 #undef glGetUniformfv
126 #undef glGetUniformiv
127 #undef glGetUniformLocation
128 #undef glGetVertexAttribfv
129 #undef glGetVertexAttribiv
130 #undef glGetVertexAttribPointerv
132 #undef glIsFramebuffer
134 #undef glIsRenderbuffer
137 #undef glReleaseShaderCompiler
138 #undef glRenderbufferStorage
139 #undef glSampleCoverage
140 #undef glShaderBinary
141 #undef glShaderSource
142 #undef glStencilFuncSeparate
143 #undef glStencilMaskSeparate
144 #undef glStencilOpSeparate
161 #undef glUniformMatrix2fv
162 #undef glUniformMatrix3fv
163 #undef glUniformMatrix4fv
165 #undef glValidateProgram
166 #undef glVertexAttrib1f
167 #undef glVertexAttrib1fv
168 #undef glVertexAttrib2f
169 #undef glVertexAttrib2fv
170 #undef glVertexAttrib3f
171 #undef glVertexAttrib3fv
172 #undef glVertexAttrib4f
173 #undef glVertexAttrib4fv
174 #undef glVertexAttribPointer
176 class Q_OPENGL_EXPORT QGLFunctions
180 explicit QGLFunctions(const QGLContext *context);
185 Multitexture = 0x0001,
188 Framebuffers = 0x0008,
190 BlendEquation = 0x0020,
191 BlendEquationSeparate = 0x0040,
192 BlendFuncSeparate = 0x0080,
193 BlendSubtract = 0x0100,
194 CompressedTextures = 0x0200,
195 Multisample = 0x0400,
196 StencilSeparate = 0x0800,
197 NPOTTextures = 0x1000
199 Q_DECLARE_FLAGS(OpenGLFeatures, OpenGLFeature)
201 QGLFunctions::OpenGLFeatures openGLFeatures() const;
202 bool hasOpenGLFeature(QGLFunctions::OpenGLFeature feature) const;
204 void initializeGLFunctions(const QGLContext *context = 0);
206 void glActiveTexture(GLenum texture);
207 void glAttachShader(GLuint program, GLuint shader);
208 void glBindAttribLocation(GLuint program, GLuint index, const char* name);
209 void glBindBuffer(GLenum target, GLuint buffer);
210 void glBindFramebuffer(GLenum target, GLuint framebuffer);
211 void glBindRenderbuffer(GLenum target, GLuint renderbuffer);
212 void glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
213 void glBlendEquation(GLenum mode);
214 void glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha);
215 void glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
216 void glBufferData(GLenum target, qgl_GLsizeiptr size, const void* data, GLenum usage);
217 void glBufferSubData(GLenum target, qgl_GLintptr offset, qgl_GLsizeiptr size, const void* data);
218 GLenum glCheckFramebufferStatus(GLenum target);
219 void glClearDepthf(GLclampf depth);
220 void glCompileShader(GLuint shader);
221 void glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data);
222 void glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data);
223 GLuint glCreateProgram();
224 GLuint glCreateShader(GLenum type);
225 void glDeleteBuffers(GLsizei n, const GLuint* buffers);
226 void glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers);
227 void glDeleteProgram(GLuint program);
228 void glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers);
229 void glDeleteShader(GLuint shader);
230 void glDepthRangef(GLclampf zNear, GLclampf zFar);
231 void glDetachShader(GLuint program, GLuint shader);
232 void glDisableVertexAttribArray(GLuint index);
233 void glEnableVertexAttribArray(GLuint index);
234 void glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
235 void glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
236 void glGenBuffers(GLsizei n, GLuint* buffers);
237 void glGenerateMipmap(GLenum target);
238 void glGenFramebuffers(GLsizei n, GLuint* framebuffers);
239 void glGenRenderbuffers(GLsizei n, GLuint* renderbuffers);
240 void glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name);
241 void glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name);
242 void glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders);
243 int glGetAttribLocation(GLuint program, const char* name);
244 void glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params);
245 void glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params);
246 void glGetProgramiv(GLuint program, GLenum pname, GLint* params);
247 void glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, char* infolog);
248 void glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params);
249 void glGetShaderiv(GLuint shader, GLenum pname, GLint* params);
250 void glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog);
251 void glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
252 void glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, char* source);
253 void glGetUniformfv(GLuint program, GLint location, GLfloat* params);
254 void glGetUniformiv(GLuint program, GLint location, GLint* params);
255 int glGetUniformLocation(GLuint program, const char* name);
256 void glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params);
257 void glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params);
258 void glGetVertexAttribPointerv(GLuint index, GLenum pname, void** pointer);
259 GLboolean glIsBuffer(GLuint buffer);
260 GLboolean glIsFramebuffer(GLuint framebuffer);
261 GLboolean glIsProgram(GLuint program);
262 GLboolean glIsRenderbuffer(GLuint renderbuffer);
263 GLboolean glIsShader(GLuint shader);
264 void glLinkProgram(GLuint program);
265 void glReleaseShaderCompiler();
266 void glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
267 void glSampleCoverage(GLclampf value, GLboolean invert);
268 void glShaderBinary(GLint n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLint length);
269 void glShaderSource(GLuint shader, GLsizei count, const char** string, const GLint* length);
270 void glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask);
271 void glStencilMaskSeparate(GLenum face, GLuint mask);
272 void glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
273 void glUniform1f(GLint location, GLfloat x);
274 void glUniform1fv(GLint location, GLsizei count, const GLfloat* v);
275 void glUniform1i(GLint location, GLint x);
276 void glUniform1iv(GLint location, GLsizei count, const GLint* v);
277 void glUniform2f(GLint location, GLfloat x, GLfloat y);
278 void glUniform2fv(GLint location, GLsizei count, const GLfloat* v);
279 void glUniform2i(GLint location, GLint x, GLint y);
280 void glUniform2iv(GLint location, GLsizei count, const GLint* v);
281 void glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z);
282 void glUniform3fv(GLint location, GLsizei count, const GLfloat* v);
283 void glUniform3i(GLint location, GLint x, GLint y, GLint z);
284 void glUniform3iv(GLint location, GLsizei count, const GLint* v);
285 void glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
286 void glUniform4fv(GLint location, GLsizei count, const GLfloat* v);
287 void glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w);
288 void glUniform4iv(GLint location, GLsizei count, const GLint* v);
289 void glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
290 void glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
291 void glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
292 void glUseProgram(GLuint program);
293 void glValidateProgram(GLuint program);
294 void glVertexAttrib1f(GLuint indx, GLfloat x);
295 void glVertexAttrib1fv(GLuint indx, const GLfloat* values);
296 void glVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y);
297 void glVertexAttrib2fv(GLuint indx, const GLfloat* values);
298 void glVertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z);
299 void glVertexAttrib3fv(GLuint indx, const GLfloat* values);
300 void glVertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
301 void glVertexAttrib4fv(GLuint indx, const GLfloat* values);
302 void glVertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr);
305 QGLFunctionsPrivate *d_ptr;
306 static bool isInitialized(const QGLFunctionsPrivate *d) { return d != 0; }
309 Q_DECLARE_OPERATORS_FOR_FLAGS(QGLFunctions::OpenGLFeatures)
311 struct QGLFunctionsPrivate
313 QGLFunctionsPrivate(const QGLContext *context = 0);
315 #ifndef QT_OPENGL_ES_2
316 void (QGLF_APIENTRYP activeTexture)(GLenum texture);
317 void (QGLF_APIENTRYP attachShader)(GLuint program, GLuint shader);
318 void (QGLF_APIENTRYP bindAttribLocation)(GLuint program, GLuint index, const char* name);
319 void (QGLF_APIENTRYP bindBuffer)(GLenum target, GLuint buffer);
320 void (QGLF_APIENTRYP bindFramebuffer)(GLenum target, GLuint framebuffer);
321 void (QGLF_APIENTRYP bindRenderbuffer)(GLenum target, GLuint renderbuffer);
322 void (QGLF_APIENTRYP blendColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
323 void (QGLF_APIENTRYP blendEquation)(GLenum mode);
324 void (QGLF_APIENTRYP blendEquationSeparate)(GLenum modeRGB, GLenum modeAlpha);
325 void (QGLF_APIENTRYP blendFuncSeparate)(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
326 void (QGLF_APIENTRYP bufferData)(GLenum target, qgl_GLsizeiptr size, const void* data, GLenum usage);
327 void (QGLF_APIENTRYP bufferSubData)(GLenum target, qgl_GLintptr offset, qgl_GLsizeiptr size, const void* data);
328 GLenum (QGLF_APIENTRYP checkFramebufferStatus)(GLenum target);
329 void (QGLF_APIENTRYP compileShader)(GLuint shader);
330 void (QGLF_APIENTRYP compressedTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data);
331 void (QGLF_APIENTRYP compressedTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data);
332 GLuint (QGLF_APIENTRYP createProgram)();
333 GLuint (QGLF_APIENTRYP createShader)(GLenum type);
334 void (QGLF_APIENTRYP deleteBuffers)(GLsizei n, const GLuint* buffers);
335 void (QGLF_APIENTRYP deleteFramebuffers)(GLsizei n, const GLuint* framebuffers);
336 void (QGLF_APIENTRYP deleteProgram)(GLuint program);
337 void (QGLF_APIENTRYP deleteRenderbuffers)(GLsizei n, const GLuint* renderbuffers);
338 void (QGLF_APIENTRYP deleteShader)(GLuint shader);
339 void (QGLF_APIENTRYP detachShader)(GLuint program, GLuint shader);
340 void (QGLF_APIENTRYP disableVertexAttribArray)(GLuint index);
341 void (QGLF_APIENTRYP enableVertexAttribArray)(GLuint index);
342 void (QGLF_APIENTRYP framebufferRenderbuffer)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
343 void (QGLF_APIENTRYP framebufferTexture2D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
344 void (QGLF_APIENTRYP genBuffers)(GLsizei n, GLuint* buffers);
345 void (QGLF_APIENTRYP generateMipmap)(GLenum target);
346 void (QGLF_APIENTRYP genFramebuffers)(GLsizei n, GLuint* framebuffers);
347 void (QGLF_APIENTRYP genRenderbuffers)(GLsizei n, GLuint* renderbuffers);
348 void (QGLF_APIENTRYP getActiveAttrib)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name);
349 void (QGLF_APIENTRYP getActiveUniform)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name);
350 void (QGLF_APIENTRYP getAttachedShaders)(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders);
351 int (QGLF_APIENTRYP getAttribLocation)(GLuint program, const char* name);
352 void (QGLF_APIENTRYP getBufferParameteriv)(GLenum target, GLenum pname, GLint* params);
353 void (QGLF_APIENTRYP getFramebufferAttachmentParameteriv)(GLenum target, GLenum attachment, GLenum pname, GLint* params);
354 void (QGLF_APIENTRYP getProgramiv)(GLuint program, GLenum pname, GLint* params);
355 void (QGLF_APIENTRYP getProgramInfoLog)(GLuint program, GLsizei bufsize, GLsizei* length, char* infolog);
356 void (QGLF_APIENTRYP getRenderbufferParameteriv)(GLenum target, GLenum pname, GLint* params);
357 void (QGLF_APIENTRYP getShaderiv)(GLuint shader, GLenum pname, GLint* params);
358 void (QGLF_APIENTRYP getShaderInfoLog)(GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog);
359 void (QGLF_APIENTRYP getShaderPrecisionFormat)(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
360 void (QGLF_APIENTRYP getShaderSource)(GLuint shader, GLsizei bufsize, GLsizei* length, char* source);
361 void (QGLF_APIENTRYP getUniformfv)(GLuint program, GLint location, GLfloat* params);
362 void (QGLF_APIENTRYP getUniformiv)(GLuint program, GLint location, GLint* params);
363 int (QGLF_APIENTRYP getUniformLocation)(GLuint program, const char* name);
364 void (QGLF_APIENTRYP getVertexAttribfv)(GLuint index, GLenum pname, GLfloat* params);
365 void (QGLF_APIENTRYP getVertexAttribiv)(GLuint index, GLenum pname, GLint* params);
366 void (QGLF_APIENTRYP getVertexAttribPointerv)(GLuint index, GLenum pname, void** pointer);
367 GLboolean (QGLF_APIENTRYP isBuffer)(GLuint buffer);
368 GLboolean (QGLF_APIENTRYP isFramebuffer)(GLuint framebuffer);
369 GLboolean (QGLF_APIENTRYP isProgram)(GLuint program);
370 GLboolean (QGLF_APIENTRYP isRenderbuffer)(GLuint renderbuffer);
371 GLboolean (QGLF_APIENTRYP isShader)(GLuint shader);
372 void (QGLF_APIENTRYP linkProgram)(GLuint program);
373 void (QGLF_APIENTRYP releaseShaderCompiler)();
374 void (QGLF_APIENTRYP renderbufferStorage)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
375 void (QGLF_APIENTRYP sampleCoverage)(GLclampf value, GLboolean invert);
376 void (QGLF_APIENTRYP shaderBinary)(GLint n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLint length);
377 void (QGLF_APIENTRYP shaderSource)(GLuint shader, GLsizei count, const char** string, const GLint* length);
378 void (QGLF_APIENTRYP stencilFuncSeparate)(GLenum face, GLenum func, GLint ref, GLuint mask);
379 void (QGLF_APIENTRYP stencilMaskSeparate)(GLenum face, GLuint mask);
380 void (QGLF_APIENTRYP stencilOpSeparate)(GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
381 void (QGLF_APIENTRYP uniform1f)(GLint location, GLfloat x);
382 void (QGLF_APIENTRYP uniform1fv)(GLint location, GLsizei count, const GLfloat* v);
383 void (QGLF_APIENTRYP uniform1i)(GLint location, GLint x);
384 void (QGLF_APIENTRYP uniform1iv)(GLint location, GLsizei count, const GLint* v);
385 void (QGLF_APIENTRYP uniform2f)(GLint location, GLfloat x, GLfloat y);
386 void (QGLF_APIENTRYP uniform2fv)(GLint location, GLsizei count, const GLfloat* v);
387 void (QGLF_APIENTRYP uniform2i)(GLint location, GLint x, GLint y);
388 void (QGLF_APIENTRYP uniform2iv)(GLint location, GLsizei count, const GLint* v);
389 void (QGLF_APIENTRYP uniform3f)(GLint location, GLfloat x, GLfloat y, GLfloat z);
390 void (QGLF_APIENTRYP uniform3fv)(GLint location, GLsizei count, const GLfloat* v);
391 void (QGLF_APIENTRYP uniform3i)(GLint location, GLint x, GLint y, GLint z);
392 void (QGLF_APIENTRYP uniform3iv)(GLint location, GLsizei count, const GLint* v);
393 void (QGLF_APIENTRYP uniform4f)(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
394 void (QGLF_APIENTRYP uniform4fv)(GLint location, GLsizei count, const GLfloat* v);
395 void (QGLF_APIENTRYP uniform4i)(GLint location, GLint x, GLint y, GLint z, GLint w);
396 void (QGLF_APIENTRYP uniform4iv)(GLint location, GLsizei count, const GLint* v);
397 void (QGLF_APIENTRYP uniformMatrix2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
398 void (QGLF_APIENTRYP uniformMatrix3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
399 void (QGLF_APIENTRYP uniformMatrix4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
400 void (QGLF_APIENTRYP useProgram)(GLuint program);
401 void (QGLF_APIENTRYP validateProgram)(GLuint program);
402 void (QGLF_APIENTRYP vertexAttrib1f)(GLuint indx, GLfloat x);
403 void (QGLF_APIENTRYP vertexAttrib1fv)(GLuint indx, const GLfloat* values);
404 void (QGLF_APIENTRYP vertexAttrib2f)(GLuint indx, GLfloat x, GLfloat y);
405 void (QGLF_APIENTRYP vertexAttrib2fv)(GLuint indx, const GLfloat* values);
406 void (QGLF_APIENTRYP vertexAttrib3f)(GLuint indx, GLfloat x, GLfloat y, GLfloat z);
407 void (QGLF_APIENTRYP vertexAttrib3fv)(GLuint indx, const GLfloat* values);
408 void (QGLF_APIENTRYP vertexAttrib4f)(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
409 void (QGLF_APIENTRYP vertexAttrib4fv)(GLuint indx, const GLfloat* values);
410 void (QGLF_APIENTRYP vertexAttribPointer)(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr);
414 inline void QGLFunctions::glActiveTexture(GLenum texture)
416 #if defined(QT_OPENGL_ES_2)
417 ::glActiveTexture(texture);
419 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
420 d_ptr->activeTexture(texture);
424 inline void QGLFunctions::glAttachShader(GLuint program, GLuint shader)
426 #if defined(QT_OPENGL_ES_2)
427 ::glAttachShader(program, shader);
429 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
430 d_ptr->attachShader(program, shader);
434 inline void QGLFunctions::glBindAttribLocation(GLuint program, GLuint index, const char* name)
436 #if defined(QT_OPENGL_ES_2)
437 ::glBindAttribLocation(program, index, name);
439 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
440 d_ptr->bindAttribLocation(program, index, name);
444 inline void QGLFunctions::glBindBuffer(GLenum target, GLuint buffer)
446 #if defined(QT_OPENGL_ES_2)
447 ::glBindBuffer(target, buffer);
449 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
450 d_ptr->bindBuffer(target, buffer);
454 inline void QGLFunctions::glBindFramebuffer(GLenum target, GLuint framebuffer)
456 if (framebuffer == 0)
457 framebuffer = QOpenGLContext::currentContext()->defaultFramebufferObject();
458 #if defined(QT_OPENGL_ES_2)
459 ::glBindFramebuffer(target, framebuffer);
461 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
462 d_ptr->bindFramebuffer(target, framebuffer);
466 inline void QGLFunctions::glBindRenderbuffer(GLenum target, GLuint renderbuffer)
468 #if defined(QT_OPENGL_ES_2)
469 ::glBindRenderbuffer(target, renderbuffer);
471 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
472 d_ptr->bindRenderbuffer(target, renderbuffer);
476 inline void QGLFunctions::glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
478 #if defined(QT_OPENGL_ES_2)
479 ::glBlendColor(red, green, blue, alpha);
481 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
482 d_ptr->blendColor(red, green, blue, alpha);
486 inline void QGLFunctions::glBlendEquation(GLenum mode)
488 #if defined(QT_OPENGL_ES_2)
489 ::glBlendEquation(mode);
491 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
492 d_ptr->blendEquation(mode);
496 inline void QGLFunctions::glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha)
498 #if defined(QT_OPENGL_ES_2)
499 ::glBlendEquationSeparate(modeRGB, modeAlpha);
501 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
502 d_ptr->blendEquationSeparate(modeRGB, modeAlpha);
506 inline void QGLFunctions::glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
508 #if defined(QT_OPENGL_ES_2)
509 ::glBlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha);
511 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
512 d_ptr->blendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha);
516 inline void QGLFunctions::glBufferData(GLenum target, qgl_GLsizeiptr size, const void* data, GLenum usage)
518 #if defined(QT_OPENGL_ES_2)
519 ::glBufferData(target, size, data, usage);
521 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
522 d_ptr->bufferData(target, size, data, usage);
526 inline void QGLFunctions::glBufferSubData(GLenum target, qgl_GLintptr offset, qgl_GLsizeiptr size, const void* data)
528 #if defined(QT_OPENGL_ES_2)
529 ::glBufferSubData(target, offset, size, data);
531 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
532 d_ptr->bufferSubData(target, offset, size, data);
536 inline GLenum QGLFunctions::glCheckFramebufferStatus(GLenum target)
538 #if defined(QT_OPENGL_ES_2)
539 return ::glCheckFramebufferStatus(target);
541 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
542 return d_ptr->checkFramebufferStatus(target);
546 inline void QGLFunctions::glClearDepthf(GLclampf depth)
549 ::glClearDepth(depth);
551 ::glClearDepthf(depth);
555 inline void QGLFunctions::glCompileShader(GLuint shader)
557 #if defined(QT_OPENGL_ES_2)
558 ::glCompileShader(shader);
560 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
561 d_ptr->compileShader(shader);
565 inline void QGLFunctions::glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data)
567 #if defined(QT_OPENGL_ES_2)
568 ::glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data);
570 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
571 d_ptr->compressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data);
575 inline void QGLFunctions::glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data)
577 #if defined(QT_OPENGL_ES_2)
578 ::glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data);
580 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
581 d_ptr->compressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data);
585 inline GLuint QGLFunctions::glCreateProgram()
587 #if defined(QT_OPENGL_ES_2)
588 return ::glCreateProgram();
590 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
591 return d_ptr->createProgram();
595 inline GLuint QGLFunctions::glCreateShader(GLenum type)
597 #if defined(QT_OPENGL_ES_2)
598 return ::glCreateShader(type);
600 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
601 return d_ptr->createShader(type);
605 inline void QGLFunctions::glDeleteBuffers(GLsizei n, const GLuint* buffers)
607 #if defined(QT_OPENGL_ES_2)
608 ::glDeleteBuffers(n, buffers);
610 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
611 d_ptr->deleteBuffers(n, buffers);
615 inline void QGLFunctions::glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers)
617 #if defined(QT_OPENGL_ES_2)
618 ::glDeleteFramebuffers(n, framebuffers);
620 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
621 d_ptr->deleteFramebuffers(n, framebuffers);
625 inline void QGLFunctions::glDeleteProgram(GLuint program)
627 #if defined(QT_OPENGL_ES_2)
628 ::glDeleteProgram(program);
630 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
631 d_ptr->deleteProgram(program);
635 inline void QGLFunctions::glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers)
637 #if defined(QT_OPENGL_ES_2)
638 ::glDeleteRenderbuffers(n, renderbuffers);
640 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
641 d_ptr->deleteRenderbuffers(n, renderbuffers);
645 inline void QGLFunctions::glDeleteShader(GLuint shader)
647 #if defined(QT_OPENGL_ES_2)
648 ::glDeleteShader(shader);
650 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
651 d_ptr->deleteShader(shader);
655 inline void QGLFunctions::glDepthRangef(GLclampf zNear, GLclampf zFar)
658 ::glDepthRange(zNear, zFar);
660 ::glDepthRangef(zNear, zFar);
664 inline void QGLFunctions::glDetachShader(GLuint program, GLuint shader)
666 #if defined(QT_OPENGL_ES_2)
667 ::glDetachShader(program, shader);
669 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
670 d_ptr->detachShader(program, shader);
674 inline void QGLFunctions::glDisableVertexAttribArray(GLuint index)
676 #if defined(QT_OPENGL_ES_2)
677 ::glDisableVertexAttribArray(index);
679 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
680 d_ptr->disableVertexAttribArray(index);
684 inline void QGLFunctions::glEnableVertexAttribArray(GLuint index)
686 #if defined(QT_OPENGL_ES_2)
687 ::glEnableVertexAttribArray(index);
689 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
690 d_ptr->enableVertexAttribArray(index);
694 inline void QGLFunctions::glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
696 #if defined(QT_OPENGL_ES_2)
697 ::glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);
699 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
700 d_ptr->framebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);
704 inline void QGLFunctions::glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
706 #if defined(QT_OPENGL_ES_2)
707 ::glFramebufferTexture2D(target, attachment, textarget, texture, level);
709 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
710 d_ptr->framebufferTexture2D(target, attachment, textarget, texture, level);
714 inline void QGLFunctions::glGenBuffers(GLsizei n, GLuint* buffers)
716 #if defined(QT_OPENGL_ES_2)
717 ::glGenBuffers(n, buffers);
719 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
720 d_ptr->genBuffers(n, buffers);
724 inline void QGLFunctions::glGenerateMipmap(GLenum target)
726 #if defined(QT_OPENGL_ES_2)
727 ::glGenerateMipmap(target);
729 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
730 d_ptr->generateMipmap(target);
734 inline void QGLFunctions::glGenFramebuffers(GLsizei n, GLuint* framebuffers)
736 #if defined(QT_OPENGL_ES_2)
737 ::glGenFramebuffers(n, framebuffers);
739 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
740 d_ptr->genFramebuffers(n, framebuffers);
744 inline void QGLFunctions::glGenRenderbuffers(GLsizei n, GLuint* renderbuffers)
746 #if defined(QT_OPENGL_ES_2)
747 ::glGenRenderbuffers(n, renderbuffers);
749 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
750 d_ptr->genRenderbuffers(n, renderbuffers);
754 inline void QGLFunctions::glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name)
756 #if defined(QT_OPENGL_ES_2)
757 ::glGetActiveAttrib(program, index, bufsize, length, size, type, name);
759 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
760 d_ptr->getActiveAttrib(program, index, bufsize, length, size, type, name);
764 inline void QGLFunctions::glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name)
766 #if defined(QT_OPENGL_ES_2)
767 ::glGetActiveUniform(program, index, bufsize, length, size, type, name);
769 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
770 d_ptr->getActiveUniform(program, index, bufsize, length, size, type, name);
774 inline void QGLFunctions::glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders)
776 #if defined(QT_OPENGL_ES_2)
777 ::glGetAttachedShaders(program, maxcount, count, shaders);
779 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
780 d_ptr->getAttachedShaders(program, maxcount, count, shaders);
784 inline int QGLFunctions::glGetAttribLocation(GLuint program, const char* name)
786 #if defined(QT_OPENGL_ES_2)
787 return ::glGetAttribLocation(program, name);
789 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
790 return d_ptr->getAttribLocation(program, name);
794 inline void QGLFunctions::glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params)
796 #if defined(QT_OPENGL_ES_2)
797 ::glGetBufferParameteriv(target, pname, params);
799 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
800 d_ptr->getBufferParameteriv(target, pname, params);
804 inline void QGLFunctions::glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params)
806 #if defined(QT_OPENGL_ES_2)
807 ::glGetFramebufferAttachmentParameteriv(target, attachment, pname, params);
809 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
810 d_ptr->getFramebufferAttachmentParameteriv(target, attachment, pname, params);
814 inline void QGLFunctions::glGetProgramiv(GLuint program, GLenum pname, GLint* params)
816 #if defined(QT_OPENGL_ES_2)
817 ::glGetProgramiv(program, pname, params);
819 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
820 d_ptr->getProgramiv(program, pname, params);
824 inline void QGLFunctions::glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, char* infolog)
826 #if defined(QT_OPENGL_ES_2)
827 ::glGetProgramInfoLog(program, bufsize, length, infolog);
829 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
830 d_ptr->getProgramInfoLog(program, bufsize, length, infolog);
834 inline void QGLFunctions::glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params)
836 #if defined(QT_OPENGL_ES_2)
837 ::glGetRenderbufferParameteriv(target, pname, params);
839 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
840 d_ptr->getRenderbufferParameteriv(target, pname, params);
844 inline void QGLFunctions::glGetShaderiv(GLuint shader, GLenum pname, GLint* params)
846 #if defined(QT_OPENGL_ES_2)
847 ::glGetShaderiv(shader, pname, params);
849 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
850 d_ptr->getShaderiv(shader, pname, params);
854 inline void QGLFunctions::glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog)
856 #if defined(QT_OPENGL_ES_2)
857 ::glGetShaderInfoLog(shader, bufsize, length, infolog);
859 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
860 d_ptr->getShaderInfoLog(shader, bufsize, length, infolog);
864 inline void QGLFunctions::glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision)
866 #if defined(QT_OPENGL_ES_2)
867 ::glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision);
869 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
870 d_ptr->getShaderPrecisionFormat(shadertype, precisiontype, range, precision);
874 inline void QGLFunctions::glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, char* source)
876 #if defined(QT_OPENGL_ES_2)
877 ::glGetShaderSource(shader, bufsize, length, source);
879 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
880 d_ptr->getShaderSource(shader, bufsize, length, source);
884 inline void QGLFunctions::glGetUniformfv(GLuint program, GLint location, GLfloat* params)
886 #if defined(QT_OPENGL_ES_2)
887 ::glGetUniformfv(program, location, params);
889 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
890 d_ptr->getUniformfv(program, location, params);
894 inline void QGLFunctions::glGetUniformiv(GLuint program, GLint location, GLint* params)
896 #if defined(QT_OPENGL_ES_2)
897 ::glGetUniformiv(program, location, params);
899 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
900 d_ptr->getUniformiv(program, location, params);
904 inline int QGLFunctions::glGetUniformLocation(GLuint program, const char* name)
906 #if defined(QT_OPENGL_ES_2)
907 return ::glGetUniformLocation(program, name);
909 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
910 return d_ptr->getUniformLocation(program, name);
914 inline void QGLFunctions::glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params)
916 #if defined(QT_OPENGL_ES_2)
917 ::glGetVertexAttribfv(index, pname, params);
919 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
920 d_ptr->getVertexAttribfv(index, pname, params);
924 inline void QGLFunctions::glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params)
926 #if defined(QT_OPENGL_ES_2)
927 ::glGetVertexAttribiv(index, pname, params);
929 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
930 d_ptr->getVertexAttribiv(index, pname, params);
934 inline void QGLFunctions::glGetVertexAttribPointerv(GLuint index, GLenum pname, void** pointer)
936 #if defined(QT_OPENGL_ES_2)
937 ::glGetVertexAttribPointerv(index, pname, pointer);
939 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
940 d_ptr->getVertexAttribPointerv(index, pname, pointer);
944 inline GLboolean QGLFunctions::glIsBuffer(GLuint buffer)
946 #if defined(QT_OPENGL_ES_2)
947 return ::glIsBuffer(buffer);
949 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
950 return d_ptr->isBuffer(buffer);
954 inline GLboolean QGLFunctions::glIsFramebuffer(GLuint framebuffer)
956 #if defined(QT_OPENGL_ES_2)
957 return ::glIsFramebuffer(framebuffer);
959 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
960 return d_ptr->isFramebuffer(framebuffer);
964 inline GLboolean QGLFunctions::glIsProgram(GLuint program)
966 #if defined(QT_OPENGL_ES_2)
967 return ::glIsProgram(program);
969 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
970 return d_ptr->isProgram(program);
974 inline GLboolean QGLFunctions::glIsRenderbuffer(GLuint renderbuffer)
976 #if defined(QT_OPENGL_ES_2)
977 return ::glIsRenderbuffer(renderbuffer);
979 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
980 return d_ptr->isRenderbuffer(renderbuffer);
984 inline GLboolean QGLFunctions::glIsShader(GLuint shader)
986 #if defined(QT_OPENGL_ES_2)
987 return ::glIsShader(shader);
989 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
990 return d_ptr->isShader(shader);
994 inline void QGLFunctions::glLinkProgram(GLuint program)
996 #if defined(QT_OPENGL_ES_2)
997 ::glLinkProgram(program);
999 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1000 d_ptr->linkProgram(program);
1004 inline void QGLFunctions::glReleaseShaderCompiler()
1006 #if defined(QT_OPENGL_ES_2)
1007 ::glReleaseShaderCompiler();
1009 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1010 d_ptr->releaseShaderCompiler();
1014 inline void QGLFunctions::glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
1016 #if defined(QT_OPENGL_ES_2)
1017 ::glRenderbufferStorage(target, internalformat, width, height);
1019 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1020 d_ptr->renderbufferStorage(target, internalformat, width, height);
1024 inline void QGLFunctions::glSampleCoverage(GLclampf value, GLboolean invert)
1026 #if defined(QT_OPENGL_ES_2)
1027 ::glSampleCoverage(value, invert);
1029 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1030 d_ptr->sampleCoverage(value, invert);
1034 inline void QGLFunctions::glShaderBinary(GLint n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLint length)
1036 #if defined(QT_OPENGL_ES_2)
1037 ::glShaderBinary(n, shaders, binaryformat, binary, length);
1039 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1040 d_ptr->shaderBinary(n, shaders, binaryformat, binary, length);
1044 inline void QGLFunctions::glShaderSource(GLuint shader, GLsizei count, const char** string, const GLint* length)
1046 #if defined(QT_OPENGL_ES_2)
1047 ::glShaderSource(shader, count, string, length);
1049 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1050 d_ptr->shaderSource(shader, count, string, length);
1054 inline void QGLFunctions::glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask)
1056 #if defined(QT_OPENGL_ES_2)
1057 ::glStencilFuncSeparate(face, func, ref, mask);
1059 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1060 d_ptr->stencilFuncSeparate(face, func, ref, mask);
1064 inline void QGLFunctions::glStencilMaskSeparate(GLenum face, GLuint mask)
1066 #if defined(QT_OPENGL_ES_2)
1067 ::glStencilMaskSeparate(face, mask);
1069 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1070 d_ptr->stencilMaskSeparate(face, mask);
1074 inline void QGLFunctions::glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass)
1076 #if defined(QT_OPENGL_ES_2)
1077 ::glStencilOpSeparate(face, fail, zfail, zpass);
1079 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1080 d_ptr->stencilOpSeparate(face, fail, zfail, zpass);
1084 inline void QGLFunctions::glUniform1f(GLint location, GLfloat x)
1086 #if defined(QT_OPENGL_ES_2)
1087 ::glUniform1f(location, x);
1089 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1090 d_ptr->uniform1f(location, x);
1094 inline void QGLFunctions::glUniform1fv(GLint location, GLsizei count, const GLfloat* v)
1096 #if defined(QT_OPENGL_ES_2)
1097 ::glUniform1fv(location, count, v);
1099 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1100 d_ptr->uniform1fv(location, count, v);
1104 inline void QGLFunctions::glUniform1i(GLint location, GLint x)
1106 #if defined(QT_OPENGL_ES_2)
1107 ::glUniform1i(location, x);
1109 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1110 d_ptr->uniform1i(location, x);
1114 inline void QGLFunctions::glUniform1iv(GLint location, GLsizei count, const GLint* v)
1116 #if defined(QT_OPENGL_ES_2)
1117 ::glUniform1iv(location, count, v);
1119 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1120 d_ptr->uniform1iv(location, count, v);
1124 inline void QGLFunctions::glUniform2f(GLint location, GLfloat x, GLfloat y)
1126 #if defined(QT_OPENGL_ES_2)
1127 ::glUniform2f(location, x, y);
1129 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1130 d_ptr->uniform2f(location, x, y);
1134 inline void QGLFunctions::glUniform2fv(GLint location, GLsizei count, const GLfloat* v)
1136 #if defined(QT_OPENGL_ES_2)
1137 ::glUniform2fv(location, count, v);
1139 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1140 d_ptr->uniform2fv(location, count, v);
1144 inline void QGLFunctions::glUniform2i(GLint location, GLint x, GLint y)
1146 #if defined(QT_OPENGL_ES_2)
1147 ::glUniform2i(location, x, y);
1149 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1150 d_ptr->uniform2i(location, x, y);
1154 inline void QGLFunctions::glUniform2iv(GLint location, GLsizei count, const GLint* v)
1156 #if defined(QT_OPENGL_ES_2)
1157 ::glUniform2iv(location, count, v);
1159 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1160 d_ptr->uniform2iv(location, count, v);
1164 inline void QGLFunctions::glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z)
1166 #if defined(QT_OPENGL_ES_2)
1167 ::glUniform3f(location, x, y, z);
1169 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1170 d_ptr->uniform3f(location, x, y, z);
1174 inline void QGLFunctions::glUniform3fv(GLint location, GLsizei count, const GLfloat* v)
1176 #if defined(QT_OPENGL_ES_2)
1177 ::glUniform3fv(location, count, v);
1179 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1180 d_ptr->uniform3fv(location, count, v);
1184 inline void QGLFunctions::glUniform3i(GLint location, GLint x, GLint y, GLint z)
1186 #if defined(QT_OPENGL_ES_2)
1187 ::glUniform3i(location, x, y, z);
1189 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1190 d_ptr->uniform3i(location, x, y, z);
1194 inline void QGLFunctions::glUniform3iv(GLint location, GLsizei count, const GLint* v)
1196 #if defined(QT_OPENGL_ES_2)
1197 ::glUniform3iv(location, count, v);
1199 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1200 d_ptr->uniform3iv(location, count, v);
1204 inline void QGLFunctions::glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
1206 #if defined(QT_OPENGL_ES_2)
1207 ::glUniform4f(location, x, y, z, w);
1209 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1210 d_ptr->uniform4f(location, x, y, z, w);
1214 inline void QGLFunctions::glUniform4fv(GLint location, GLsizei count, const GLfloat* v)
1216 #if defined(QT_OPENGL_ES_2)
1217 ::glUniform4fv(location, count, v);
1219 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1220 d_ptr->uniform4fv(location, count, v);
1224 inline void QGLFunctions::glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w)
1226 #if defined(QT_OPENGL_ES_2)
1227 ::glUniform4i(location, x, y, z, w);
1229 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1230 d_ptr->uniform4i(location, x, y, z, w);
1234 inline void QGLFunctions::glUniform4iv(GLint location, GLsizei count, const GLint* v)
1236 #if defined(QT_OPENGL_ES_2)
1237 ::glUniform4iv(location, count, v);
1239 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1240 d_ptr->uniform4iv(location, count, v);
1244 inline void QGLFunctions::glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
1246 #if defined(QT_OPENGL_ES_2)
1247 ::glUniformMatrix2fv(location, count, transpose, value);
1249 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1250 d_ptr->uniformMatrix2fv(location, count, transpose, value);
1254 inline void QGLFunctions::glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
1256 #if defined(QT_OPENGL_ES_2)
1257 ::glUniformMatrix3fv(location, count, transpose, value);
1259 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1260 d_ptr->uniformMatrix3fv(location, count, transpose, value);
1264 inline void QGLFunctions::glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
1266 #if defined(QT_OPENGL_ES_2)
1267 ::glUniformMatrix4fv(location, count, transpose, value);
1269 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1270 d_ptr->uniformMatrix4fv(location, count, transpose, value);
1274 inline void QGLFunctions::glUseProgram(GLuint program)
1276 #if defined(QT_OPENGL_ES_2)
1277 ::glUseProgram(program);
1279 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1280 d_ptr->useProgram(program);
1284 inline void QGLFunctions::glValidateProgram(GLuint program)
1286 #if defined(QT_OPENGL_ES_2)
1287 ::glValidateProgram(program);
1289 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1290 d_ptr->validateProgram(program);
1294 inline void QGLFunctions::glVertexAttrib1f(GLuint indx, GLfloat x)
1296 #if defined(QT_OPENGL_ES_2)
1297 ::glVertexAttrib1f(indx, x);
1299 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1300 d_ptr->vertexAttrib1f(indx, x);
1304 inline void QGLFunctions::glVertexAttrib1fv(GLuint indx, const GLfloat* values)
1306 #if defined(QT_OPENGL_ES_2)
1307 ::glVertexAttrib1fv(indx, values);
1309 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1310 d_ptr->vertexAttrib1fv(indx, values);
1314 inline void QGLFunctions::glVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y)
1316 #if defined(QT_OPENGL_ES_2)
1317 ::glVertexAttrib2f(indx, x, y);
1319 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1320 d_ptr->vertexAttrib2f(indx, x, y);
1324 inline void QGLFunctions::glVertexAttrib2fv(GLuint indx, const GLfloat* values)
1326 #if defined(QT_OPENGL_ES_2)
1327 ::glVertexAttrib2fv(indx, values);
1329 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1330 d_ptr->vertexAttrib2fv(indx, values);
1334 inline void QGLFunctions::glVertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z)
1336 #if defined(QT_OPENGL_ES_2)
1337 ::glVertexAttrib3f(indx, x, y, z);
1339 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1340 d_ptr->vertexAttrib3f(indx, x, y, z);
1344 inline void QGLFunctions::glVertexAttrib3fv(GLuint indx, const GLfloat* values)
1346 #if defined(QT_OPENGL_ES_2)
1347 ::glVertexAttrib3fv(indx, values);
1349 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1350 d_ptr->vertexAttrib3fv(indx, values);
1354 inline void QGLFunctions::glVertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
1356 #if defined(QT_OPENGL_ES_2)
1357 ::glVertexAttrib4f(indx, x, y, z, w);
1359 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1360 d_ptr->vertexAttrib4f(indx, x, y, z, w);
1364 inline void QGLFunctions::glVertexAttrib4fv(GLuint indx, const GLfloat* values)
1366 #if defined(QT_OPENGL_ES_2)
1367 ::glVertexAttrib4fv(indx, values);
1369 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1370 d_ptr->vertexAttrib4fv(indx, values);
1374 inline void QGLFunctions::glVertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr)
1376 #if defined(QT_OPENGL_ES_2)
1377 ::glVertexAttribPointer(indx, size, type, normalized, stride, ptr);
1379 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1380 d_ptr->vertexAttribPointer(indx, size, type, normalized, stride, ptr);
1384 #ifndef GL_ACTIVE_ATTRIBUTE_MAX_LENGTH
1385 #define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
1387 #ifndef GL_ACTIVE_ATTRIBUTES
1388 #define GL_ACTIVE_ATTRIBUTES 0x8B89
1390 #ifndef GL_ACTIVE_TEXTURE
1391 #define GL_ACTIVE_TEXTURE 0x84E0
1393 #ifndef GL_ACTIVE_UNIFORM_MAX_LENGTH
1394 #define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
1396 #ifndef GL_ACTIVE_UNIFORMS
1397 #define GL_ACTIVE_UNIFORMS 0x8B86
1399 #ifndef GL_ALIASED_LINE_WIDTH_RANGE
1400 #define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
1402 #ifndef GL_ALIASED_POINT_SIZE_RANGE
1403 #define GL_ALIASED_POINT_SIZE_RANGE 0x846D
1406 #define GL_ALPHA 0x1906
1408 #ifndef GL_ALPHA_BITS
1409 #define GL_ALPHA_BITS 0x0D55
1412 #define GL_ALWAYS 0x0207
1414 #ifndef GL_ARRAY_BUFFER
1415 #define GL_ARRAY_BUFFER 0x8892
1417 #ifndef GL_ARRAY_BUFFER_BINDING
1418 #define GL_ARRAY_BUFFER_BINDING 0x8894
1420 #ifndef GL_ATTACHED_SHADERS
1421 #define GL_ATTACHED_SHADERS 0x8B85
1424 #define GL_BACK 0x0405
1427 #define GL_BLEND 0x0BE2
1429 #ifndef GL_BLEND_COLOR
1430 #define GL_BLEND_COLOR 0x8005
1432 #ifndef GL_BLEND_DST_ALPHA
1433 #define GL_BLEND_DST_ALPHA 0x80CA
1435 #ifndef GL_BLEND_DST_RGB
1436 #define GL_BLEND_DST_RGB 0x80C8
1438 #ifndef GL_BLEND_EQUATION
1439 #define GL_BLEND_EQUATION 0x8009
1441 #ifndef GL_BLEND_EQUATION_ALPHA
1442 #define GL_BLEND_EQUATION_ALPHA 0x883D
1444 #ifndef GL_BLEND_EQUATION_RGB
1445 #define GL_BLEND_EQUATION_RGB 0x8009
1447 #ifndef GL_BLEND_SRC_ALPHA
1448 #define GL_BLEND_SRC_ALPHA 0x80CB
1450 #ifndef GL_BLEND_SRC_RGB
1451 #define GL_BLEND_SRC_RGB 0x80C9
1453 #ifndef GL_BLUE_BITS
1454 #define GL_BLUE_BITS 0x0D54
1457 #define GL_BOOL 0x8B56
1459 #ifndef GL_BOOL_VEC2
1460 #define GL_BOOL_VEC2 0x8B57
1462 #ifndef GL_BOOL_VEC3
1463 #define GL_BOOL_VEC3 0x8B58
1465 #ifndef GL_BOOL_VEC4
1466 #define GL_BOOL_VEC4 0x8B59
1468 #ifndef GL_BUFFER_SIZE
1469 #define GL_BUFFER_SIZE 0x8764
1471 #ifndef GL_BUFFER_USAGE
1472 #define GL_BUFFER_USAGE 0x8765
1475 #define GL_BYTE 0x1400
1478 #define GL_CCW 0x0901
1480 #ifndef GL_CLAMP_TO_EDGE
1481 #define GL_CLAMP_TO_EDGE 0x812F
1483 #ifndef GL_COLOR_ATTACHMENT0
1484 #define GL_COLOR_ATTACHMENT0 0x8CE0
1486 #ifndef GL_COLOR_BUFFER_BIT
1487 #define GL_COLOR_BUFFER_BIT 0x00004000
1489 #ifndef GL_COLOR_CLEAR_VALUE
1490 #define GL_COLOR_CLEAR_VALUE 0x0C22
1492 #ifndef GL_COLOR_WRITEMASK
1493 #define GL_COLOR_WRITEMASK 0x0C23
1495 #ifndef GL_COMPILE_STATUS
1496 #define GL_COMPILE_STATUS 0x8B81
1498 #ifndef GL_COMPRESSED_TEXTURE_FORMATS
1499 #define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
1501 #ifndef GL_CONSTANT_ALPHA
1502 #define GL_CONSTANT_ALPHA 0x8003
1504 #ifndef GL_CONSTANT_COLOR
1505 #define GL_CONSTANT_COLOR 0x8001
1507 #ifndef GL_CULL_FACE
1508 #define GL_CULL_FACE 0x0B44
1510 #ifndef GL_CULL_FACE_MODE
1511 #define GL_CULL_FACE_MODE 0x0B45
1513 #ifndef GL_CURRENT_PROGRAM
1514 #define GL_CURRENT_PROGRAM 0x8B8D
1516 #ifndef GL_CURRENT_VERTEX_ATTRIB
1517 #define GL_CURRENT_VERTEX_ATTRIB 0x8626
1520 #define GL_CW 0x0900
1523 #define GL_DECR 0x1E03
1525 #ifndef GL_DECR_WRAP
1526 #define GL_DECR_WRAP 0x8508
1528 #ifndef GL_DELETE_STATUS
1529 #define GL_DELETE_STATUS 0x8B80
1531 #ifndef GL_DEPTH_ATTACHMENT
1532 #define GL_DEPTH_ATTACHMENT 0x8D00
1534 #ifndef GL_DEPTH_BITS
1535 #define GL_DEPTH_BITS 0x0D56
1537 #ifndef GL_DEPTH_BUFFER_BIT
1538 #define GL_DEPTH_BUFFER_BIT 0x00000100
1540 #ifndef GL_DEPTH_CLEAR_VALUE
1541 #define GL_DEPTH_CLEAR_VALUE 0x0B73
1543 #ifndef GL_DEPTH_COMPONENT
1544 #define GL_DEPTH_COMPONENT 0x1902
1546 #ifndef GL_DEPTH_COMPONENT16
1547 #define GL_DEPTH_COMPONENT16 0x81A5
1549 #ifndef GL_DEPTH_FUNC
1550 #define GL_DEPTH_FUNC 0x0B74
1552 #ifndef GL_DEPTH_RANGE
1553 #define GL_DEPTH_RANGE 0x0B70
1555 #ifndef GL_DEPTH_TEST
1556 #define GL_DEPTH_TEST 0x0B71
1558 #ifndef GL_DEPTH_WRITEMASK
1559 #define GL_DEPTH_WRITEMASK 0x0B72
1562 #define GL_DITHER 0x0BD0
1564 #ifndef GL_DONT_CARE
1565 #define GL_DONT_CARE 0x1100
1567 #ifndef GL_DST_ALPHA
1568 #define GL_DST_ALPHA 0x0304
1570 #ifndef GL_DST_COLOR
1571 #define GL_DST_COLOR 0x0306
1573 #ifndef GL_DYNAMIC_DRAW
1574 #define GL_DYNAMIC_DRAW 0x88E8
1576 #ifndef GL_ELEMENT_ARRAY_BUFFER
1577 #define GL_ELEMENT_ARRAY_BUFFER 0x8893
1579 #ifndef GL_ELEMENT_ARRAY_BUFFER_BINDING
1580 #define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
1583 #define GL_EQUAL 0x0202
1585 #ifndef GL_EXTENSIONS
1586 #define GL_EXTENSIONS 0x1F03
1592 #define GL_FASTEST 0x1101
1595 #define GL_FIXED 0x140C
1598 #define GL_FLOAT 0x1406
1600 #ifndef GL_FLOAT_MAT2
1601 #define GL_FLOAT_MAT2 0x8B5A
1603 #ifndef GL_FLOAT_MAT3
1604 #define GL_FLOAT_MAT3 0x8B5B
1606 #ifndef GL_FLOAT_MAT4
1607 #define GL_FLOAT_MAT4 0x8B5C
1609 #ifndef GL_FLOAT_VEC2
1610 #define GL_FLOAT_VEC2 0x8B50
1612 #ifndef GL_FLOAT_VEC3
1613 #define GL_FLOAT_VEC3 0x8B51
1615 #ifndef GL_FLOAT_VEC4
1616 #define GL_FLOAT_VEC4 0x8B52
1618 #ifndef GL_FRAGMENT_SHADER
1619 #define GL_FRAGMENT_SHADER 0x8B30
1621 #ifndef GL_FRAMEBUFFER
1622 #define GL_FRAMEBUFFER 0x8D40
1624 #ifndef GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME
1625 #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
1627 #ifndef GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE
1628 #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
1630 #ifndef GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE
1631 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
1633 #ifndef GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL
1634 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
1636 #ifndef GL_FRAMEBUFFER_BINDING
1637 #define GL_FRAMEBUFFER_BINDING 0x8CA6
1639 #ifndef GL_FRAMEBUFFER_COMPLETE
1640 #define GL_FRAMEBUFFER_COMPLETE 0x8CD5
1642 #ifndef GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT
1643 #define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
1645 #ifndef GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS
1646 #define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9
1648 #ifndef GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT
1649 #define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
1651 #ifndef GL_FRAMEBUFFER_UNSUPPORTED
1652 #define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
1655 #define GL_FRONT 0x0404
1657 #ifndef GL_FRONT_AND_BACK
1658 #define GL_FRONT_AND_BACK 0x0408
1660 #ifndef GL_FRONT_FACE
1661 #define GL_FRONT_FACE 0x0B46
1664 #define GL_FUNC_ADD 0x8006
1666 #ifndef GL_FUNC_REVERSE_SUBTRACT
1667 #define GL_FUNC_REVERSE_SUBTRACT 0x800B
1669 #ifndef GL_FUNC_SUBTRACT
1670 #define GL_FUNC_SUBTRACT 0x800A
1672 #ifndef GL_GENERATE_MIPMAP_HINT
1673 #define GL_GENERATE_MIPMAP_HINT 0x8192
1676 #define GL_GEQUAL 0x0206
1679 #define GL_GREATER 0x0204
1681 #ifndef GL_GREEN_BITS
1682 #define GL_GREEN_BITS 0x0D53
1684 #ifndef GL_HIGH_FLOAT
1685 #define GL_HIGH_FLOAT 0x8DF2
1688 #define GL_HIGH_INT 0x8DF5
1690 #ifndef GL_IMPLEMENTATION_COLOR_READ_FORMAT
1691 #define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
1693 #ifndef GL_IMPLEMENTATION_COLOR_READ_TYPE
1694 #define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A
1697 #define GL_INCR 0x1E02
1699 #ifndef GL_INCR_WRAP
1700 #define GL_INCR_WRAP 0x8507
1702 #ifndef GL_INFO_LOG_LENGTH
1703 #define GL_INFO_LOG_LENGTH 0x8B84
1706 #define GL_INT 0x1404
1709 #define GL_INT_VEC2 0x8B53
1712 #define GL_INT_VEC3 0x8B54
1715 #define GL_INT_VEC4 0x8B55
1717 #ifndef GL_INVALID_ENUM
1718 #define GL_INVALID_ENUM 0x0500
1720 #ifndef GL_INVALID_FRAMEBUFFER_OPERATION
1721 #define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506
1723 #ifndef GL_INVALID_OPERATION
1724 #define GL_INVALID_OPERATION 0x0502
1726 #ifndef GL_INVALID_VALUE
1727 #define GL_INVALID_VALUE 0x0501
1730 #define GL_INVERT 0x150A
1733 #define GL_KEEP 0x1E00
1736 #define GL_LEQUAL 0x0203
1739 #define GL_LESS 0x0201
1742 #define GL_LINEAR 0x2601
1744 #ifndef GL_LINEAR_MIPMAP_LINEAR
1745 #define GL_LINEAR_MIPMAP_LINEAR 0x2703
1747 #ifndef GL_LINEAR_MIPMAP_NEAREST
1748 #define GL_LINEAR_MIPMAP_NEAREST 0x2701
1750 #ifndef GL_LINE_LOOP
1751 #define GL_LINE_LOOP 0x0002
1754 #define GL_LINES 0x0001
1756 #ifndef GL_LINE_STRIP
1757 #define GL_LINE_STRIP 0x0003
1759 #ifndef GL_LINE_WIDTH
1760 #define GL_LINE_WIDTH 0x0B21
1762 #ifndef GL_LINK_STATUS
1763 #define GL_LINK_STATUS 0x8B82
1765 #ifndef GL_LOW_FLOAT
1766 #define GL_LOW_FLOAT 0x8DF0
1769 #define GL_LOW_INT 0x8DF3
1771 #ifndef GL_LUMINANCE
1772 #define GL_LUMINANCE 0x1909
1774 #ifndef GL_LUMINANCE_ALPHA
1775 #define GL_LUMINANCE_ALPHA 0x190A
1777 #ifndef GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS
1778 #define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
1780 #ifndef GL_MAX_CUBE_MAP_TEXTURE_SIZE
1781 #define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
1783 #ifndef GL_MAX_FRAGMENT_UNIFORM_VECTORS
1784 #define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD
1786 #ifndef GL_MAX_RENDERBUFFER_SIZE
1787 #define GL_MAX_RENDERBUFFER_SIZE 0x84E8
1789 #ifndef GL_MAX_TEXTURE_IMAGE_UNITS
1790 #define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
1792 #ifndef GL_MAX_TEXTURE_SIZE
1793 #define GL_MAX_TEXTURE_SIZE 0x0D33
1795 #ifndef GL_MAX_VARYING_VECTORS
1796 #define GL_MAX_VARYING_VECTORS 0x8DFC
1798 #ifndef GL_MAX_VERTEX_ATTRIBS
1799 #define GL_MAX_VERTEX_ATTRIBS 0x8869
1801 #ifndef GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS
1802 #define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
1804 #ifndef GL_MAX_VERTEX_UNIFORM_VECTORS
1805 #define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB
1807 #ifndef GL_MAX_VIEWPORT_DIMS
1808 #define GL_MAX_VIEWPORT_DIMS 0x0D3A
1810 #ifndef GL_MEDIUM_FLOAT
1811 #define GL_MEDIUM_FLOAT 0x8DF1
1813 #ifndef GL_MEDIUM_INT
1814 #define GL_MEDIUM_INT 0x8DF4
1816 #ifndef GL_MIRRORED_REPEAT
1817 #define GL_MIRRORED_REPEAT 0x8370
1820 #define GL_NEAREST 0x2600
1822 #ifndef GL_NEAREST_MIPMAP_LINEAR
1823 #define GL_NEAREST_MIPMAP_LINEAR 0x2702
1825 #ifndef GL_NEAREST_MIPMAP_NEAREST
1826 #define GL_NEAREST_MIPMAP_NEAREST 0x2700
1829 #define GL_NEVER 0x0200
1832 #define GL_NICEST 0x1102
1835 #define GL_NO_ERROR 0
1841 #define GL_NOTEQUAL 0x0205
1843 #ifndef GL_NUM_COMPRESSED_TEXTURE_FORMATS
1844 #define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
1846 #ifndef GL_NUM_SHADER_BINARY_FORMATS
1847 #define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9
1852 #ifndef GL_ONE_MINUS_CONSTANT_ALPHA
1853 #define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
1855 #ifndef GL_ONE_MINUS_CONSTANT_COLOR
1856 #define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
1858 #ifndef GL_ONE_MINUS_DST_ALPHA
1859 #define GL_ONE_MINUS_DST_ALPHA 0x0305
1861 #ifndef GL_ONE_MINUS_DST_COLOR
1862 #define GL_ONE_MINUS_DST_COLOR 0x0307
1864 #ifndef GL_ONE_MINUS_SRC_ALPHA
1865 #define GL_ONE_MINUS_SRC_ALPHA 0x0303
1867 #ifndef GL_ONE_MINUS_SRC_COLOR
1868 #define GL_ONE_MINUS_SRC_COLOR 0x0301
1870 #ifndef GL_OUT_OF_MEMORY
1871 #define GL_OUT_OF_MEMORY 0x0505
1873 #ifndef GL_PACK_ALIGNMENT
1874 #define GL_PACK_ALIGNMENT 0x0D05
1877 #define GL_POINTS 0x0000
1879 #ifndef GL_POLYGON_OFFSET_FACTOR
1880 #define GL_POLYGON_OFFSET_FACTOR 0x8038
1882 #ifndef GL_POLYGON_OFFSET_FILL
1883 #define GL_POLYGON_OFFSET_FILL 0x8037
1885 #ifndef GL_POLYGON_OFFSET_UNITS
1886 #define GL_POLYGON_OFFSET_UNITS 0x2A00
1889 #define GL_RED_BITS 0x0D52
1891 #ifndef GL_RENDERBUFFER
1892 #define GL_RENDERBUFFER 0x8D41
1894 #ifndef GL_RENDERBUFFER_ALPHA_SIZE
1895 #define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53
1897 #ifndef GL_RENDERBUFFER_BINDING
1898 #define GL_RENDERBUFFER_BINDING 0x8CA7
1900 #ifndef GL_RENDERBUFFER_BLUE_SIZE
1901 #define GL_RENDERBUFFER_BLUE_SIZE 0x8D52
1903 #ifndef GL_RENDERBUFFER_DEPTH_SIZE
1904 #define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54
1906 #ifndef GL_RENDERBUFFER_GREEN_SIZE
1907 #define GL_RENDERBUFFER_GREEN_SIZE 0x8D51
1909 #ifndef GL_RENDERBUFFER_HEIGHT
1910 #define GL_RENDERBUFFER_HEIGHT 0x8D43
1912 #ifndef GL_RENDERBUFFER_INTERNAL_FORMAT
1913 #define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44
1915 #ifndef GL_RENDERBUFFER_RED_SIZE
1916 #define GL_RENDERBUFFER_RED_SIZE 0x8D50
1918 #ifndef GL_RENDERBUFFER_STENCIL_SIZE
1919 #define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55
1921 #ifndef GL_RENDERBUFFER_WIDTH
1922 #define GL_RENDERBUFFER_WIDTH 0x8D42
1925 #define GL_RENDERER 0x1F01
1928 #define GL_REPEAT 0x2901
1931 #define GL_REPLACE 0x1E01
1934 #define GL_RGB 0x1907
1937 #define GL_RGB565 0x8D62
1940 #define GL_RGB5_A1 0x8057
1943 #define GL_RGBA 0x1908
1946 #define GL_RGBA4 0x8056
1949 #define GL_BGRA 0x80E1
1951 #ifndef GL_SAMPLE_ALPHA_TO_COVERAGE
1952 #define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
1954 #ifndef GL_SAMPLE_BUFFERS
1955 #define GL_SAMPLE_BUFFERS 0x80A8
1957 #ifndef GL_SAMPLE_COVERAGE
1958 #define GL_SAMPLE_COVERAGE 0x80A0
1960 #ifndef GL_SAMPLE_COVERAGE_INVERT
1961 #define GL_SAMPLE_COVERAGE_INVERT 0x80AB
1963 #ifndef GL_SAMPLE_COVERAGE_VALUE
1964 #define GL_SAMPLE_COVERAGE_VALUE 0x80AA
1966 #ifndef GL_SAMPLER_2D
1967 #define GL_SAMPLER_2D 0x8B5E
1969 #ifndef GL_SAMPLER_CUBE
1970 #define GL_SAMPLER_CUBE 0x8B60
1973 #define GL_SAMPLES 0x80A9
1975 #ifndef GL_SCISSOR_BOX
1976 #define GL_SCISSOR_BOX 0x0C10
1978 #ifndef GL_SCISSOR_TEST
1979 #define GL_SCISSOR_TEST 0x0C11
1981 #ifndef GL_SHADER_BINARY_FORMATS
1982 #define GL_SHADER_BINARY_FORMATS 0x8DF8
1984 #ifndef GL_SHADER_COMPILER
1985 #define GL_SHADER_COMPILER 0x8DFA
1987 #ifndef GL_SHADER_SOURCE_LENGTH
1988 #define GL_SHADER_SOURCE_LENGTH 0x8B88
1990 #ifndef GL_SHADER_TYPE
1991 #define GL_SHADER_TYPE 0x8B4F
1993 #ifndef GL_SHADING_LANGUAGE_VERSION
1994 #define GL_SHADING_LANGUAGE_VERSION 0x8B8C
1997 #define GL_SHORT 0x1402
1999 #ifndef GL_SRC_ALPHA
2000 #define GL_SRC_ALPHA 0x0302
2002 #ifndef GL_SRC_ALPHA_SATURATE
2003 #define GL_SRC_ALPHA_SATURATE 0x0308
2005 #ifndef GL_SRC_COLOR
2006 #define GL_SRC_COLOR 0x0300
2008 #ifndef GL_STATIC_DRAW
2009 #define GL_STATIC_DRAW 0x88E4
2011 #ifndef GL_STENCIL_ATTACHMENT
2012 #define GL_STENCIL_ATTACHMENT 0x8D20
2014 #ifndef GL_STENCIL_BACK_FAIL
2015 #define GL_STENCIL_BACK_FAIL 0x8801
2017 #ifndef GL_STENCIL_BACK_FUNC
2018 #define GL_STENCIL_BACK_FUNC 0x8800
2020 #ifndef GL_STENCIL_BACK_PASS_DEPTH_FAIL
2021 #define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
2023 #ifndef GL_STENCIL_BACK_PASS_DEPTH_PASS
2024 #define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
2026 #ifndef GL_STENCIL_BACK_REF
2027 #define GL_STENCIL_BACK_REF 0x8CA3
2029 #ifndef GL_STENCIL_BACK_VALUE_MASK
2030 #define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
2032 #ifndef GL_STENCIL_BACK_WRITEMASK
2033 #define GL_STENCIL_BACK_WRITEMASK 0x8CA5
2035 #ifndef GL_STENCIL_BITS
2036 #define GL_STENCIL_BITS 0x0D57
2038 #ifndef GL_STENCIL_BUFFER_BIT
2039 #define GL_STENCIL_BUFFER_BIT 0x00000400
2041 #ifndef GL_STENCIL_CLEAR_VALUE
2042 #define GL_STENCIL_CLEAR_VALUE 0x0B91
2044 #ifndef GL_STENCIL_FAIL
2045 #define GL_STENCIL_FAIL 0x0B94
2047 #ifndef GL_STENCIL_FUNC
2048 #define GL_STENCIL_FUNC 0x0B92
2050 #ifndef GL_STENCIL_INDEX
2051 #define GL_STENCIL_INDEX 0x1901
2053 #ifndef GL_STENCIL_INDEX8
2054 #define GL_STENCIL_INDEX8 0x8D48
2056 #ifndef GL_STENCIL_PASS_DEPTH_FAIL
2057 #define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
2059 #ifndef GL_STENCIL_PASS_DEPTH_PASS
2060 #define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
2062 #ifndef GL_STENCIL_REF
2063 #define GL_STENCIL_REF 0x0B97
2065 #ifndef GL_STENCIL_TEST
2066 #define GL_STENCIL_TEST 0x0B90
2068 #ifndef GL_STENCIL_VALUE_MASK
2069 #define GL_STENCIL_VALUE_MASK 0x0B93
2071 #ifndef GL_STENCIL_WRITEMASK
2072 #define GL_STENCIL_WRITEMASK 0x0B98
2074 #ifndef GL_STREAM_DRAW
2075 #define GL_STREAM_DRAW 0x88E0
2077 #ifndef GL_SUBPIXEL_BITS
2078 #define GL_SUBPIXEL_BITS 0x0D50
2081 #define GL_TEXTURE0 0x84C0
2084 #define GL_TEXTURE 0x1702
2086 #ifndef GL_TEXTURE10
2087 #define GL_TEXTURE10 0x84CA
2090 #define GL_TEXTURE1 0x84C1
2092 #ifndef GL_TEXTURE11
2093 #define GL_TEXTURE11 0x84CB
2095 #ifndef GL_TEXTURE12
2096 #define GL_TEXTURE12 0x84CC
2098 #ifndef GL_TEXTURE13
2099 #define GL_TEXTURE13 0x84CD
2101 #ifndef GL_TEXTURE14
2102 #define GL_TEXTURE14 0x84CE
2104 #ifndef GL_TEXTURE15
2105 #define GL_TEXTURE15 0x84CF
2107 #ifndef GL_TEXTURE16
2108 #define GL_TEXTURE16 0x84D0
2110 #ifndef GL_TEXTURE17
2111 #define GL_TEXTURE17 0x84D1
2113 #ifndef GL_TEXTURE18
2114 #define GL_TEXTURE18 0x84D2
2116 #ifndef GL_TEXTURE19
2117 #define GL_TEXTURE19 0x84D3
2119 #ifndef GL_TEXTURE20
2120 #define GL_TEXTURE20 0x84D4
2123 #define GL_TEXTURE2 0x84C2
2125 #ifndef GL_TEXTURE21
2126 #define GL_TEXTURE21 0x84D5
2128 #ifndef GL_TEXTURE22
2129 #define GL_TEXTURE22 0x84D6
2131 #ifndef GL_TEXTURE23
2132 #define GL_TEXTURE23 0x84D7
2134 #ifndef GL_TEXTURE24
2135 #define GL_TEXTURE24 0x84D8
2137 #ifndef GL_TEXTURE25
2138 #define GL_TEXTURE25 0x84D9
2140 #ifndef GL_TEXTURE26
2141 #define GL_TEXTURE26 0x84DA
2143 #ifndef GL_TEXTURE27
2144 #define GL_TEXTURE27 0x84DB
2146 #ifndef GL_TEXTURE28
2147 #define GL_TEXTURE28 0x84DC
2149 #ifndef GL_TEXTURE29
2150 #define GL_TEXTURE29 0x84DD
2152 #ifndef GL_TEXTURE_2D
2153 #define GL_TEXTURE_2D 0x0DE1
2155 #ifndef GL_TEXTURE30
2156 #define GL_TEXTURE30 0x84DE
2159 #define GL_TEXTURE3 0x84C3
2161 #ifndef GL_TEXTURE31
2162 #define GL_TEXTURE31 0x84DF
2165 #define GL_TEXTURE4 0x84C4
2168 #define GL_TEXTURE5 0x84C5
2171 #define GL_TEXTURE6 0x84C6
2174 #define GL_TEXTURE7 0x84C7
2177 #define GL_TEXTURE8 0x84C8
2180 #define GL_TEXTURE9 0x84C9
2182 #ifndef GL_TEXTURE_BINDING_2D
2183 #define GL_TEXTURE_BINDING_2D 0x8069
2185 #ifndef GL_TEXTURE_BINDING_CUBE_MAP
2186 #define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
2188 #ifndef GL_TEXTURE_CUBE_MAP
2189 #define GL_TEXTURE_CUBE_MAP 0x8513
2191 #ifndef GL_TEXTURE_CUBE_MAP_NEGATIVE_X
2192 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
2194 #ifndef GL_TEXTURE_CUBE_MAP_NEGATIVE_Y
2195 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
2197 #ifndef GL_TEXTURE_CUBE_MAP_NEGATIVE_Z
2198 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
2200 #ifndef GL_TEXTURE_CUBE_MAP_POSITIVE_X
2201 #define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
2203 #ifndef GL_TEXTURE_CUBE_MAP_POSITIVE_Y
2204 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
2206 #ifndef GL_TEXTURE_CUBE_MAP_POSITIVE_Z
2207 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
2209 #ifndef GL_TEXTURE_MAG_FILTER
2210 #define GL_TEXTURE_MAG_FILTER 0x2800
2212 #ifndef GL_TEXTURE_MIN_FILTER
2213 #define GL_TEXTURE_MIN_FILTER 0x2801
2215 #ifndef GL_TEXTURE_WRAP_S
2216 #define GL_TEXTURE_WRAP_S 0x2802
2218 #ifndef GL_TEXTURE_WRAP_T
2219 #define GL_TEXTURE_WRAP_T 0x2803
2221 #ifndef GL_TRIANGLE_FAN
2222 #define GL_TRIANGLE_FAN 0x0006
2224 #ifndef GL_TRIANGLES
2225 #define GL_TRIANGLES 0x0004
2227 #ifndef GL_TRIANGLE_STRIP
2228 #define GL_TRIANGLE_STRIP 0x0005
2233 #ifndef GL_UNPACK_ALIGNMENT
2234 #define GL_UNPACK_ALIGNMENT 0x0CF5
2236 #ifndef GL_UNSIGNED_BYTE
2237 #define GL_UNSIGNED_BYTE 0x1401
2239 #ifndef GL_UNSIGNED_INT
2240 #define GL_UNSIGNED_INT 0x1405
2242 #ifndef GL_UNSIGNED_SHORT
2243 #define GL_UNSIGNED_SHORT 0x1403
2245 #ifndef GL_UNSIGNED_SHORT_4_4_4_4
2246 #define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
2248 #ifndef GL_UNSIGNED_SHORT_5_5_5_1
2249 #define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
2251 #ifndef GL_UNSIGNED_SHORT_5_6_5
2252 #define GL_UNSIGNED_SHORT_5_6_5 0x8363
2254 #ifndef GL_VALIDATE_STATUS
2255 #define GL_VALIDATE_STATUS 0x8B83
2258 #define GL_VENDOR 0x1F00
2261 #define GL_VERSION 0x1F02
2263 #ifndef GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING
2264 #define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
2266 #ifndef GL_VERTEX_ATTRIB_ARRAY_ENABLED
2267 #define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
2269 #ifndef GL_VERTEX_ATTRIB_ARRAY_NORMALIZED
2270 #define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
2272 #ifndef GL_VERTEX_ATTRIB_ARRAY_POINTER
2273 #define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
2275 #ifndef GL_VERTEX_ATTRIB_ARRAY_SIZE
2276 #define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
2278 #ifndef GL_VERTEX_ATTRIB_ARRAY_STRIDE
2279 #define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
2281 #ifndef GL_VERTEX_ATTRIB_ARRAY_TYPE
2282 #define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
2284 #ifndef GL_VERTEX_SHADER
2285 #define GL_VERTEX_SHADER 0x8B31
2288 #define GL_VIEWPORT 0x0BA2