1 /****************************************************************************
3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
4 ** All rights reserved.
5 ** Contact: Nokia Corporation (qt-info@nokia.com)
7 ** This file is part of the QtOpenGL module of the Qt Toolkit.
9 ** $QT_BEGIN_LICENSE:LGPL$
10 ** No Commercial Usage
11 ** This file contains pre-release code and may not be distributed.
12 ** You may use this file in accordance with the terms and conditions
13 ** contained in the Technology Preview License Agreement accompanying
16 ** GNU Lesser General Public License Usage
17 ** Alternatively, this file may be used under the terms of the GNU Lesser
18 ** General Public License version 2.1 as published by the Free Software
19 ** Foundation and appearing in the file LICENSE.LGPL included in the
20 ** packaging of this file. Please review the following information to
21 ** ensure the GNU Lesser General Public License version 2.1 requirements
22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 ** In addition, as a special exception, Nokia gives you certain additional
25 ** rights. These rights are described in the Nokia Qt LGPL Exception
26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 ** If you have questions regarding the use of this file, please contact
29 ** Nokia at qt-info@nokia.com.
40 ****************************************************************************/
42 #ifndef QGLFUNCTIONS_H
43 #define QGLFUNCTIONS_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
50 #include <QtOpenGL/qgl.h>
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;
63 # define QGLF_APIENTRY APIENTRY
67 # ifndef QGLF_APIENTRYP
69 # define QGLF_APIENTRYP QGLF_APIENTRY *
71 # define QGLF_APIENTRY
72 # define QGLF_APIENTRYP *
76 # define QGLF_APIENTRY
77 # define QGLF_APIENTRYP *
80 struct QGLFunctionsPrivate;
82 // Undefine any macros from GLEW, qglextensions_p.h, etc that
83 // may interfere with the definition of QGLFunctions.
84 #undef glActiveTexture
86 #undef glBindAttribLocation
88 #undef glBindFramebuffer
89 #undef glBindRenderbuffer
91 #undef glBlendEquation
92 #undef glBlendEquationSeparate
93 #undef glBlendFuncSeparate
95 #undef glBufferSubData
96 #undef glCheckFramebufferStatus
98 #undef glCompileShader
99 #undef glCompressedTexImage2D
100 #undef glCompressedTexSubImage2D
101 #undef glCreateProgram
102 #undef glCreateShader
103 #undef glDeleteBuffers
104 #undef glDeleteFramebuffers
105 #undef glDeleteProgram
106 #undef glDeleteRenderbuffers
107 #undef glDeleteShader
109 #undef glDetachShader
110 #undef glDisableVertexAttribArray
111 #undef glEnableVertexAttribArray
112 #undef glFramebufferRenderbuffer
113 #undef glFramebufferTexture2D
115 #undef glGenerateMipmap
116 #undef glGenFramebuffers
117 #undef glGenRenderbuffers
118 #undef glGetActiveAttrib
119 #undef glGetActiveUniform
120 #undef glGetAttachedShaders
121 #undef glGetAttribLocation
122 #undef glGetBufferParameteriv
123 #undef glGetFramebufferAttachmentParameteriv
124 #undef glGetProgramiv
125 #undef glGetProgramInfoLog
126 #undef glGetRenderbufferParameteriv
128 #undef glGetShaderInfoLog
129 #undef glGetShaderPrecisionFormat
130 #undef glGetShaderSource
131 #undef glGetUniformfv
132 #undef glGetUniformiv
133 #undef glGetUniformLocation
134 #undef glGetVertexAttribfv
135 #undef glGetVertexAttribiv
136 #undef glGetVertexAttribPointerv
138 #undef glIsFramebuffer
140 #undef glIsRenderbuffer
143 #undef glReleaseShaderCompiler
144 #undef glRenderbufferStorage
145 #undef glSampleCoverage
146 #undef glShaderBinary
147 #undef glShaderSource
148 #undef glStencilFuncSeparate
149 #undef glStencilMaskSeparate
150 #undef glStencilOpSeparate
167 #undef glUniformMatrix2fv
168 #undef glUniformMatrix3fv
169 #undef glUniformMatrix4fv
171 #undef glValidateProgram
172 #undef glVertexAttrib1f
173 #undef glVertexAttrib1fv
174 #undef glVertexAttrib2f
175 #undef glVertexAttrib2fv
176 #undef glVertexAttrib3f
177 #undef glVertexAttrib3fv
178 #undef glVertexAttrib4f
179 #undef glVertexAttrib4fv
180 #undef glVertexAttribPointer
182 class Q_OPENGL_EXPORT QGLFunctions
186 explicit QGLFunctions(const QGLContext *context);
191 Multitexture = 0x0001,
194 Framebuffers = 0x0008,
196 BlendEquation = 0x0020,
197 BlendEquationSeparate = 0x0040,
198 BlendFuncSeparate = 0x0080,
199 BlendSubtract = 0x0100,
200 CompressedTextures = 0x0200,
201 Multisample = 0x0400,
202 StencilSeparate = 0x0800,
203 NPOTTextures = 0x1000
205 Q_DECLARE_FLAGS(OpenGLFeatures, OpenGLFeature)
207 QGLFunctions::OpenGLFeatures openGLFeatures() const;
208 bool hasOpenGLFeature(QGLFunctions::OpenGLFeature feature) const;
210 void initializeGLFunctions(const QGLContext *context = 0);
212 void glActiveTexture(GLenum texture);
213 void glAttachShader(GLuint program, GLuint shader);
214 void glBindAttribLocation(GLuint program, GLuint index, const char* name);
215 void glBindBuffer(GLenum target, GLuint buffer);
216 void glBindFramebuffer(GLenum target, GLuint framebuffer);
217 void glBindRenderbuffer(GLenum target, GLuint renderbuffer);
218 void glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
219 void glBlendEquation(GLenum mode);
220 void glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha);
221 void glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
222 void glBufferData(GLenum target, qgl_GLsizeiptr size, const void* data, GLenum usage);
223 void glBufferSubData(GLenum target, qgl_GLintptr offset, qgl_GLsizeiptr size, const void* data);
224 GLenum glCheckFramebufferStatus(GLenum target);
225 void glClearDepthf(GLclampf depth);
226 void glCompileShader(GLuint shader);
227 void glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data);
228 void glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data);
229 GLuint glCreateProgram();
230 GLuint glCreateShader(GLenum type);
231 void glDeleteBuffers(GLsizei n, const GLuint* buffers);
232 void glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers);
233 void glDeleteProgram(GLuint program);
234 void glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers);
235 void glDeleteShader(GLuint shader);
236 void glDepthRangef(GLclampf zNear, GLclampf zFar);
237 void glDetachShader(GLuint program, GLuint shader);
238 void glDisableVertexAttribArray(GLuint index);
239 void glEnableVertexAttribArray(GLuint index);
240 void glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
241 void glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
242 void glGenBuffers(GLsizei n, GLuint* buffers);
243 void glGenerateMipmap(GLenum target);
244 void glGenFramebuffers(GLsizei n, GLuint* framebuffers);
245 void glGenRenderbuffers(GLsizei n, GLuint* renderbuffers);
246 void glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name);
247 void glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name);
248 void glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders);
249 int glGetAttribLocation(GLuint program, const char* name);
250 void glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params);
251 void glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params);
252 void glGetProgramiv(GLuint program, GLenum pname, GLint* params);
253 void glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, char* infolog);
254 void glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params);
255 void glGetShaderiv(GLuint shader, GLenum pname, GLint* params);
256 void glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog);
257 void glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
258 void glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, char* source);
259 void glGetUniformfv(GLuint program, GLint location, GLfloat* params);
260 void glGetUniformiv(GLuint program, GLint location, GLint* params);
261 int glGetUniformLocation(GLuint program, const char* name);
262 void glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params);
263 void glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params);
264 void glGetVertexAttribPointerv(GLuint index, GLenum pname, void** pointer);
265 GLboolean glIsBuffer(GLuint buffer);
266 GLboolean glIsFramebuffer(GLuint framebuffer);
267 GLboolean glIsProgram(GLuint program);
268 GLboolean glIsRenderbuffer(GLuint renderbuffer);
269 GLboolean glIsShader(GLuint shader);
270 void glLinkProgram(GLuint program);
271 void glReleaseShaderCompiler();
272 void glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
273 void glSampleCoverage(GLclampf value, GLboolean invert);
274 void glShaderBinary(GLint n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLint length);
275 void glShaderSource(GLuint shader, GLsizei count, const char** string, const GLint* length);
276 void glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask);
277 void glStencilMaskSeparate(GLenum face, GLuint mask);
278 void glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
279 void glUniform1f(GLint location, GLfloat x);
280 void glUniform1fv(GLint location, GLsizei count, const GLfloat* v);
281 void glUniform1i(GLint location, GLint x);
282 void glUniform1iv(GLint location, GLsizei count, const GLint* v);
283 void glUniform2f(GLint location, GLfloat x, GLfloat y);
284 void glUniform2fv(GLint location, GLsizei count, const GLfloat* v);
285 void glUniform2i(GLint location, GLint x, GLint y);
286 void glUniform2iv(GLint location, GLsizei count, const GLint* v);
287 void glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z);
288 void glUniform3fv(GLint location, GLsizei count, const GLfloat* v);
289 void glUniform3i(GLint location, GLint x, GLint y, GLint z);
290 void glUniform3iv(GLint location, GLsizei count, const GLint* v);
291 void glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
292 void glUniform4fv(GLint location, GLsizei count, const GLfloat* v);
293 void glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w);
294 void glUniform4iv(GLint location, GLsizei count, const GLint* v);
295 void glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
296 void glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
297 void glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
298 void glUseProgram(GLuint program);
299 void glValidateProgram(GLuint program);
300 void glVertexAttrib1f(GLuint indx, GLfloat x);
301 void glVertexAttrib1fv(GLuint indx, const GLfloat* values);
302 void glVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y);
303 void glVertexAttrib2fv(GLuint indx, const GLfloat* values);
304 void glVertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z);
305 void glVertexAttrib3fv(GLuint indx, const GLfloat* values);
306 void glVertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
307 void glVertexAttrib4fv(GLuint indx, const GLfloat* values);
308 void glVertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr);
311 QGLFunctionsPrivate *d_ptr;
312 static bool isInitialized(const QGLFunctionsPrivate *d) { return d != 0; }
315 Q_DECLARE_OPERATORS_FOR_FLAGS(QGLFunctions::OpenGLFeatures)
317 struct QGLFunctionsPrivate
319 QGLFunctionsPrivate(const QGLContext *context = 0);
321 #ifndef QT_OPENGL_ES_2
322 void (QGLF_APIENTRYP activeTexture)(GLenum texture);
323 void (QGLF_APIENTRYP attachShader)(GLuint program, GLuint shader);
324 void (QGLF_APIENTRYP bindAttribLocation)(GLuint program, GLuint index, const char* name);
325 void (QGLF_APIENTRYP bindBuffer)(GLenum target, GLuint buffer);
326 void (QGLF_APIENTRYP bindFramebuffer)(GLenum target, GLuint framebuffer);
327 void (QGLF_APIENTRYP bindRenderbuffer)(GLenum target, GLuint renderbuffer);
328 void (QGLF_APIENTRYP blendColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
329 void (QGLF_APIENTRYP blendEquation)(GLenum mode);
330 void (QGLF_APIENTRYP blendEquationSeparate)(GLenum modeRGB, GLenum modeAlpha);
331 void (QGLF_APIENTRYP blendFuncSeparate)(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
332 void (QGLF_APIENTRYP bufferData)(GLenum target, qgl_GLsizeiptr size, const void* data, GLenum usage);
333 void (QGLF_APIENTRYP bufferSubData)(GLenum target, qgl_GLintptr offset, qgl_GLsizeiptr size, const void* data);
334 GLenum (QGLF_APIENTRYP checkFramebufferStatus)(GLenum target);
335 void (QGLF_APIENTRYP compileShader)(GLuint shader);
336 void (QGLF_APIENTRYP compressedTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data);
337 void (QGLF_APIENTRYP compressedTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data);
338 GLuint (QGLF_APIENTRYP createProgram)();
339 GLuint (QGLF_APIENTRYP createShader)(GLenum type);
340 void (QGLF_APIENTRYP deleteBuffers)(GLsizei n, const GLuint* buffers);
341 void (QGLF_APIENTRYP deleteFramebuffers)(GLsizei n, const GLuint* framebuffers);
342 void (QGLF_APIENTRYP deleteProgram)(GLuint program);
343 void (QGLF_APIENTRYP deleteRenderbuffers)(GLsizei n, const GLuint* renderbuffers);
344 void (QGLF_APIENTRYP deleteShader)(GLuint shader);
345 void (QGLF_APIENTRYP detachShader)(GLuint program, GLuint shader);
346 void (QGLF_APIENTRYP disableVertexAttribArray)(GLuint index);
347 void (QGLF_APIENTRYP enableVertexAttribArray)(GLuint index);
348 void (QGLF_APIENTRYP framebufferRenderbuffer)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
349 void (QGLF_APIENTRYP framebufferTexture2D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
350 void (QGLF_APIENTRYP genBuffers)(GLsizei n, GLuint* buffers);
351 void (QGLF_APIENTRYP generateMipmap)(GLenum target);
352 void (QGLF_APIENTRYP genFramebuffers)(GLsizei n, GLuint* framebuffers);
353 void (QGLF_APIENTRYP genRenderbuffers)(GLsizei n, GLuint* renderbuffers);
354 void (QGLF_APIENTRYP getActiveAttrib)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name);
355 void (QGLF_APIENTRYP getActiveUniform)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name);
356 void (QGLF_APIENTRYP getAttachedShaders)(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders);
357 int (QGLF_APIENTRYP getAttribLocation)(GLuint program, const char* name);
358 void (QGLF_APIENTRYP getBufferParameteriv)(GLenum target, GLenum pname, GLint* params);
359 void (QGLF_APIENTRYP getFramebufferAttachmentParameteriv)(GLenum target, GLenum attachment, GLenum pname, GLint* params);
360 void (QGLF_APIENTRYP getProgramiv)(GLuint program, GLenum pname, GLint* params);
361 void (QGLF_APIENTRYP getProgramInfoLog)(GLuint program, GLsizei bufsize, GLsizei* length, char* infolog);
362 void (QGLF_APIENTRYP getRenderbufferParameteriv)(GLenum target, GLenum pname, GLint* params);
363 void (QGLF_APIENTRYP getShaderiv)(GLuint shader, GLenum pname, GLint* params);
364 void (QGLF_APIENTRYP getShaderInfoLog)(GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog);
365 void (QGLF_APIENTRYP getShaderPrecisionFormat)(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
366 void (QGLF_APIENTRYP getShaderSource)(GLuint shader, GLsizei bufsize, GLsizei* length, char* source);
367 void (QGLF_APIENTRYP getUniformfv)(GLuint program, GLint location, GLfloat* params);
368 void (QGLF_APIENTRYP getUniformiv)(GLuint program, GLint location, GLint* params);
369 int (QGLF_APIENTRYP getUniformLocation)(GLuint program, const char* name);
370 void (QGLF_APIENTRYP getVertexAttribfv)(GLuint index, GLenum pname, GLfloat* params);
371 void (QGLF_APIENTRYP getVertexAttribiv)(GLuint index, GLenum pname, GLint* params);
372 void (QGLF_APIENTRYP getVertexAttribPointerv)(GLuint index, GLenum pname, void** pointer);
373 GLboolean (QGLF_APIENTRYP isBuffer)(GLuint buffer);
374 GLboolean (QGLF_APIENTRYP isFramebuffer)(GLuint framebuffer);
375 GLboolean (QGLF_APIENTRYP isProgram)(GLuint program);
376 GLboolean (QGLF_APIENTRYP isRenderbuffer)(GLuint renderbuffer);
377 GLboolean (QGLF_APIENTRYP isShader)(GLuint shader);
378 void (QGLF_APIENTRYP linkProgram)(GLuint program);
379 void (QGLF_APIENTRYP releaseShaderCompiler)();
380 void (QGLF_APIENTRYP renderbufferStorage)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
381 void (QGLF_APIENTRYP sampleCoverage)(GLclampf value, GLboolean invert);
382 void (QGLF_APIENTRYP shaderBinary)(GLint n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLint length);
383 void (QGLF_APIENTRYP shaderSource)(GLuint shader, GLsizei count, const char** string, const GLint* length);
384 void (QGLF_APIENTRYP stencilFuncSeparate)(GLenum face, GLenum func, GLint ref, GLuint mask);
385 void (QGLF_APIENTRYP stencilMaskSeparate)(GLenum face, GLuint mask);
386 void (QGLF_APIENTRYP stencilOpSeparate)(GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
387 void (QGLF_APIENTRYP uniform1f)(GLint location, GLfloat x);
388 void (QGLF_APIENTRYP uniform1fv)(GLint location, GLsizei count, const GLfloat* v);
389 void (QGLF_APIENTRYP uniform1i)(GLint location, GLint x);
390 void (QGLF_APIENTRYP uniform1iv)(GLint location, GLsizei count, const GLint* v);
391 void (QGLF_APIENTRYP uniform2f)(GLint location, GLfloat x, GLfloat y);
392 void (QGLF_APIENTRYP uniform2fv)(GLint location, GLsizei count, const GLfloat* v);
393 void (QGLF_APIENTRYP uniform2i)(GLint location, GLint x, GLint y);
394 void (QGLF_APIENTRYP uniform2iv)(GLint location, GLsizei count, const GLint* v);
395 void (QGLF_APIENTRYP uniform3f)(GLint location, GLfloat x, GLfloat y, GLfloat z);
396 void (QGLF_APIENTRYP uniform3fv)(GLint location, GLsizei count, const GLfloat* v);
397 void (QGLF_APIENTRYP uniform3i)(GLint location, GLint x, GLint y, GLint z);
398 void (QGLF_APIENTRYP uniform3iv)(GLint location, GLsizei count, const GLint* v);
399 void (QGLF_APIENTRYP uniform4f)(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
400 void (QGLF_APIENTRYP uniform4fv)(GLint location, GLsizei count, const GLfloat* v);
401 void (QGLF_APIENTRYP uniform4i)(GLint location, GLint x, GLint y, GLint z, GLint w);
402 void (QGLF_APIENTRYP uniform4iv)(GLint location, GLsizei count, const GLint* v);
403 void (QGLF_APIENTRYP uniformMatrix2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
404 void (QGLF_APIENTRYP uniformMatrix3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
405 void (QGLF_APIENTRYP uniformMatrix4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
406 void (QGLF_APIENTRYP useProgram)(GLuint program);
407 void (QGLF_APIENTRYP validateProgram)(GLuint program);
408 void (QGLF_APIENTRYP vertexAttrib1f)(GLuint indx, GLfloat x);
409 void (QGLF_APIENTRYP vertexAttrib1fv)(GLuint indx, const GLfloat* values);
410 void (QGLF_APIENTRYP vertexAttrib2f)(GLuint indx, GLfloat x, GLfloat y);
411 void (QGLF_APIENTRYP vertexAttrib2fv)(GLuint indx, const GLfloat* values);
412 void (QGLF_APIENTRYP vertexAttrib3f)(GLuint indx, GLfloat x, GLfloat y, GLfloat z);
413 void (QGLF_APIENTRYP vertexAttrib3fv)(GLuint indx, const GLfloat* values);
414 void (QGLF_APIENTRYP vertexAttrib4f)(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
415 void (QGLF_APIENTRYP vertexAttrib4fv)(GLuint indx, const GLfloat* values);
416 void (QGLF_APIENTRYP vertexAttribPointer)(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr);
420 inline void QGLFunctions::glActiveTexture(GLenum texture)
422 #if defined(QT_OPENGL_ES_1) || defined(QT_OPENGL_ES_2)
423 ::glActiveTexture(texture);
425 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
426 d_ptr->activeTexture(texture);
430 inline void QGLFunctions::glAttachShader(GLuint program, GLuint shader)
432 #if defined(QT_OPENGL_ES_2)
433 ::glAttachShader(program, shader);
435 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
436 d_ptr->attachShader(program, shader);
440 inline void QGLFunctions::glBindAttribLocation(GLuint program, GLuint index, const char* name)
442 #if defined(QT_OPENGL_ES_2)
443 ::glBindAttribLocation(program, index, name);
445 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
446 d_ptr->bindAttribLocation(program, index, name);
450 inline void QGLFunctions::glBindBuffer(GLenum target, GLuint buffer)
452 #if defined(QT_OPENGL_ES_1) || defined(QT_OPENGL_ES_2)
453 ::glBindBuffer(target, buffer);
455 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
456 d_ptr->bindBuffer(target, buffer);
460 inline void QGLFunctions::glBindFramebuffer(GLenum target, GLuint framebuffer)
462 #if defined(QT_OPENGL_ES_2)
463 ::glBindFramebuffer(target, framebuffer);
465 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
466 d_ptr->bindFramebuffer(target, framebuffer);
470 inline void QGLFunctions::glBindRenderbuffer(GLenum target, GLuint renderbuffer)
472 #if defined(QT_OPENGL_ES_2)
473 ::glBindRenderbuffer(target, renderbuffer);
475 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
476 d_ptr->bindRenderbuffer(target, renderbuffer);
480 inline void QGLFunctions::glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
482 #if defined(QT_OPENGL_ES_2)
483 ::glBlendColor(red, green, blue, alpha);
485 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
486 d_ptr->blendColor(red, green, blue, alpha);
490 inline void QGLFunctions::glBlendEquation(GLenum mode)
492 #if defined(QT_OPENGL_ES_2)
493 ::glBlendEquation(mode);
495 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
496 d_ptr->blendEquation(mode);
500 inline void QGLFunctions::glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha)
502 #if defined(QT_OPENGL_ES_2)
503 ::glBlendEquationSeparate(modeRGB, modeAlpha);
505 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
506 d_ptr->blendEquationSeparate(modeRGB, modeAlpha);
510 inline void QGLFunctions::glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
512 #if defined(QT_OPENGL_ES_2)
513 ::glBlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha);
515 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
516 d_ptr->blendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha);
520 inline void QGLFunctions::glBufferData(GLenum target, qgl_GLsizeiptr size, const void* data, GLenum usage)
522 #if defined(QT_OPENGL_ES_1) || defined(QT_OPENGL_ES_2)
523 ::glBufferData(target, size, data, usage);
525 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
526 d_ptr->bufferData(target, size, data, usage);
530 inline void QGLFunctions::glBufferSubData(GLenum target, qgl_GLintptr offset, qgl_GLsizeiptr size, const void* data)
532 #if defined(QT_OPENGL_ES_1) || defined(QT_OPENGL_ES_2)
533 ::glBufferSubData(target, offset, size, data);
535 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
536 d_ptr->bufferSubData(target, offset, size, data);
540 inline GLenum QGLFunctions::glCheckFramebufferStatus(GLenum target)
542 #if defined(QT_OPENGL_ES_2)
543 return ::glCheckFramebufferStatus(target);
545 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
546 return d_ptr->checkFramebufferStatus(target);
550 inline void QGLFunctions::glClearDepthf(GLclampf depth)
553 ::glClearDepth(depth);
555 ::glClearDepthf(depth);
559 inline void QGLFunctions::glCompileShader(GLuint shader)
561 #if defined(QT_OPENGL_ES_2)
562 ::glCompileShader(shader);
564 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
565 d_ptr->compileShader(shader);
569 inline void QGLFunctions::glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data)
571 #if defined(QT_OPENGL_ES_1) || defined(QT_OPENGL_ES_2)
572 ::glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data);
574 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
575 d_ptr->compressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data);
579 inline void QGLFunctions::glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data)
581 #if defined(QT_OPENGL_ES_1) || defined(QT_OPENGL_ES_2)
582 ::glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data);
584 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
585 d_ptr->compressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data);
589 inline GLuint QGLFunctions::glCreateProgram()
591 #if defined(QT_OPENGL_ES_2)
592 return ::glCreateProgram();
594 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
595 return d_ptr->createProgram();
599 inline GLuint QGLFunctions::glCreateShader(GLenum type)
601 #if defined(QT_OPENGL_ES_2)
602 return ::glCreateShader(type);
604 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
605 return d_ptr->createShader(type);
609 inline void QGLFunctions::glDeleteBuffers(GLsizei n, const GLuint* buffers)
611 #if defined(QT_OPENGL_ES_1) || defined(QT_OPENGL_ES_2)
612 ::glDeleteBuffers(n, buffers);
614 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
615 d_ptr->deleteBuffers(n, buffers);
619 inline void QGLFunctions::glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers)
621 #if defined(QT_OPENGL_ES_2)
622 ::glDeleteFramebuffers(n, framebuffers);
624 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
625 d_ptr->deleteFramebuffers(n, framebuffers);
629 inline void QGLFunctions::glDeleteProgram(GLuint program)
631 #if defined(QT_OPENGL_ES_2)
632 ::glDeleteProgram(program);
634 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
635 d_ptr->deleteProgram(program);
639 inline void QGLFunctions::glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers)
641 #if defined(QT_OPENGL_ES_2)
642 ::glDeleteRenderbuffers(n, renderbuffers);
644 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
645 d_ptr->deleteRenderbuffers(n, renderbuffers);
649 inline void QGLFunctions::glDeleteShader(GLuint shader)
651 #if defined(QT_OPENGL_ES_2)
652 ::glDeleteShader(shader);
654 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
655 d_ptr->deleteShader(shader);
659 inline void QGLFunctions::glDepthRangef(GLclampf zNear, GLclampf zFar)
662 ::glDepthRange(zNear, zFar);
664 ::glDepthRangef(zNear, zFar);
668 inline void QGLFunctions::glDetachShader(GLuint program, GLuint shader)
670 #if defined(QT_OPENGL_ES_2)
671 ::glDetachShader(program, shader);
673 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
674 d_ptr->detachShader(program, shader);
678 inline void QGLFunctions::glDisableVertexAttribArray(GLuint index)
680 #if defined(QT_OPENGL_ES_2)
681 ::glDisableVertexAttribArray(index);
683 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
684 d_ptr->disableVertexAttribArray(index);
688 inline void QGLFunctions::glEnableVertexAttribArray(GLuint index)
690 #if defined(QT_OPENGL_ES_2)
691 ::glEnableVertexAttribArray(index);
693 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
694 d_ptr->enableVertexAttribArray(index);
698 inline void QGLFunctions::glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
700 #if defined(QT_OPENGL_ES_2)
701 ::glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);
703 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
704 d_ptr->framebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);
708 inline void QGLFunctions::glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
710 #if defined(QT_OPENGL_ES_2)
711 ::glFramebufferTexture2D(target, attachment, textarget, texture, level);
713 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
714 d_ptr->framebufferTexture2D(target, attachment, textarget, texture, level);
718 inline void QGLFunctions::glGenBuffers(GLsizei n, GLuint* buffers)
720 #if defined(QT_OPENGL_ES_1) || defined(QT_OPENGL_ES_2)
721 ::glGenBuffers(n, buffers);
723 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
724 d_ptr->genBuffers(n, buffers);
728 inline void QGLFunctions::glGenerateMipmap(GLenum target)
730 #if defined(QT_OPENGL_ES_2)
731 ::glGenerateMipmap(target);
733 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
734 d_ptr->generateMipmap(target);
738 inline void QGLFunctions::glGenFramebuffers(GLsizei n, GLuint* framebuffers)
740 #if defined(QT_OPENGL_ES_2)
741 ::glGenFramebuffers(n, framebuffers);
743 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
744 d_ptr->genFramebuffers(n, framebuffers);
748 inline void QGLFunctions::glGenRenderbuffers(GLsizei n, GLuint* renderbuffers)
750 #if defined(QT_OPENGL_ES_2)
751 ::glGenRenderbuffers(n, renderbuffers);
753 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
754 d_ptr->genRenderbuffers(n, renderbuffers);
758 inline void QGLFunctions::glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name)
760 #if defined(QT_OPENGL_ES_2)
761 ::glGetActiveAttrib(program, index, bufsize, length, size, type, name);
763 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
764 d_ptr->getActiveAttrib(program, index, bufsize, length, size, type, name);
768 inline void QGLFunctions::glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name)
770 #if defined(QT_OPENGL_ES_2)
771 ::glGetActiveUniform(program, index, bufsize, length, size, type, name);
773 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
774 d_ptr->getActiveUniform(program, index, bufsize, length, size, type, name);
778 inline void QGLFunctions::glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders)
780 #if defined(QT_OPENGL_ES_2)
781 ::glGetAttachedShaders(program, maxcount, count, shaders);
783 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
784 d_ptr->getAttachedShaders(program, maxcount, count, shaders);
788 inline int QGLFunctions::glGetAttribLocation(GLuint program, const char* name)
790 #if defined(QT_OPENGL_ES_2)
791 return ::glGetAttribLocation(program, name);
793 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
794 return d_ptr->getAttribLocation(program, name);
798 inline void QGLFunctions::glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params)
800 #if defined(QT_OPENGL_ES_2)
801 ::glGetBufferParameteriv(target, pname, params);
803 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
804 d_ptr->getBufferParameteriv(target, pname, params);
808 inline void QGLFunctions::glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params)
810 #if defined(QT_OPENGL_ES_2)
811 ::glGetFramebufferAttachmentParameteriv(target, attachment, pname, params);
813 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
814 d_ptr->getFramebufferAttachmentParameteriv(target, attachment, pname, params);
818 inline void QGLFunctions::glGetProgramiv(GLuint program, GLenum pname, GLint* params)
820 #if defined(QT_OPENGL_ES_2)
821 ::glGetProgramiv(program, pname, params);
823 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
824 d_ptr->getProgramiv(program, pname, params);
828 inline void QGLFunctions::glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, char* infolog)
830 #if defined(QT_OPENGL_ES_2)
831 ::glGetProgramInfoLog(program, bufsize, length, infolog);
833 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
834 d_ptr->getProgramInfoLog(program, bufsize, length, infolog);
838 inline void QGLFunctions::glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params)
840 #if defined(QT_OPENGL_ES_2)
841 ::glGetRenderbufferParameteriv(target, pname, params);
843 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
844 d_ptr->getRenderbufferParameteriv(target, pname, params);
848 inline void QGLFunctions::glGetShaderiv(GLuint shader, GLenum pname, GLint* params)
850 #if defined(QT_OPENGL_ES_2)
851 ::glGetShaderiv(shader, pname, params);
853 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
854 d_ptr->getShaderiv(shader, pname, params);
858 inline void QGLFunctions::glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog)
860 #if defined(QT_OPENGL_ES_2)
861 ::glGetShaderInfoLog(shader, bufsize, length, infolog);
863 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
864 d_ptr->getShaderInfoLog(shader, bufsize, length, infolog);
868 inline void QGLFunctions::glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision)
870 #if defined(QT_OPENGL_ES_2)
871 ::glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision);
873 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
874 d_ptr->getShaderPrecisionFormat(shadertype, precisiontype, range, precision);
878 inline void QGLFunctions::glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, char* source)
880 #if defined(QT_OPENGL_ES_2)
881 ::glGetShaderSource(shader, bufsize, length, source);
883 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
884 d_ptr->getShaderSource(shader, bufsize, length, source);
888 inline void QGLFunctions::glGetUniformfv(GLuint program, GLint location, GLfloat* params)
890 #if defined(QT_OPENGL_ES_2)
891 ::glGetUniformfv(program, location, params);
893 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
894 d_ptr->getUniformfv(program, location, params);
898 inline void QGLFunctions::glGetUniformiv(GLuint program, GLint location, GLint* params)
900 #if defined(QT_OPENGL_ES_2)
901 ::glGetUniformiv(program, location, params);
903 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
904 d_ptr->getUniformiv(program, location, params);
908 inline int QGLFunctions::glGetUniformLocation(GLuint program, const char* name)
910 #if defined(QT_OPENGL_ES_2)
911 return ::glGetUniformLocation(program, name);
913 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
914 return d_ptr->getUniformLocation(program, name);
918 inline void QGLFunctions::glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params)
920 #if defined(QT_OPENGL_ES_2)
921 ::glGetVertexAttribfv(index, pname, params);
923 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
924 d_ptr->getVertexAttribfv(index, pname, params);
928 inline void QGLFunctions::glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params)
930 #if defined(QT_OPENGL_ES_2)
931 ::glGetVertexAttribiv(index, pname, params);
933 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
934 d_ptr->getVertexAttribiv(index, pname, params);
938 inline void QGLFunctions::glGetVertexAttribPointerv(GLuint index, GLenum pname, void** pointer)
940 #if defined(QT_OPENGL_ES_2)
941 ::glGetVertexAttribPointerv(index, pname, pointer);
943 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
944 d_ptr->getVertexAttribPointerv(index, pname, pointer);
948 inline GLboolean QGLFunctions::glIsBuffer(GLuint buffer)
950 #if defined(QT_OPENGL_ES_1) || defined(QT_OPENGL_ES_2)
951 return ::glIsBuffer(buffer);
953 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
954 return d_ptr->isBuffer(buffer);
958 inline GLboolean QGLFunctions::glIsFramebuffer(GLuint framebuffer)
960 #if defined(QT_OPENGL_ES_2)
961 return ::glIsFramebuffer(framebuffer);
963 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
964 return d_ptr->isFramebuffer(framebuffer);
968 inline GLboolean QGLFunctions::glIsProgram(GLuint program)
970 #if defined(QT_OPENGL_ES_2)
971 return ::glIsProgram(program);
973 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
974 return d_ptr->isProgram(program);
978 inline GLboolean QGLFunctions::glIsRenderbuffer(GLuint renderbuffer)
980 #if defined(QT_OPENGL_ES_2)
981 return ::glIsRenderbuffer(renderbuffer);
983 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
984 return d_ptr->isRenderbuffer(renderbuffer);
988 inline GLboolean QGLFunctions::glIsShader(GLuint shader)
990 #if defined(QT_OPENGL_ES_2)
991 return ::glIsShader(shader);
993 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
994 return d_ptr->isShader(shader);
998 inline void QGLFunctions::glLinkProgram(GLuint program)
1000 #if defined(QT_OPENGL_ES_2)
1001 ::glLinkProgram(program);
1003 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1004 d_ptr->linkProgram(program);
1008 inline void QGLFunctions::glReleaseShaderCompiler()
1010 #if defined(QT_OPENGL_ES_2)
1011 ::glReleaseShaderCompiler();
1013 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1014 d_ptr->releaseShaderCompiler();
1018 inline void QGLFunctions::glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
1020 #if defined(QT_OPENGL_ES_2)
1021 ::glRenderbufferStorage(target, internalformat, width, height);
1023 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1024 d_ptr->renderbufferStorage(target, internalformat, width, height);
1028 inline void QGLFunctions::glSampleCoverage(GLclampf value, GLboolean invert)
1030 #if defined(QT_OPENGL_ES_1) || defined(QT_OPENGL_ES_2)
1031 ::glSampleCoverage(value, invert);
1033 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1034 d_ptr->sampleCoverage(value, invert);
1038 inline void QGLFunctions::glShaderBinary(GLint n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLint length)
1040 #if defined(QT_OPENGL_ES_2)
1041 ::glShaderBinary(n, shaders, binaryformat, binary, length);
1043 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1044 d_ptr->shaderBinary(n, shaders, binaryformat, binary, length);
1048 inline void QGLFunctions::glShaderSource(GLuint shader, GLsizei count, const char** string, const GLint* length)
1050 #if defined(QT_OPENGL_ES_2)
1051 ::glShaderSource(shader, count, string, length);
1053 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1054 d_ptr->shaderSource(shader, count, string, length);
1058 inline void QGLFunctions::glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask)
1060 #if defined(QT_OPENGL_ES_2)
1061 ::glStencilFuncSeparate(face, func, ref, mask);
1063 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1064 d_ptr->stencilFuncSeparate(face, func, ref, mask);
1068 inline void QGLFunctions::glStencilMaskSeparate(GLenum face, GLuint mask)
1070 #if defined(QT_OPENGL_ES_2)
1071 ::glStencilMaskSeparate(face, mask);
1073 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1074 d_ptr->stencilMaskSeparate(face, mask);
1078 inline void QGLFunctions::glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass)
1080 #if defined(QT_OPENGL_ES_2)
1081 ::glStencilOpSeparate(face, fail, zfail, zpass);
1083 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1084 d_ptr->stencilOpSeparate(face, fail, zfail, zpass);
1088 inline void QGLFunctions::glUniform1f(GLint location, GLfloat x)
1090 #if defined(QT_OPENGL_ES_2)
1091 ::glUniform1f(location, x);
1093 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1094 d_ptr->uniform1f(location, x);
1098 inline void QGLFunctions::glUniform1fv(GLint location, GLsizei count, const GLfloat* v)
1100 #if defined(QT_OPENGL_ES_2)
1101 ::glUniform1fv(location, count, v);
1103 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1104 d_ptr->uniform1fv(location, count, v);
1108 inline void QGLFunctions::glUniform1i(GLint location, GLint x)
1110 #if defined(QT_OPENGL_ES_2)
1111 ::glUniform1i(location, x);
1113 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1114 d_ptr->uniform1i(location, x);
1118 inline void QGLFunctions::glUniform1iv(GLint location, GLsizei count, const GLint* v)
1120 #if defined(QT_OPENGL_ES_2)
1121 ::glUniform1iv(location, count, v);
1123 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1124 d_ptr->uniform1iv(location, count, v);
1128 inline void QGLFunctions::glUniform2f(GLint location, GLfloat x, GLfloat y)
1130 #if defined(QT_OPENGL_ES_2)
1131 ::glUniform2f(location, x, y);
1133 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1134 d_ptr->uniform2f(location, x, y);
1138 inline void QGLFunctions::glUniform2fv(GLint location, GLsizei count, const GLfloat* v)
1140 #if defined(QT_OPENGL_ES_2)
1141 ::glUniform2fv(location, count, v);
1143 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1144 d_ptr->uniform2fv(location, count, v);
1148 inline void QGLFunctions::glUniform2i(GLint location, GLint x, GLint y)
1150 #if defined(QT_OPENGL_ES_2)
1151 ::glUniform2i(location, x, y);
1153 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1154 d_ptr->uniform2i(location, x, y);
1158 inline void QGLFunctions::glUniform2iv(GLint location, GLsizei count, const GLint* v)
1160 #if defined(QT_OPENGL_ES_2)
1161 ::glUniform2iv(location, count, v);
1163 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1164 d_ptr->uniform2iv(location, count, v);
1168 inline void QGLFunctions::glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z)
1170 #if defined(QT_OPENGL_ES_2)
1171 ::glUniform3f(location, x, y, z);
1173 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1174 d_ptr->uniform3f(location, x, y, z);
1178 inline void QGLFunctions::glUniform3fv(GLint location, GLsizei count, const GLfloat* v)
1180 #if defined(QT_OPENGL_ES_2)
1181 ::glUniform3fv(location, count, v);
1183 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1184 d_ptr->uniform3fv(location, count, v);
1188 inline void QGLFunctions::glUniform3i(GLint location, GLint x, GLint y, GLint z)
1190 #if defined(QT_OPENGL_ES_2)
1191 ::glUniform3i(location, x, y, z);
1193 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1194 d_ptr->uniform3i(location, x, y, z);
1198 inline void QGLFunctions::glUniform3iv(GLint location, GLsizei count, const GLint* v)
1200 #if defined(QT_OPENGL_ES_2)
1201 ::glUniform3iv(location, count, v);
1203 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1204 d_ptr->uniform3iv(location, count, v);
1208 inline void QGLFunctions::glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
1210 #if defined(QT_OPENGL_ES_2)
1211 ::glUniform4f(location, x, y, z, w);
1213 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1214 d_ptr->uniform4f(location, x, y, z, w);
1218 inline void QGLFunctions::glUniform4fv(GLint location, GLsizei count, const GLfloat* v)
1220 #if defined(QT_OPENGL_ES_2)
1221 ::glUniform4fv(location, count, v);
1223 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1224 d_ptr->uniform4fv(location, count, v);
1228 inline void QGLFunctions::glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w)
1230 #if defined(QT_OPENGL_ES_2)
1231 ::glUniform4i(location, x, y, z, w);
1233 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1234 d_ptr->uniform4i(location, x, y, z, w);
1238 inline void QGLFunctions::glUniform4iv(GLint location, GLsizei count, const GLint* v)
1240 #if defined(QT_OPENGL_ES_2)
1241 ::glUniform4iv(location, count, v);
1243 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1244 d_ptr->uniform4iv(location, count, v);
1248 inline void QGLFunctions::glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
1250 #if defined(QT_OPENGL_ES_2)
1251 ::glUniformMatrix2fv(location, count, transpose, value);
1253 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1254 d_ptr->uniformMatrix2fv(location, count, transpose, value);
1258 inline void QGLFunctions::glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
1260 #if defined(QT_OPENGL_ES_2)
1261 ::glUniformMatrix3fv(location, count, transpose, value);
1263 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1264 d_ptr->uniformMatrix3fv(location, count, transpose, value);
1268 inline void QGLFunctions::glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
1270 #if defined(QT_OPENGL_ES_2)
1271 ::glUniformMatrix4fv(location, count, transpose, value);
1273 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1274 d_ptr->uniformMatrix4fv(location, count, transpose, value);
1278 inline void QGLFunctions::glUseProgram(GLuint program)
1280 #if defined(QT_OPENGL_ES_2)
1281 ::glUseProgram(program);
1283 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1284 d_ptr->useProgram(program);
1288 inline void QGLFunctions::glValidateProgram(GLuint program)
1290 #if defined(QT_OPENGL_ES_2)
1291 ::glValidateProgram(program);
1293 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1294 d_ptr->validateProgram(program);
1298 inline void QGLFunctions::glVertexAttrib1f(GLuint indx, GLfloat x)
1300 #if defined(QT_OPENGL_ES_2)
1301 ::glVertexAttrib1f(indx, x);
1303 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1304 d_ptr->vertexAttrib1f(indx, x);
1308 inline void QGLFunctions::glVertexAttrib1fv(GLuint indx, const GLfloat* values)
1310 #if defined(QT_OPENGL_ES_2)
1311 ::glVertexAttrib1fv(indx, values);
1313 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1314 d_ptr->vertexAttrib1fv(indx, values);
1318 inline void QGLFunctions::glVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y)
1320 #if defined(QT_OPENGL_ES_2)
1321 ::glVertexAttrib2f(indx, x, y);
1323 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1324 d_ptr->vertexAttrib2f(indx, x, y);
1328 inline void QGLFunctions::glVertexAttrib2fv(GLuint indx, const GLfloat* values)
1330 #if defined(QT_OPENGL_ES_2)
1331 ::glVertexAttrib2fv(indx, values);
1333 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1334 d_ptr->vertexAttrib2fv(indx, values);
1338 inline void QGLFunctions::glVertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z)
1340 #if defined(QT_OPENGL_ES_2)
1341 ::glVertexAttrib3f(indx, x, y, z);
1343 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1344 d_ptr->vertexAttrib3f(indx, x, y, z);
1348 inline void QGLFunctions::glVertexAttrib3fv(GLuint indx, const GLfloat* values)
1350 #if defined(QT_OPENGL_ES_2)
1351 ::glVertexAttrib3fv(indx, values);
1353 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1354 d_ptr->vertexAttrib3fv(indx, values);
1358 inline void QGLFunctions::glVertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
1360 #if defined(QT_OPENGL_ES_2)
1361 ::glVertexAttrib4f(indx, x, y, z, w);
1363 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1364 d_ptr->vertexAttrib4f(indx, x, y, z, w);
1368 inline void QGLFunctions::glVertexAttrib4fv(GLuint indx, const GLfloat* values)
1370 #if defined(QT_OPENGL_ES_2)
1371 ::glVertexAttrib4fv(indx, values);
1373 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1374 d_ptr->vertexAttrib4fv(indx, values);
1378 inline void QGLFunctions::glVertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr)
1380 #if defined(QT_OPENGL_ES_2)
1381 ::glVertexAttribPointer(indx, size, type, normalized, stride, ptr);
1383 Q_ASSERT(QGLFunctions::isInitialized(d_ptr));
1384 d_ptr->vertexAttribPointer(indx, size, type, normalized, stride, ptr);
1388 #ifndef GL_ACTIVE_ATTRIBUTE_MAX_LENGTH
1389 #define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
1391 #ifndef GL_ACTIVE_ATTRIBUTES
1392 #define GL_ACTIVE_ATTRIBUTES 0x8B89
1394 #ifndef GL_ACTIVE_TEXTURE
1395 #define GL_ACTIVE_TEXTURE 0x84E0
1397 #ifndef GL_ACTIVE_UNIFORM_MAX_LENGTH
1398 #define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
1400 #ifndef GL_ACTIVE_UNIFORMS
1401 #define GL_ACTIVE_UNIFORMS 0x8B86
1403 #ifndef GL_ALIASED_LINE_WIDTH_RANGE
1404 #define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
1406 #ifndef GL_ALIASED_POINT_SIZE_RANGE
1407 #define GL_ALIASED_POINT_SIZE_RANGE 0x846D
1410 #define GL_ALPHA 0x1906
1412 #ifndef GL_ALPHA_BITS
1413 #define GL_ALPHA_BITS 0x0D55
1416 #define GL_ALWAYS 0x0207
1418 #ifndef GL_ARRAY_BUFFER
1419 #define GL_ARRAY_BUFFER 0x8892
1421 #ifndef GL_ARRAY_BUFFER_BINDING
1422 #define GL_ARRAY_BUFFER_BINDING 0x8894
1424 #ifndef GL_ATTACHED_SHADERS
1425 #define GL_ATTACHED_SHADERS 0x8B85
1428 #define GL_BACK 0x0405
1431 #define GL_BLEND 0x0BE2
1433 #ifndef GL_BLEND_COLOR
1434 #define GL_BLEND_COLOR 0x8005
1436 #ifndef GL_BLEND_DST_ALPHA
1437 #define GL_BLEND_DST_ALPHA 0x80CA
1439 #ifndef GL_BLEND_DST_RGB
1440 #define GL_BLEND_DST_RGB 0x80C8
1442 #ifndef GL_BLEND_EQUATION
1443 #define GL_BLEND_EQUATION 0x8009
1445 #ifndef GL_BLEND_EQUATION_ALPHA
1446 #define GL_BLEND_EQUATION_ALPHA 0x883D
1448 #ifndef GL_BLEND_EQUATION_RGB
1449 #define GL_BLEND_EQUATION_RGB 0x8009
1451 #ifndef GL_BLEND_SRC_ALPHA
1452 #define GL_BLEND_SRC_ALPHA 0x80CB
1454 #ifndef GL_BLEND_SRC_RGB
1455 #define GL_BLEND_SRC_RGB 0x80C9
1457 #ifndef GL_BLUE_BITS
1458 #define GL_BLUE_BITS 0x0D54
1461 #define GL_BOOL 0x8B56
1463 #ifndef GL_BOOL_VEC2
1464 #define GL_BOOL_VEC2 0x8B57
1466 #ifndef GL_BOOL_VEC3
1467 #define GL_BOOL_VEC3 0x8B58
1469 #ifndef GL_BOOL_VEC4
1470 #define GL_BOOL_VEC4 0x8B59
1472 #ifndef GL_BUFFER_SIZE
1473 #define GL_BUFFER_SIZE 0x8764
1475 #ifndef GL_BUFFER_USAGE
1476 #define GL_BUFFER_USAGE 0x8765
1479 #define GL_BYTE 0x1400
1482 #define GL_CCW 0x0901
1484 #ifndef GL_CLAMP_TO_EDGE
1485 #define GL_CLAMP_TO_EDGE 0x812F
1487 #ifndef GL_COLOR_ATTACHMENT0
1488 #define GL_COLOR_ATTACHMENT0 0x8CE0
1490 #ifndef GL_COLOR_BUFFER_BIT
1491 #define GL_COLOR_BUFFER_BIT 0x00004000
1493 #ifndef GL_COLOR_CLEAR_VALUE
1494 #define GL_COLOR_CLEAR_VALUE 0x0C22
1496 #ifndef GL_COLOR_WRITEMASK
1497 #define GL_COLOR_WRITEMASK 0x0C23
1499 #ifndef GL_COMPILE_STATUS
1500 #define GL_COMPILE_STATUS 0x8B81
1502 #ifndef GL_COMPRESSED_TEXTURE_FORMATS
1503 #define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
1505 #ifndef GL_CONSTANT_ALPHA
1506 #define GL_CONSTANT_ALPHA 0x8003
1508 #ifndef GL_CONSTANT_COLOR
1509 #define GL_CONSTANT_COLOR 0x8001
1511 #ifndef GL_CULL_FACE
1512 #define GL_CULL_FACE 0x0B44
1514 #ifndef GL_CULL_FACE_MODE
1515 #define GL_CULL_FACE_MODE 0x0B45
1517 #ifndef GL_CURRENT_PROGRAM
1518 #define GL_CURRENT_PROGRAM 0x8B8D
1520 #ifndef GL_CURRENT_VERTEX_ATTRIB
1521 #define GL_CURRENT_VERTEX_ATTRIB 0x8626
1524 #define GL_CW 0x0900
1527 #define GL_DECR 0x1E03
1529 #ifndef GL_DECR_WRAP
1530 #define GL_DECR_WRAP 0x8508
1532 #ifndef GL_DELETE_STATUS
1533 #define GL_DELETE_STATUS 0x8B80
1535 #ifndef GL_DEPTH_ATTACHMENT
1536 #define GL_DEPTH_ATTACHMENT 0x8D00
1538 #ifndef GL_DEPTH_BITS
1539 #define GL_DEPTH_BITS 0x0D56
1541 #ifndef GL_DEPTH_BUFFER_BIT
1542 #define GL_DEPTH_BUFFER_BIT 0x00000100
1544 #ifndef GL_DEPTH_CLEAR_VALUE
1545 #define GL_DEPTH_CLEAR_VALUE 0x0B73
1547 #ifndef GL_DEPTH_COMPONENT
1548 #define GL_DEPTH_COMPONENT 0x1902
1550 #ifndef GL_DEPTH_COMPONENT16
1551 #define GL_DEPTH_COMPONENT16 0x81A5
1553 #ifndef GL_DEPTH_FUNC
1554 #define GL_DEPTH_FUNC 0x0B74
1556 #ifndef GL_DEPTH_RANGE
1557 #define GL_DEPTH_RANGE 0x0B70
1559 #ifndef GL_DEPTH_TEST
1560 #define GL_DEPTH_TEST 0x0B71
1562 #ifndef GL_DEPTH_WRITEMASK
1563 #define GL_DEPTH_WRITEMASK 0x0B72
1566 #define GL_DITHER 0x0BD0
1568 #ifndef GL_DONT_CARE
1569 #define GL_DONT_CARE 0x1100
1571 #ifndef GL_DST_ALPHA
1572 #define GL_DST_ALPHA 0x0304
1574 #ifndef GL_DST_COLOR
1575 #define GL_DST_COLOR 0x0306
1577 #ifndef GL_DYNAMIC_DRAW
1578 #define GL_DYNAMIC_DRAW 0x88E8
1580 #ifndef GL_ELEMENT_ARRAY_BUFFER
1581 #define GL_ELEMENT_ARRAY_BUFFER 0x8893
1583 #ifndef GL_ELEMENT_ARRAY_BUFFER_BINDING
1584 #define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
1587 #define GL_EQUAL 0x0202
1589 #ifndef GL_EXTENSIONS
1590 #define GL_EXTENSIONS 0x1F03
1596 #define GL_FASTEST 0x1101
1599 #define GL_FIXED 0x140C
1602 #define GL_FLOAT 0x1406
1604 #ifndef GL_FLOAT_MAT2
1605 #define GL_FLOAT_MAT2 0x8B5A
1607 #ifndef GL_FLOAT_MAT3
1608 #define GL_FLOAT_MAT3 0x8B5B
1610 #ifndef GL_FLOAT_MAT4
1611 #define GL_FLOAT_MAT4 0x8B5C
1613 #ifndef GL_FLOAT_VEC2
1614 #define GL_FLOAT_VEC2 0x8B50
1616 #ifndef GL_FLOAT_VEC3
1617 #define GL_FLOAT_VEC3 0x8B51
1619 #ifndef GL_FLOAT_VEC4
1620 #define GL_FLOAT_VEC4 0x8B52
1622 #ifndef GL_FRAGMENT_SHADER
1623 #define GL_FRAGMENT_SHADER 0x8B30
1625 #ifndef GL_FRAMEBUFFER
1626 #define GL_FRAMEBUFFER 0x8D40
1628 #ifndef GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME
1629 #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
1631 #ifndef GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE
1632 #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
1634 #ifndef GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE
1635 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
1637 #ifndef GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL
1638 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
1640 #ifndef GL_FRAMEBUFFER_BINDING
1641 #define GL_FRAMEBUFFER_BINDING 0x8CA6
1643 #ifndef GL_FRAMEBUFFER_COMPLETE
1644 #define GL_FRAMEBUFFER_COMPLETE 0x8CD5
1646 #ifndef GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT
1647 #define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
1649 #ifndef GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS
1650 #define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9
1652 #ifndef GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT
1653 #define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
1655 #ifndef GL_FRAMEBUFFER_UNSUPPORTED
1656 #define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
1659 #define GL_FRONT 0x0404
1661 #ifndef GL_FRONT_AND_BACK
1662 #define GL_FRONT_AND_BACK 0x0408
1664 #ifndef GL_FRONT_FACE
1665 #define GL_FRONT_FACE 0x0B46
1668 #define GL_FUNC_ADD 0x8006
1670 #ifndef GL_FUNC_REVERSE_SUBTRACT
1671 #define GL_FUNC_REVERSE_SUBTRACT 0x800B
1673 #ifndef GL_FUNC_SUBTRACT
1674 #define GL_FUNC_SUBTRACT 0x800A
1676 #ifndef GL_GENERATE_MIPMAP_HINT
1677 #define GL_GENERATE_MIPMAP_HINT 0x8192
1680 #define GL_GEQUAL 0x0206
1683 #define GL_GREATER 0x0204
1685 #ifndef GL_GREEN_BITS
1686 #define GL_GREEN_BITS 0x0D53
1688 #ifndef GL_HIGH_FLOAT
1689 #define GL_HIGH_FLOAT 0x8DF2
1692 #define GL_HIGH_INT 0x8DF5
1694 #ifndef GL_IMPLEMENTATION_COLOR_READ_FORMAT
1695 #define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
1697 #ifndef GL_IMPLEMENTATION_COLOR_READ_TYPE
1698 #define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A
1701 #define GL_INCR 0x1E02
1703 #ifndef GL_INCR_WRAP
1704 #define GL_INCR_WRAP 0x8507
1706 #ifndef GL_INFO_LOG_LENGTH
1707 #define GL_INFO_LOG_LENGTH 0x8B84
1710 #define GL_INT 0x1404
1713 #define GL_INT_VEC2 0x8B53
1716 #define GL_INT_VEC3 0x8B54
1719 #define GL_INT_VEC4 0x8B55
1721 #ifndef GL_INVALID_ENUM
1722 #define GL_INVALID_ENUM 0x0500
1724 #ifndef GL_INVALID_FRAMEBUFFER_OPERATION
1725 #define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506
1727 #ifndef GL_INVALID_OPERATION
1728 #define GL_INVALID_OPERATION 0x0502
1730 #ifndef GL_INVALID_VALUE
1731 #define GL_INVALID_VALUE 0x0501
1734 #define GL_INVERT 0x150A
1737 #define GL_KEEP 0x1E00
1740 #define GL_LEQUAL 0x0203
1743 #define GL_LESS 0x0201
1746 #define GL_LINEAR 0x2601
1748 #ifndef GL_LINEAR_MIPMAP_LINEAR
1749 #define GL_LINEAR_MIPMAP_LINEAR 0x2703
1751 #ifndef GL_LINEAR_MIPMAP_NEAREST
1752 #define GL_LINEAR_MIPMAP_NEAREST 0x2701
1754 #ifndef GL_LINE_LOOP
1755 #define GL_LINE_LOOP 0x0002
1758 #define GL_LINES 0x0001
1760 #ifndef GL_LINE_STRIP
1761 #define GL_LINE_STRIP 0x0003
1763 #ifndef GL_LINE_WIDTH
1764 #define GL_LINE_WIDTH 0x0B21
1766 #ifndef GL_LINK_STATUS
1767 #define GL_LINK_STATUS 0x8B82
1769 #ifndef GL_LOW_FLOAT
1770 #define GL_LOW_FLOAT 0x8DF0
1773 #define GL_LOW_INT 0x8DF3
1775 #ifndef GL_LUMINANCE
1776 #define GL_LUMINANCE 0x1909
1778 #ifndef GL_LUMINANCE_ALPHA
1779 #define GL_LUMINANCE_ALPHA 0x190A
1781 #ifndef GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS
1782 #define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
1784 #ifndef GL_MAX_CUBE_MAP_TEXTURE_SIZE
1785 #define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
1787 #ifndef GL_MAX_FRAGMENT_UNIFORM_VECTORS
1788 #define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD
1790 #ifndef GL_MAX_RENDERBUFFER_SIZE
1791 #define GL_MAX_RENDERBUFFER_SIZE 0x84E8
1793 #ifndef GL_MAX_TEXTURE_IMAGE_UNITS
1794 #define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
1796 #ifndef GL_MAX_TEXTURE_SIZE
1797 #define GL_MAX_TEXTURE_SIZE 0x0D33
1799 #ifndef GL_MAX_VARYING_VECTORS
1800 #define GL_MAX_VARYING_VECTORS 0x8DFC
1802 #ifndef GL_MAX_VERTEX_ATTRIBS
1803 #define GL_MAX_VERTEX_ATTRIBS 0x8869
1805 #ifndef GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS
1806 #define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
1808 #ifndef GL_MAX_VERTEX_UNIFORM_VECTORS
1809 #define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB
1811 #ifndef GL_MAX_VIEWPORT_DIMS
1812 #define GL_MAX_VIEWPORT_DIMS 0x0D3A
1814 #ifndef GL_MEDIUM_FLOAT
1815 #define GL_MEDIUM_FLOAT 0x8DF1
1817 #ifndef GL_MEDIUM_INT
1818 #define GL_MEDIUM_INT 0x8DF4
1820 #ifndef GL_MIRRORED_REPEAT
1821 #define GL_MIRRORED_REPEAT 0x8370
1824 #define GL_NEAREST 0x2600
1826 #ifndef GL_NEAREST_MIPMAP_LINEAR
1827 #define GL_NEAREST_MIPMAP_LINEAR 0x2702
1829 #ifndef GL_NEAREST_MIPMAP_NEAREST
1830 #define GL_NEAREST_MIPMAP_NEAREST 0x2700
1833 #define GL_NEVER 0x0200
1836 #define GL_NICEST 0x1102
1839 #define GL_NO_ERROR 0
1845 #define GL_NOTEQUAL 0x0205
1847 #ifndef GL_NUM_COMPRESSED_TEXTURE_FORMATS
1848 #define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
1850 #ifndef GL_NUM_SHADER_BINARY_FORMATS
1851 #define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9
1856 #ifndef GL_ONE_MINUS_CONSTANT_ALPHA
1857 #define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
1859 #ifndef GL_ONE_MINUS_CONSTANT_COLOR
1860 #define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
1862 #ifndef GL_ONE_MINUS_DST_ALPHA
1863 #define GL_ONE_MINUS_DST_ALPHA 0x0305
1865 #ifndef GL_ONE_MINUS_DST_COLOR
1866 #define GL_ONE_MINUS_DST_COLOR 0x0307
1868 #ifndef GL_ONE_MINUS_SRC_ALPHA
1869 #define GL_ONE_MINUS_SRC_ALPHA 0x0303
1871 #ifndef GL_ONE_MINUS_SRC_COLOR
1872 #define GL_ONE_MINUS_SRC_COLOR 0x0301
1874 #ifndef GL_OUT_OF_MEMORY
1875 #define GL_OUT_OF_MEMORY 0x0505
1877 #ifndef GL_PACK_ALIGNMENT
1878 #define GL_PACK_ALIGNMENT 0x0D05
1881 #define GL_POINTS 0x0000
1883 #ifndef GL_POLYGON_OFFSET_FACTOR
1884 #define GL_POLYGON_OFFSET_FACTOR 0x8038
1886 #ifndef GL_POLYGON_OFFSET_FILL
1887 #define GL_POLYGON_OFFSET_FILL 0x8037
1889 #ifndef GL_POLYGON_OFFSET_UNITS
1890 #define GL_POLYGON_OFFSET_UNITS 0x2A00
1893 #define GL_RED_BITS 0x0D52
1895 #ifndef GL_RENDERBUFFER
1896 #define GL_RENDERBUFFER 0x8D41
1898 #ifndef GL_RENDERBUFFER_ALPHA_SIZE
1899 #define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53
1901 #ifndef GL_RENDERBUFFER_BINDING
1902 #define GL_RENDERBUFFER_BINDING 0x8CA7
1904 #ifndef GL_RENDERBUFFER_BLUE_SIZE
1905 #define GL_RENDERBUFFER_BLUE_SIZE 0x8D52
1907 #ifndef GL_RENDERBUFFER_DEPTH_SIZE
1908 #define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54
1910 #ifndef GL_RENDERBUFFER_GREEN_SIZE
1911 #define GL_RENDERBUFFER_GREEN_SIZE 0x8D51
1913 #ifndef GL_RENDERBUFFER_HEIGHT
1914 #define GL_RENDERBUFFER_HEIGHT 0x8D43
1916 #ifndef GL_RENDERBUFFER_INTERNAL_FORMAT
1917 #define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44
1919 #ifndef GL_RENDERBUFFER_RED_SIZE
1920 #define GL_RENDERBUFFER_RED_SIZE 0x8D50
1922 #ifndef GL_RENDERBUFFER_STENCIL_SIZE
1923 #define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55
1925 #ifndef GL_RENDERBUFFER_WIDTH
1926 #define GL_RENDERBUFFER_WIDTH 0x8D42
1929 #define GL_RENDERER 0x1F01
1932 #define GL_REPEAT 0x2901
1935 #define GL_REPLACE 0x1E01
1938 #define GL_RGB 0x1907
1941 #define GL_RGB565 0x8D62
1944 #define GL_RGB5_A1 0x8057
1947 #define GL_RGBA 0x1908
1950 #define GL_RGBA4 0x8056
1953 #define GL_BGRA 0x80E1
1955 #ifndef GL_SAMPLE_ALPHA_TO_COVERAGE
1956 #define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
1958 #ifndef GL_SAMPLE_BUFFERS
1959 #define GL_SAMPLE_BUFFERS 0x80A8
1961 #ifndef GL_SAMPLE_COVERAGE
1962 #define GL_SAMPLE_COVERAGE 0x80A0
1964 #ifndef GL_SAMPLE_COVERAGE_INVERT
1965 #define GL_SAMPLE_COVERAGE_INVERT 0x80AB
1967 #ifndef GL_SAMPLE_COVERAGE_VALUE
1968 #define GL_SAMPLE_COVERAGE_VALUE 0x80AA
1970 #ifndef GL_SAMPLER_2D
1971 #define GL_SAMPLER_2D 0x8B5E
1973 #ifndef GL_SAMPLER_CUBE
1974 #define GL_SAMPLER_CUBE 0x8B60
1977 #define GL_SAMPLES 0x80A9
1979 #ifndef GL_SCISSOR_BOX
1980 #define GL_SCISSOR_BOX 0x0C10
1982 #ifndef GL_SCISSOR_TEST
1983 #define GL_SCISSOR_TEST 0x0C11
1985 #ifndef GL_SHADER_BINARY_FORMATS
1986 #define GL_SHADER_BINARY_FORMATS 0x8DF8
1988 #ifndef GL_SHADER_COMPILER
1989 #define GL_SHADER_COMPILER 0x8DFA
1991 #ifndef GL_SHADER_SOURCE_LENGTH
1992 #define GL_SHADER_SOURCE_LENGTH 0x8B88
1994 #ifndef GL_SHADER_TYPE
1995 #define GL_SHADER_TYPE 0x8B4F
1997 #ifndef GL_SHADING_LANGUAGE_VERSION
1998 #define GL_SHADING_LANGUAGE_VERSION 0x8B8C
2001 #define GL_SHORT 0x1402
2003 #ifndef GL_SRC_ALPHA
2004 #define GL_SRC_ALPHA 0x0302
2006 #ifndef GL_SRC_ALPHA_SATURATE
2007 #define GL_SRC_ALPHA_SATURATE 0x0308
2009 #ifndef GL_SRC_COLOR
2010 #define GL_SRC_COLOR 0x0300
2012 #ifndef GL_STATIC_DRAW
2013 #define GL_STATIC_DRAW 0x88E4
2015 #ifndef GL_STENCIL_ATTACHMENT
2016 #define GL_STENCIL_ATTACHMENT 0x8D20
2018 #ifndef GL_STENCIL_BACK_FAIL
2019 #define GL_STENCIL_BACK_FAIL 0x8801
2021 #ifndef GL_STENCIL_BACK_FUNC
2022 #define GL_STENCIL_BACK_FUNC 0x8800
2024 #ifndef GL_STENCIL_BACK_PASS_DEPTH_FAIL
2025 #define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
2027 #ifndef GL_STENCIL_BACK_PASS_DEPTH_PASS
2028 #define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
2030 #ifndef GL_STENCIL_BACK_REF
2031 #define GL_STENCIL_BACK_REF 0x8CA3
2033 #ifndef GL_STENCIL_BACK_VALUE_MASK
2034 #define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
2036 #ifndef GL_STENCIL_BACK_WRITEMASK
2037 #define GL_STENCIL_BACK_WRITEMASK 0x8CA5
2039 #ifndef GL_STENCIL_BITS
2040 #define GL_STENCIL_BITS 0x0D57
2042 #ifndef GL_STENCIL_BUFFER_BIT
2043 #define GL_STENCIL_BUFFER_BIT 0x00000400
2045 #ifndef GL_STENCIL_CLEAR_VALUE
2046 #define GL_STENCIL_CLEAR_VALUE 0x0B91
2048 #ifndef GL_STENCIL_FAIL
2049 #define GL_STENCIL_FAIL 0x0B94
2051 #ifndef GL_STENCIL_FUNC
2052 #define GL_STENCIL_FUNC 0x0B92
2054 #ifndef GL_STENCIL_INDEX
2055 #define GL_STENCIL_INDEX 0x1901
2057 #ifndef GL_STENCIL_INDEX8
2058 #define GL_STENCIL_INDEX8 0x8D48
2060 #ifndef GL_STENCIL_PASS_DEPTH_FAIL
2061 #define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
2063 #ifndef GL_STENCIL_PASS_DEPTH_PASS
2064 #define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
2066 #ifndef GL_STENCIL_REF
2067 #define GL_STENCIL_REF 0x0B97
2069 #ifndef GL_STENCIL_TEST
2070 #define GL_STENCIL_TEST 0x0B90
2072 #ifndef GL_STENCIL_VALUE_MASK
2073 #define GL_STENCIL_VALUE_MASK 0x0B93
2075 #ifndef GL_STENCIL_WRITEMASK
2076 #define GL_STENCIL_WRITEMASK 0x0B98
2078 #ifndef GL_STREAM_DRAW
2079 #define GL_STREAM_DRAW 0x88E0
2081 #ifndef GL_SUBPIXEL_BITS
2082 #define GL_SUBPIXEL_BITS 0x0D50
2085 #define GL_TEXTURE0 0x84C0
2088 #define GL_TEXTURE 0x1702
2090 #ifndef GL_TEXTURE10
2091 #define GL_TEXTURE10 0x84CA
2094 #define GL_TEXTURE1 0x84C1
2096 #ifndef GL_TEXTURE11
2097 #define GL_TEXTURE11 0x84CB
2099 #ifndef GL_TEXTURE12
2100 #define GL_TEXTURE12 0x84CC
2102 #ifndef GL_TEXTURE13
2103 #define GL_TEXTURE13 0x84CD
2105 #ifndef GL_TEXTURE14
2106 #define GL_TEXTURE14 0x84CE
2108 #ifndef GL_TEXTURE15
2109 #define GL_TEXTURE15 0x84CF
2111 #ifndef GL_TEXTURE16
2112 #define GL_TEXTURE16 0x84D0
2114 #ifndef GL_TEXTURE17
2115 #define GL_TEXTURE17 0x84D1
2117 #ifndef GL_TEXTURE18
2118 #define GL_TEXTURE18 0x84D2
2120 #ifndef GL_TEXTURE19
2121 #define GL_TEXTURE19 0x84D3
2123 #ifndef GL_TEXTURE20
2124 #define GL_TEXTURE20 0x84D4
2127 #define GL_TEXTURE2 0x84C2
2129 #ifndef GL_TEXTURE21
2130 #define GL_TEXTURE21 0x84D5
2132 #ifndef GL_TEXTURE22
2133 #define GL_TEXTURE22 0x84D6
2135 #ifndef GL_TEXTURE23
2136 #define GL_TEXTURE23 0x84D7
2138 #ifndef GL_TEXTURE24
2139 #define GL_TEXTURE24 0x84D8
2141 #ifndef GL_TEXTURE25
2142 #define GL_TEXTURE25 0x84D9
2144 #ifndef GL_TEXTURE26
2145 #define GL_TEXTURE26 0x84DA
2147 #ifndef GL_TEXTURE27
2148 #define GL_TEXTURE27 0x84DB
2150 #ifndef GL_TEXTURE28
2151 #define GL_TEXTURE28 0x84DC
2153 #ifndef GL_TEXTURE29
2154 #define GL_TEXTURE29 0x84DD
2156 #ifndef GL_TEXTURE_2D
2157 #define GL_TEXTURE_2D 0x0DE1
2159 #ifndef GL_TEXTURE30
2160 #define GL_TEXTURE30 0x84DE
2163 #define GL_TEXTURE3 0x84C3
2165 #ifndef GL_TEXTURE31
2166 #define GL_TEXTURE31 0x84DF
2169 #define GL_TEXTURE4 0x84C4
2172 #define GL_TEXTURE5 0x84C5
2175 #define GL_TEXTURE6 0x84C6
2178 #define GL_TEXTURE7 0x84C7
2181 #define GL_TEXTURE8 0x84C8
2184 #define GL_TEXTURE9 0x84C9
2186 #ifndef GL_TEXTURE_BINDING_2D
2187 #define GL_TEXTURE_BINDING_2D 0x8069
2189 #ifndef GL_TEXTURE_BINDING_CUBE_MAP
2190 #define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
2192 #ifndef GL_TEXTURE_CUBE_MAP
2193 #define GL_TEXTURE_CUBE_MAP 0x8513
2195 #ifndef GL_TEXTURE_CUBE_MAP_NEGATIVE_X
2196 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
2198 #ifndef GL_TEXTURE_CUBE_MAP_NEGATIVE_Y
2199 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
2201 #ifndef GL_TEXTURE_CUBE_MAP_NEGATIVE_Z
2202 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
2204 #ifndef GL_TEXTURE_CUBE_MAP_POSITIVE_X
2205 #define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
2207 #ifndef GL_TEXTURE_CUBE_MAP_POSITIVE_Y
2208 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
2210 #ifndef GL_TEXTURE_CUBE_MAP_POSITIVE_Z
2211 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
2213 #ifndef GL_TEXTURE_MAG_FILTER
2214 #define GL_TEXTURE_MAG_FILTER 0x2800
2216 #ifndef GL_TEXTURE_MIN_FILTER
2217 #define GL_TEXTURE_MIN_FILTER 0x2801
2219 #ifndef GL_TEXTURE_WRAP_S
2220 #define GL_TEXTURE_WRAP_S 0x2802
2222 #ifndef GL_TEXTURE_WRAP_T
2223 #define GL_TEXTURE_WRAP_T 0x2803
2225 #ifndef GL_TRIANGLE_FAN
2226 #define GL_TRIANGLE_FAN 0x0006
2228 #ifndef GL_TRIANGLES
2229 #define GL_TRIANGLES 0x0004
2231 #ifndef GL_TRIANGLE_STRIP
2232 #define GL_TRIANGLE_STRIP 0x0005
2237 #ifndef GL_UNPACK_ALIGNMENT
2238 #define GL_UNPACK_ALIGNMENT 0x0CF5
2240 #ifndef GL_UNSIGNED_BYTE
2241 #define GL_UNSIGNED_BYTE 0x1401
2243 #ifndef GL_UNSIGNED_INT
2244 #define GL_UNSIGNED_INT 0x1405
2246 #ifndef GL_UNSIGNED_SHORT
2247 #define GL_UNSIGNED_SHORT 0x1403
2249 #ifndef GL_UNSIGNED_SHORT_4_4_4_4
2250 #define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
2252 #ifndef GL_UNSIGNED_SHORT_5_5_5_1
2253 #define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
2255 #ifndef GL_UNSIGNED_SHORT_5_6_5
2256 #define GL_UNSIGNED_SHORT_5_6_5 0x8363
2258 #ifndef GL_VALIDATE_STATUS
2259 #define GL_VALIDATE_STATUS 0x8B83
2262 #define GL_VENDOR 0x1F00
2265 #define GL_VERSION 0x1F02
2267 #ifndef GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING
2268 #define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
2270 #ifndef GL_VERTEX_ATTRIB_ARRAY_ENABLED
2271 #define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
2273 #ifndef GL_VERTEX_ATTRIB_ARRAY_NORMALIZED
2274 #define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
2276 #ifndef GL_VERTEX_ATTRIB_ARRAY_POINTER
2277 #define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
2279 #ifndef GL_VERTEX_ATTRIB_ARRAY_SIZE
2280 #define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
2282 #ifndef GL_VERTEX_ATTRIB_ARRAY_STRIDE
2283 #define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
2285 #ifndef GL_VERTEX_ATTRIB_ARRAY_TYPE
2286 #define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
2288 #ifndef GL_VERTEX_SHADER
2289 #define GL_VERTEX_SHADER 0x8B31
2292 #define GL_VIEWPORT 0x0BA2