1 /****************************************************************************
2 **
3 ** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
4 ** Copyright (C) 2016 The Qt Company Ltd.
5 ** Contact: https://www.qt.io/licensing/
6 **
7 ** This file is part of the QtGui module of the Qt Toolkit.
8 **
9 ** $QT_BEGIN_LICENSE:LGPL$
10 ** Commercial License Usage
11 ** Licensees holding valid commercial Qt licenses may use this file in
12 ** accordance with the commercial license agreement provided with the
13 ** Software or, alternatively, in accordance with the terms contained in
14 ** a written agreement between you and The Qt Company. For licensing terms
15 ** and conditions see https://www.qt.io/terms-conditions. For further
16 ** information use the contact form at https://www.qt.io/contact-us.
17 **
18 ** GNU Lesser General Public License Usage
19 ** Alternatively, this file may be used under the terms of the GNU Lesser
20 ** General Public License version 3 as published by the Free Software
21 ** Foundation and appearing in the file LICENSE.LGPL3 included in the
22 ** packaging of this file. Please review the following information to
23 ** ensure the GNU Lesser General Public License version 3 requirements
24 ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
25 **
26 ** GNU General Public License Usage
27 ** Alternatively, this file may be used under the terms of the GNU
28 ** General Public License version 2.0 or (at your option) the GNU General
29 ** Public license version 3 or any later version approved by the KDE Free
30 ** Qt Foundation. The licenses are as published by the Free Software
31 ** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
32 ** included in the packaging of this file. Please review the following
33 ** information to ensure the GNU General Public License requirements will
34 ** be met: https://www.gnu.org/licenses/gpl-2.0.html and
35 ** https://www.gnu.org/licenses/gpl-3.0.html.
36 **
37 ** $QT_END_LICENSE$
38 **
39 **
40 ** This file was generated by glgen version 0.1
41 ** Command line was: glgen
42 **
43 ** glgen is Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
44 **
45 ** This is an auto-generated file.
46 ** Do not edit! All changes made to it will be lost.
47 **
48 ****************************************************************************/
49 
50 #ifndef QOPENGLVERSIONFUNCTIONS_H
51 #define QOPENGLVERSIONFUNCTIONS_H
52 
53 #include <QtGui/qtguiglobal.h>
54 
55 #ifndef QT_NO_OPENGL
56 
57 #if QT_DEPRECATED_SINCE(5, 6)
58 #include <QtCore/qhash.h>
59 #endif
60 #include <QtCore/qhashfunctions.h>
61 #include <QtCore/qpair.h>
62 #include <QtGui/qopengl.h>
63 
64 // MemoryBarrier is a macro on some architectures on Windows
65 #ifdef Q_OS_WIN
66 #pragma push_macro("MemoryBarrier")
67 #undef MemoryBarrier
68 #endif
69 
70 QT_BEGIN_NAMESPACE
71 
72 class QOpenGLContext;
73 
74 #if 0
75 // silence syncqt warnings
76 #pragma qt_class(QOpenGLVersionFunctions)
77 #pragma qt_sync_stop_processing
78 #endif
79 
80 #define QOPENGL_DEPRECATEDFUNCTION \
81     qFatal("This function was erroneously included in previous versions of Qt and is here only for binary compatibility. " \
82            "If you need to use this function, please use a legacy OpenGL version or a Compatibility profile.")
83 
84 struct QOpenGLVersionStatus
85 {
86     enum OpenGLStatus {
87         CoreStatus,
88         DeprecatedStatus,
89         InvalidStatus
90     };
91 
QOpenGLVersionStatusQOpenGLVersionStatus92     Q_DECL_CONSTEXPR QOpenGLVersionStatus()
93         : version(0, 0),
94           status(InvalidStatus)
95     {}
96 
QOpenGLVersionStatusQOpenGLVersionStatus97     Q_DECL_CONSTEXPR QOpenGLVersionStatus(int majorVersion, int minorVersion, QOpenGLVersionStatus::OpenGLStatus functionStatus)
98         : version(majorVersion, minorVersion),
99           status(functionStatus)
100     {}
101 
102     QPair<int, int> version;
103     OpenGLStatus status;
104 };
105 
106 inline uint qHash(const QOpenGLVersionStatus &v, uint seed = 0) noexcept
107 {
108     return qHash(static_cast<int>(v.status * 1000)
109                + v.version.first * 100 + v.version.second * 10, seed);
110 }
111 
112 Q_DECL_CONSTEXPR inline bool operator==(const QOpenGLVersionStatus &lhs, const QOpenGLVersionStatus &rhs)
113 {
114     return lhs.status == rhs.status && lhs.version == rhs.version;
115 }
116 
117 Q_DECL_CONSTEXPR inline bool operator!=(const QOpenGLVersionStatus &lhs, const QOpenGLVersionStatus &rhs)
118 {
119     return !operator==(lhs, rhs);
120 }
121 
122 #define QT_OPENGL_DECLARE_FUNCTIONS(ret, name, args) \
123     ret (QOPENGLF_APIENTRYP name)args;
124 #define QT_OPENGL_COUNT_FUNCTIONS(ret, name, args) +1
125 
126 #define QT_OPENGL_DECLARE(FUNCTIONS) \
127 public: \
128     struct Functions { \
129         FUNCTIONS(QT_OPENGL_DECLARE_FUNCTIONS) \
130     }; \
131     union { \
132         QFunctionPointer functions[FUNCTIONS(QT_OPENGL_COUNT_FUNCTIONS)]; \
133         Functions f; \
134     }; \
135 private: \
136     void init()
137 
138 class QOpenGLVersionFunctionsBackend
139 {
140 public:
141 #define QT_OPENGL_VERSIONS(F) \
142         F(1_0_Core) \
143         F(1_1_Core) \
144         F(1_2_Core) \
145         F(1_3_Core) \
146         F(1_4_Core) \
147         F(1_5_Core) \
148         F(2_0_Core) \
149         F(2_1_Core) \
150         F(3_0_Core) \
151         F(3_1_Core) \
152         F(3_2_Core) \
153         F(3_3_Core) \
154         F(4_0_Core) \
155         F(4_1_Core) \
156         F(4_2_Core) \
157         F(4_3_Core) \
158         F(4_4_Core) \
159         F(4_5_Core) \
160         F(1_0_Deprecated) \
161         F(1_1_Deprecated) \
162         F(1_2_Deprecated) \
163         F(1_3_Deprecated) \
164         F(1_4_Deprecated) \
165         F(2_0_Deprecated) \
166         F(3_0_Deprecated) \
167         F(3_3_Deprecated) \
168         F(4_5_Deprecated) \
169 
170 #define VERSION_ENUM(X) OpenGL_##X,
171     enum Version {
172         QT_OPENGL_VERSIONS(VERSION_ENUM)
173         OpenGLVersionBackendCount
174     };
175 #undef VERSION_ENUM
176 
QOpenGLVersionFunctionsBackend(QOpenGLContext * ctx)177     QOpenGLVersionFunctionsBackend(QOpenGLContext *ctx)
178         : context(ctx)
179     {}
180 
181     QOpenGLContext *context;
182     QAtomicInt refs;
183 };
184 
185 class QOpenGLVersionFunctionsStorage
186 {
187 public:
188     QOpenGLVersionFunctionsStorage();
189     ~QOpenGLVersionFunctionsStorage();
190 
191     QOpenGLVersionFunctionsBackend *backend(QOpenGLContext *context, QOpenGLVersionFunctionsBackend::Version v);
192 
193     QOpenGLVersionFunctionsBackend **backends;
194 };
195 
196 class QAbstractOpenGLFunctions;
197 
198 class QAbstractOpenGLFunctionsPrivate
199 {
200 public:
QAbstractOpenGLFunctionsPrivate()201     QAbstractOpenGLFunctionsPrivate()
202         : owningContext(nullptr),
203           initialized(false)
204     {}
205 
206     static QOpenGLVersionFunctionsBackend *functionsBackend(QOpenGLContext *context, QOpenGLVersionFunctionsBackend::Version v);
207     static void insertExternalFunctions(QOpenGLContext *context, QAbstractOpenGLFunctions *f);
208     static void removeExternalFunctions(QOpenGLContext *context, QAbstractOpenGLFunctions *f);
209 
210     static QAbstractOpenGLFunctionsPrivate *get(QAbstractOpenGLFunctions *q);
211 
212     QOpenGLContext *owningContext;
213     bool initialized;
214 };
215 
216 class Q_GUI_EXPORT QAbstractOpenGLFunctions
217 {
218 public:
219     virtual ~QAbstractOpenGLFunctions();
220 
221     virtual bool initializeOpenGLFunctions();
222 
223     Q_DISABLE_COPY(QAbstractOpenGLFunctions)
224     Q_DECLARE_PRIVATE(QAbstractOpenGLFunctions)
225 
226 protected:
227     QAbstractOpenGLFunctions();
228     QAbstractOpenGLFunctionsPrivate *d_ptr;
229 
230     bool isInitialized() const;
231 
232     void setOwningContext(const QOpenGLContext *context);
233     QOpenGLContext *owningContext() const;
234 
235     friend class QOpenGLContext;
236 };
237 
get(QAbstractOpenGLFunctions * q)238 inline QAbstractOpenGLFunctionsPrivate *QAbstractOpenGLFunctionsPrivate::get(QAbstractOpenGLFunctions *q)
239 {
240     return q->d_func();
241 }
242 
243 #if !defined(QT_OPENGL_ES_2)
244 
245 class QOpenGLFunctions_1_0_CoreBackend : public QOpenGLVersionFunctionsBackend
246 {
247 public:
QOpenGLFunctions_1_0_CoreBackend(QOpenGLContext * c)248     QOpenGLFunctions_1_0_CoreBackend(QOpenGLContext *c)
249         : QOpenGLVersionFunctionsBackend(c)
250     {
251         init();
252     }
253 
versionStatus()254     Q_DECL_CONSTEXPR static Version versionStatus()
255     { return OpenGL_1_0_Core; }
256 
257     // OpenGL 1.0 core functions
258 #define QT_OPENGL_1_0_FUNCTIONS(F) \
259     F(void, Viewport, (GLint x, GLint y, GLsizei width, GLsizei height)) \
260     F(void, DepthRange, (GLdouble nearVal, GLdouble farVal)) \
261     F(GLboolean, IsEnabled, (GLenum cap)) \
262     F(void, GetTexLevelParameteriv, (GLenum target, GLint level, GLenum pname, GLint *params)) \
263     F(void, GetTexLevelParameterfv, (GLenum target, GLint level, GLenum pname, GLfloat *params)) \
264     F(void, GetTexParameteriv, (GLenum target, GLenum pname, GLint *params)) \
265     F(void, GetTexParameterfv, (GLenum target, GLenum pname, GLfloat *params)) \
266     F(void, GetTexImage, (GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels)) \
267     F(const GLubyte *, GetString, (GLenum name)) \
268     F(void, GetIntegerv, (GLenum pname, GLint *data)) \
269     F(void, GetFloatv, (GLenum pname, GLfloat *data)) \
270     F(GLenum, GetError, ()) \
271     F(void, GetDoublev, (GLenum pname, GLdouble *data)) \
272     F(void, GetBooleanv, (GLenum pname, GLboolean *data)) \
273     F(void, ReadPixels, (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels)) \
274     F(void, ReadBuffer, (GLenum src)) \
275     F(void, PixelStorei, (GLenum pname, GLint param)) \
276     F(void, PixelStoref, (GLenum pname, GLfloat param)) \
277     F(void, DepthFunc, (GLenum func)) \
278     F(void, StencilOp, (GLenum fail, GLenum zfail, GLenum zpass)) \
279     F(void, StencilFunc, (GLenum func, GLint ref, GLuint mask)) \
280     F(void, LogicOp, (GLenum opcode)) \
281     F(void, BlendFunc, (GLenum sfactor, GLenum dfactor)) \
282     F(void, Flush, ()) \
283     F(void, Finish, ()) \
284     F(void, Enable, (GLenum cap)) \
285     F(void, Disable, (GLenum cap)) \
286     F(void, DepthMask, (GLboolean flag)) \
287     F(void, ColorMask, (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)) \
288     F(void, StencilMask, (GLuint mask)) \
289     F(void, ClearDepth, (GLdouble depth)) \
290     F(void, ClearStencil, (GLint s)) \
291     F(void, ClearColor, (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)) \
292     F(void, Clear, (GLbitfield mask)) \
293     F(void, DrawBuffer, (GLenum buf)) \
294     F(void, TexImage2D, (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels)) \
295     F(void, TexImage1D, (GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels)) \
296     F(void, TexParameteriv, (GLenum target, GLenum pname, const GLint *params)) \
297     F(void, TexParameteri, (GLenum target, GLenum pname, GLint param)) \
298     F(void, TexParameterfv, (GLenum target, GLenum pname, const GLfloat *params)) \
299     F(void, TexParameterf, (GLenum target, GLenum pname, GLfloat param)) \
300     F(void, Scissor, (GLint x, GLint y, GLsizei width, GLsizei height)) \
301     F(void, PolygonMode, (GLenum face, GLenum mode)) \
302     F(void, PointSize, (GLfloat size)) \
303     F(void, LineWidth, (GLfloat width)) \
304     F(void, Hint, (GLenum target, GLenum mode)) \
305     F(void, FrontFace, (GLenum mode)) \
306     F(void, CullFace, (GLenum mode)) \
307 
308     QT_OPENGL_DECLARE(QT_OPENGL_1_0_FUNCTIONS);
309 };
310 
311 class QOpenGLFunctions_1_1_CoreBackend : public QOpenGLVersionFunctionsBackend
312 {
313 public:
QOpenGLFunctions_1_1_CoreBackend(QOpenGLContext * c)314     QOpenGLFunctions_1_1_CoreBackend(QOpenGLContext *c)
315         : QOpenGLVersionFunctionsBackend(c)
316     {
317         init();
318     }
319 
versionStatus()320     Q_DECL_CONSTEXPR static Version versionStatus()
321     { return OpenGL_1_1_Core; }
322 
323     // OpenGL 1.1 core functions
324 #define QT_OPENGL_1_1_FUNCTIONS(F) \
325     F(void, Indexubv, (const GLubyte *c)) \
326     F(void, Indexub, (GLubyte c)) \
327     F(GLboolean, IsTexture, (GLuint texture)) \
328     F(void, GenTextures, (GLsizei n, GLuint *textures)) \
329     F(void, DeleteTextures, (GLsizei n, const GLuint *textures)) \
330     F(void, BindTexture, (GLenum target, GLuint texture)) \
331     F(void, TexSubImage2D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)) \
332     F(void, TexSubImage1D, (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels)) \
333     F(void, CopyTexSubImage2D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)) \
334     F(void, CopyTexSubImage1D, (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width)) \
335     F(void, CopyTexImage2D, (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)) \
336     F(void, CopyTexImage1D, (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border)) \
337     F(void, PolygonOffset, (GLfloat factor, GLfloat units)) \
338     F(void, GetPointerv, (GLenum pname, GLvoid* *params)) \
339     F(void, DrawElements, (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)) \
340     F(void, DrawArrays, (GLenum mode, GLint first, GLsizei count)) \
341 
342     QT_OPENGL_DECLARE(QT_OPENGL_1_1_FUNCTIONS);
343 };
344 
345 class QOpenGLFunctions_1_2_CoreBackend : public QOpenGLVersionFunctionsBackend
346 {
347 public:
QOpenGLFunctions_1_2_CoreBackend(QOpenGLContext * c)348     QOpenGLFunctions_1_2_CoreBackend(QOpenGLContext *c)
349         : QOpenGLVersionFunctionsBackend(c)
350     {
351         init();
352     }
353 
versionStatus()354     Q_DECL_CONSTEXPR static Version versionStatus()
355     { return OpenGL_1_2_Core; }
356 
357     // OpenGL 1.2 core functions
358 #define QT_OPENGL_1_2_FUNCTIONS(F) \
359     F(void, CopyTexSubImage3D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)) \
360     F(void, TexSubImage3D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels)) \
361     F(void, TexImage3D, (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels)) \
362     F(void, DrawRangeElements, (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices)) \
363     F(void, BlendEquation, (GLenum mode)) \
364     F(void, BlendColor, (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)) \
365 
366     QT_OPENGL_DECLARE(QT_OPENGL_1_2_FUNCTIONS);
367 };
368 
369 class QOpenGLFunctions_1_3_CoreBackend : public QOpenGLVersionFunctionsBackend
370 {
371 public:
QOpenGLFunctions_1_3_CoreBackend(QOpenGLContext * c)372     QOpenGLFunctions_1_3_CoreBackend(QOpenGLContext *c)
373         : QOpenGLVersionFunctionsBackend(c)
374     {
375         init();
376     }
377 
versionStatus()378     Q_DECL_CONSTEXPR static Version versionStatus()
379     { return OpenGL_1_3_Core; }
380 
381     // OpenGL 1.3 core functions
382 #define QT_OPENGL_1_3_FUNCTIONS(F) \
383     F(void, GetCompressedTexImage, (GLenum target, GLint level, GLvoid *img)) \
384     F(void, CompressedTexSubImage1D, (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data)) \
385     F(void, CompressedTexSubImage2D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data)) \
386     F(void, CompressedTexSubImage3D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data)) \
387     F(void, CompressedTexImage1D, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data)) \
388     F(void, CompressedTexImage2D, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data)) \
389     F(void, CompressedTexImage3D, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data)) \
390     F(void, SampleCoverage, (GLfloat value, GLboolean invert)) \
391     F(void, ActiveTexture, (GLenum texture)) \
392 
393     QT_OPENGL_DECLARE(QT_OPENGL_1_3_FUNCTIONS);
394 };
395 
396 class QOpenGLFunctions_1_4_CoreBackend : public QOpenGLVersionFunctionsBackend
397 {
398 public:
QOpenGLFunctions_1_4_CoreBackend(QOpenGLContext * c)399     QOpenGLFunctions_1_4_CoreBackend(QOpenGLContext *c)
400         : QOpenGLVersionFunctionsBackend(c)
401     {
402         init();
403     }
404 
versionStatus()405     Q_DECL_CONSTEXPR static Version versionStatus()
406     { return OpenGL_1_4_Core; }
407 
408     // OpenGL 1.4 core functions
409 #define QT_OPENGL_1_4_FUNCTIONS(F) \
410     F(void, PointParameteriv, (GLenum pname, const GLint *params)) \
411     F(void, PointParameteri, (GLenum pname, GLint param)) \
412     F(void, PointParameterfv, (GLenum pname, const GLfloat *params)) \
413     F(void, PointParameterf, (GLenum pname, GLfloat param)) \
414     F(void, MultiDrawElements, (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei drawcount)) \
415     F(void, MultiDrawArrays, (GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount)) \
416     F(void, BlendFuncSeparate, (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha)) \
417 
418     QT_OPENGL_DECLARE(QT_OPENGL_1_4_FUNCTIONS);
419 };
420 
421 class QOpenGLFunctions_1_5_CoreBackend : public QOpenGLVersionFunctionsBackend
422 {
423 public:
QOpenGLFunctions_1_5_CoreBackend(QOpenGLContext * c)424     QOpenGLFunctions_1_5_CoreBackend(QOpenGLContext *c)
425         : QOpenGLVersionFunctionsBackend(c)
426     {
427         init();
428     }
429 
versionStatus()430     Q_DECL_CONSTEXPR static Version versionStatus()
431     { return OpenGL_1_5_Core; }
432 
433     // OpenGL 1.5 core functions
434 #define QT_OPENGL_1_5_FUNCTIONS(F) \
435     F(void, GetBufferPointerv, (GLenum target, GLenum pname, GLvoid* *params)) \
436     F(void, GetBufferParameteriv, (GLenum target, GLenum pname, GLint *params)) \
437     F(GLboolean, UnmapBuffer, (GLenum target)) \
438     F(GLvoid*, MapBuffer, (GLenum target, GLenum access)) \
439     F(void, GetBufferSubData, (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data)) \
440     F(void, BufferSubData, (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data)) \
441     F(void, BufferData, (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage)) \
442     F(GLboolean, IsBuffer, (GLuint buffer)) \
443     F(void, GenBuffers, (GLsizei n, GLuint *buffers)) \
444     F(void, DeleteBuffers, (GLsizei n, const GLuint *buffers)) \
445     F(void, BindBuffer, (GLenum target, GLuint buffer)) \
446     F(void, GetQueryObjectuiv, (GLuint id, GLenum pname, GLuint *params)) \
447     F(void, GetQueryObjectiv, (GLuint id, GLenum pname, GLint *params)) \
448     F(void, GetQueryiv, (GLenum target, GLenum pname, GLint *params)) \
449     F(void, EndQuery, (GLenum target)) \
450     F(void, BeginQuery, (GLenum target, GLuint id)) \
451     F(GLboolean, IsQuery, (GLuint id)) \
452     F(void, DeleteQueries, (GLsizei n, const GLuint *ids)) \
453     F(void, GenQueries, (GLsizei n, GLuint *ids)) \
454 
455     QT_OPENGL_DECLARE(QT_OPENGL_1_5_FUNCTIONS);
456 };
457 
458 class QOpenGLFunctions_2_0_CoreBackend : public QOpenGLVersionFunctionsBackend
459 {
460 public:
QOpenGLFunctions_2_0_CoreBackend(QOpenGLContext * c)461     QOpenGLFunctions_2_0_CoreBackend(QOpenGLContext *c)
462         : QOpenGLVersionFunctionsBackend(c)
463     {
464         init();
465     }
466 
versionStatus()467     Q_DECL_CONSTEXPR static Version versionStatus()
468     { return OpenGL_2_0_Core; }
469 
470     // OpenGL 2.0 core functions
471 #define QT_OPENGL_2_0_FUNCTIONS(F) \
472     F(void, VertexAttribPointer, (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer)) \
473     F(void, ValidateProgram, (GLuint program)) \
474     F(void, UniformMatrix4fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
475     F(void, UniformMatrix3fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
476     F(void, UniformMatrix2fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
477     F(void, Uniform4iv, (GLint location, GLsizei count, const GLint *value)) \
478     F(void, Uniform3iv, (GLint location, GLsizei count, const GLint *value)) \
479     F(void, Uniform2iv, (GLint location, GLsizei count, const GLint *value)) \
480     F(void, Uniform1iv, (GLint location, GLsizei count, const GLint *value)) \
481     F(void, Uniform4fv, (GLint location, GLsizei count, const GLfloat *value)) \
482     F(void, Uniform3fv, (GLint location, GLsizei count, const GLfloat *value)) \
483     F(void, Uniform2fv, (GLint location, GLsizei count, const GLfloat *value)) \
484     F(void, Uniform1fv, (GLint location, GLsizei count, const GLfloat *value)) \
485     F(void, Uniform4i, (GLint location, GLint v0, GLint v1, GLint v2, GLint v3)) \
486     F(void, Uniform3i, (GLint location, GLint v0, GLint v1, GLint v2)) \
487     F(void, Uniform2i, (GLint location, GLint v0, GLint v1)) \
488     F(void, Uniform1i, (GLint location, GLint v0)) \
489     F(void, Uniform4f, (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3)) \
490     F(void, Uniform3f, (GLint location, GLfloat v0, GLfloat v1, GLfloat v2)) \
491     F(void, Uniform2f, (GLint location, GLfloat v0, GLfloat v1)) \
492     F(void, Uniform1f, (GLint location, GLfloat v0)) \
493     F(void, UseProgram, (GLuint program)) \
494     F(void, ShaderSource, (GLuint shader, GLsizei count, const GLchar* const *string, const GLint *length)) \
495     F(void, LinkProgram, (GLuint program)) \
496     F(GLboolean, IsShader, (GLuint shader)) \
497     F(GLboolean, IsProgram, (GLuint program)) \
498     F(void, GetVertexAttribPointerv, (GLuint index, GLenum pname, GLvoid* *pointer)) \
499     F(void, GetVertexAttribiv, (GLuint index, GLenum pname, GLint *params)) \
500     F(void, GetVertexAttribfv, (GLuint index, GLenum pname, GLfloat *params)) \
501     F(void, GetVertexAttribdv, (GLuint index, GLenum pname, GLdouble *params)) \
502     F(void, GetUniformiv, (GLuint program, GLint location, GLint *params)) \
503     F(void, GetUniformfv, (GLuint program, GLint location, GLfloat *params)) \
504     F(GLint, GetUniformLocation, (GLuint program, const GLchar *name)) \
505     F(void, GetShaderSource, (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source)) \
506     F(void, GetShaderInfoLog, (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog)) \
507     F(void, GetShaderiv, (GLuint shader, GLenum pname, GLint *params)) \
508     F(void, GetProgramInfoLog, (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog)) \
509     F(void, GetProgramiv, (GLuint program, GLenum pname, GLint *params)) \
510     F(GLint, GetAttribLocation, (GLuint program, const GLchar *name)) \
511     F(void, GetAttachedShaders, (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders)) \
512     F(void, GetActiveUniform, (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name)) \
513     F(void, GetActiveAttrib, (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name)) \
514     F(void, EnableVertexAttribArray, (GLuint index)) \
515     F(void, DisableVertexAttribArray, (GLuint index)) \
516     F(void, DetachShader, (GLuint program, GLuint shader)) \
517     F(void, DeleteShader, (GLuint shader)) \
518     F(void, DeleteProgram, (GLuint program)) \
519     F(GLuint, CreateShader, (GLenum type)) \
520     F(GLuint, CreateProgram, ()) \
521     F(void, CompileShader, (GLuint shader)) \
522     F(void, BindAttribLocation, (GLuint program, GLuint index, const GLchar *name)) \
523     F(void, AttachShader, (GLuint program, GLuint shader)) \
524     F(void, StencilMaskSeparate, (GLenum face, GLuint mask)) \
525     F(void, StencilFuncSeparate, (GLenum face, GLenum func, GLint ref, GLuint mask)) \
526     F(void, StencilOpSeparate, (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass)) \
527     F(void, DrawBuffers, (GLsizei n, const GLenum *bufs)) \
528     F(void, BlendEquationSeparate, (GLenum modeRGB, GLenum modeAlpha)) \
529     F(void, VertexAttrib4usv, (GLuint index, const GLushort *v)) \
530     F(void, VertexAttrib4uiv, (GLuint index, const GLuint *v)) \
531     F(void, VertexAttrib4ubv, (GLuint index, const GLubyte *v)) \
532     F(void, VertexAttrib4sv, (GLuint index, const GLshort *v)) \
533     F(void, VertexAttrib4s, (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)) \
534     F(void, VertexAttrib4iv, (GLuint index, const GLint *v)) \
535     F(void, VertexAttrib4fv, (GLuint index, const GLfloat *v)) \
536     F(void, VertexAttrib4f, (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)) \
537     F(void, VertexAttrib4dv, (GLuint index, const GLdouble *v)) \
538     F(void, VertexAttrib4d, (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)) \
539     F(void, VertexAttrib4bv, (GLuint index, const GLbyte *v)) \
540     F(void, VertexAttrib4Nusv, (GLuint index, const GLushort *v)) \
541     F(void, VertexAttrib4Nuiv, (GLuint index, const GLuint *v)) \
542     F(void, VertexAttrib4Nubv, (GLuint index, const GLubyte *v)) \
543     F(void, VertexAttrib4Nub, (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)) \
544     F(void, VertexAttrib4Nsv, (GLuint index, const GLshort *v)) \
545     F(void, VertexAttrib4Niv, (GLuint index, const GLint *v)) \
546     F(void, VertexAttrib4Nbv, (GLuint index, const GLbyte *v)) \
547     F(void, VertexAttrib3sv, (GLuint index, const GLshort *v)) \
548     F(void, VertexAttrib3s, (GLuint index, GLshort x, GLshort y, GLshort z)) \
549     F(void, VertexAttrib3fv, (GLuint index, const GLfloat *v)) \
550     F(void, VertexAttrib3f, (GLuint index, GLfloat x, GLfloat y, GLfloat z)) \
551     F(void, VertexAttrib3dv, (GLuint index, const GLdouble *v)) \
552     F(void, VertexAttrib3d, (GLuint index, GLdouble x, GLdouble y, GLdouble z)) \
553     F(void, VertexAttrib2sv, (GLuint index, const GLshort *v)) \
554     F(void, VertexAttrib2s, (GLuint index, GLshort x, GLshort y)) \
555     F(void, VertexAttrib2fv, (GLuint index, const GLfloat *v)) \
556     F(void, VertexAttrib2f, (GLuint index, GLfloat x, GLfloat y)) \
557     F(void, VertexAttrib2dv, (GLuint index, const GLdouble *v)) \
558     F(void, VertexAttrib2d, (GLuint index, GLdouble x, GLdouble y)) \
559     F(void, VertexAttrib1sv, (GLuint index, const GLshort *v)) \
560     F(void, VertexAttrib1s, (GLuint index, GLshort x)) \
561     F(void, VertexAttrib1fv, (GLuint index, const GLfloat *v)) \
562     F(void, VertexAttrib1f, (GLuint index, GLfloat x)) \
563     F(void, VertexAttrib1dv, (GLuint index, const GLdouble *v)) \
564     F(void, VertexAttrib1d, (GLuint index, GLdouble x)) \
565 
566     QT_OPENGL_DECLARE(QT_OPENGL_2_0_FUNCTIONS);
567 };
568 
569 class QOpenGLFunctions_2_1_CoreBackend : public QOpenGLVersionFunctionsBackend
570 {
571 public:
QOpenGLFunctions_2_1_CoreBackend(QOpenGLContext * c)572     QOpenGLFunctions_2_1_CoreBackend(QOpenGLContext *c)
573         : QOpenGLVersionFunctionsBackend(c)
574     {
575         init();
576     }
577 
versionStatus()578     Q_DECL_CONSTEXPR static Version versionStatus()
579     { return OpenGL_2_1_Core; }
580 
581     // OpenGL 2.1 core functions
582 #define QT_OPENGL_2_1_FUNCTIONS(F) \
583     F(void, UniformMatrix4x3fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
584     F(void, UniformMatrix3x4fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
585     F(void, UniformMatrix4x2fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
586     F(void, UniformMatrix2x4fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
587     F(void, UniformMatrix3x2fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
588     F(void, UniformMatrix2x3fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
589 
590     QT_OPENGL_DECLARE(QT_OPENGL_2_1_FUNCTIONS);
591 };
592 
593 class QOpenGLFunctions_3_0_CoreBackend : public QOpenGLVersionFunctionsBackend
594 {
595 public:
QOpenGLFunctions_3_0_CoreBackend(QOpenGLContext * c)596     QOpenGLFunctions_3_0_CoreBackend(QOpenGLContext *c)
597         : QOpenGLVersionFunctionsBackend(c)
598     {
599         init();
600     }
601 
versionStatus()602     Q_DECL_CONSTEXPR static Version versionStatus()
603     { return OpenGL_3_0_Core; }
604 
605     // OpenGL 3.0 core functions
606 #define QT_OPENGL_3_0_FUNCTIONS(F) \
607     F(GLboolean, IsVertexArray, (GLuint array)) \
608     F(void, GenVertexArrays, (GLsizei n, GLuint *arrays)) \
609     F(void, DeleteVertexArrays, (GLsizei n, const GLuint *arrays)) \
610     F(void, BindVertexArray, (GLuint array)) \
611     F(void, FlushMappedBufferRange, (GLenum target, GLintptr offset, GLsizeiptr length)) \
612     F(GLvoid *, MapBufferRange, (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access)) \
613     F(void, FramebufferTextureLayer, (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer)) \
614     F(void, RenderbufferStorageMultisample, (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)) \
615     F(void, BlitFramebuffer, (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)) \
616     F(void, GenerateMipmap, (GLenum target)) \
617     F(void, GetFramebufferAttachmentParameteriv, (GLenum target, GLenum attachment, GLenum pname, GLint *params)) \
618     F(void, FramebufferRenderbuffer, (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)) \
619     F(void, FramebufferTexture3D, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset)) \
620     F(void, FramebufferTexture2D, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)) \
621     F(void, FramebufferTexture1D, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)) \
622     F(GLenum, CheckFramebufferStatus, (GLenum target)) \
623     F(void, GenFramebuffers, (GLsizei n, GLuint *framebuffers)) \
624     F(void, DeleteFramebuffers, (GLsizei n, const GLuint *framebuffers)) \
625     F(void, BindFramebuffer, (GLenum target, GLuint framebuffer)) \
626     F(GLboolean, IsFramebuffer, (GLuint framebuffer)) \
627     F(void, GetRenderbufferParameteriv, (GLenum target, GLenum pname, GLint *params)) \
628     F(void, RenderbufferStorage, (GLenum target, GLenum internalformat, GLsizei width, GLsizei height)) \
629     F(void, GenRenderbuffers, (GLsizei n, GLuint *renderbuffers)) \
630     F(void, DeleteRenderbuffers, (GLsizei n, const GLuint *renderbuffers)) \
631     F(void, BindRenderbuffer, (GLenum target, GLuint renderbuffer)) \
632     F(GLboolean, IsRenderbuffer, (GLuint renderbuffer)) \
633     F(const GLubyte *, GetStringi, (GLenum name, GLuint index)) \
634     F(void, ClearBufferfi, (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil)) \
635     F(void, ClearBufferfv, (GLenum buffer, GLint drawbuffer, const GLfloat *value)) \
636     F(void, ClearBufferuiv, (GLenum buffer, GLint drawbuffer, const GLuint *value)) \
637     F(void, ClearBufferiv, (GLenum buffer, GLint drawbuffer, const GLint *value)) \
638     F(void, GetTexParameterIuiv, (GLenum target, GLenum pname, GLuint *params)) \
639     F(void, GetTexParameterIiv, (GLenum target, GLenum pname, GLint *params)) \
640     F(void, TexParameterIuiv, (GLenum target, GLenum pname, const GLuint *params)) \
641     F(void, TexParameterIiv, (GLenum target, GLenum pname, const GLint *params)) \
642     F(void, Uniform4uiv, (GLint location, GLsizei count, const GLuint *value)) \
643     F(void, Uniform3uiv, (GLint location, GLsizei count, const GLuint *value)) \
644     F(void, Uniform2uiv, (GLint location, GLsizei count, const GLuint *value)) \
645     F(void, Uniform1uiv, (GLint location, GLsizei count, const GLuint *value)) \
646     F(void, Uniform4ui, (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3)) \
647     F(void, Uniform3ui, (GLint location, GLuint v0, GLuint v1, GLuint v2)) \
648     F(void, Uniform2ui, (GLint location, GLuint v0, GLuint v1)) \
649     F(void, Uniform1ui, (GLint location, GLuint v0)) \
650     F(GLint, GetFragDataLocation, (GLuint program, const GLchar *name)) \
651     F(void, BindFragDataLocation, (GLuint program, GLuint color, const GLchar *name)) \
652     F(void, GetUniformuiv, (GLuint program, GLint location, GLuint *params)) \
653     F(void, GetVertexAttribIuiv, (GLuint index, GLenum pname, GLuint *params)) \
654     F(void, GetVertexAttribIiv, (GLuint index, GLenum pname, GLint *params)) \
655     F(void, VertexAttribIPointer, (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)) \
656     F(void, EndConditionalRender, ()) \
657     F(void, BeginConditionalRender, (GLuint id, GLenum mode)) \
658     F(void, ClampColor, (GLenum target, GLenum clamp)) \
659     F(void, GetTransformFeedbackVarying, (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name)) \
660     F(void, TransformFeedbackVaryings, (GLuint program, GLsizei count, const GLchar* const *varyings, GLenum bufferMode)) \
661     F(void, BindBufferBase, (GLenum target, GLuint index, GLuint buffer)) \
662     F(void, BindBufferRange, (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size)) \
663     F(void, EndTransformFeedback, ()) \
664     F(void, BeginTransformFeedback, (GLenum primitiveMode)) \
665     F(GLboolean, IsEnabledi, (GLenum target, GLuint index)) \
666     F(void, Disablei, (GLenum target, GLuint index)) \
667     F(void, Enablei, (GLenum target, GLuint index)) \
668     F(void, GetIntegeri_v,(GLenum target, GLuint index, GLint *data)) \
669     F(void, GetBooleani_v,(GLenum target, GLuint index, GLboolean *data)) \
670     F(void, ColorMaski, (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a)) \
671     F(void, VertexAttribI4usv, (GLuint index, const GLushort *v)) \
672     F(void, VertexAttribI4ubv, (GLuint index, const GLubyte *v)) \
673     F(void, VertexAttribI4sv, (GLuint index, const GLshort *v)) \
674     F(void, VertexAttribI4bv, (GLuint index, const GLbyte *v)) \
675     F(void, VertexAttribI4uiv, (GLuint index, const GLuint *v)) \
676     F(void, VertexAttribI3uiv, (GLuint index, const GLuint *v)) \
677     F(void, VertexAttribI2uiv, (GLuint index, const GLuint *v)) \
678     F(void, VertexAttribI1uiv, (GLuint index, const GLuint *v)) \
679     F(void, VertexAttribI4iv, (GLuint index, const GLint *v)) \
680     F(void, VertexAttribI3iv, (GLuint index, const GLint *v)) \
681     F(void, VertexAttribI2iv, (GLuint index, const GLint *v)) \
682     F(void, VertexAttribI1iv, (GLuint index, const GLint *v)) \
683     F(void, VertexAttribI4ui, (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)) \
684     F(void, VertexAttribI3ui, (GLuint index, GLuint x, GLuint y, GLuint z)) \
685     F(void, VertexAttribI2ui, (GLuint index, GLuint x, GLuint y)) \
686     F(void, VertexAttribI1ui, (GLuint index, GLuint x)) \
687     F(void, VertexAttribI4i, (GLuint index, GLint x, GLint y, GLint z, GLint w)) \
688     F(void, VertexAttribI3i, (GLuint index, GLint x, GLint y, GLint z)) \
689     F(void, VertexAttribI2i, (GLuint index, GLint x, GLint y)) \
690     F(void, VertexAttribI1i, (GLuint index, GLint x)) \
691 
692     QT_OPENGL_DECLARE(QT_OPENGL_3_0_FUNCTIONS);
693 };
694 
695 class QOpenGLFunctions_3_1_CoreBackend : public QOpenGLVersionFunctionsBackend
696 {
697 public:
QOpenGLFunctions_3_1_CoreBackend(QOpenGLContext * c)698     QOpenGLFunctions_3_1_CoreBackend(QOpenGLContext *c)
699         : QOpenGLVersionFunctionsBackend(c)
700     {
701         init();
702     }
703 
versionStatus()704     Q_DECL_CONSTEXPR static Version versionStatus()
705     { return OpenGL_3_1_Core; }
706 
707     // OpenGL 3.1 core functions
708 #define QT_OPENGL_3_1_FUNCTIONS(F) \
709     F(void, CopyBufferSubData, (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size)) \
710     F(void, UniformBlockBinding, (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding)) \
711     F(void, GetActiveUniformBlockName, (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName)) \
712     F(void, GetActiveUniformBlockiv, (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params)) \
713     F(GLuint, GetUniformBlockIndex, (GLuint program, const GLchar *uniformBlockName)) \
714     F(void, GetActiveUniformName, (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName)) \
715     F(void, GetActiveUniformsiv, (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params)) \
716     F(void, GetUniformIndices, (GLuint program, GLsizei uniformCount, const GLchar* const *uniformNames, GLuint *uniformIndices)) \
717     F(void, PrimitiveRestartIndex, (GLuint index)) \
718     F(void, TexBuffer, (GLenum target, GLenum internalformat, GLuint buffer)) \
719     F(void, DrawElementsInstanced, (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei instancecount)) \
720     F(void, DrawArraysInstanced, (GLenum mode, GLint first, GLsizei count, GLsizei instancecount)) \
721 
722     QT_OPENGL_DECLARE(QT_OPENGL_3_1_FUNCTIONS);
723 };
724 
725 class QOpenGLFunctions_3_2_CoreBackend : public QOpenGLVersionFunctionsBackend
726 {
727 public:
QOpenGLFunctions_3_2_CoreBackend(QOpenGLContext * c)728     QOpenGLFunctions_3_2_CoreBackend(QOpenGLContext *c)
729         : QOpenGLVersionFunctionsBackend(c)
730     {
731         init();
732     }
733 
versionStatus()734     Q_DECL_CONSTEXPR static Version versionStatus()
735     { return OpenGL_3_2_Core; }
736 
737     // OpenGL 3.2 core functions
738 #define QT_OPENGL_3_2_FUNCTIONS(F) \
739     F(void, SampleMaski, (GLuint maskNumber, GLbitfield mask)) \
740     F(void, GetMultisamplefv, (GLenum pname, GLuint index, GLfloat *val)) \
741     F(void, TexImage3DMultisample, (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations)) \
742     F(void, TexImage2DMultisample, (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations)) \
743     F(void, GetSynciv, (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values)) \
744     F(void, GetInteger64v, (GLenum pname, GLint64 *data)) \
745     F(void, WaitSync, (GLsync sync, GLbitfield flags, GLuint64 timeout)) \
746     F(GLenum, ClientWaitSync, (GLsync sync, GLbitfield flags, GLuint64 timeout)) \
747     F(void, DeleteSync, (GLsync sync)) \
748     F(GLboolean, IsSync, (GLsync sync)) \
749     F(GLsync, FenceSync, (GLenum condition, GLbitfield flags)) \
750     F(void, ProvokingVertex, (GLenum mode)) \
751     F(void, MultiDrawElementsBaseVertex, (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei drawcount, const GLint *basevertex)) \
752     F(void, DrawElementsInstancedBaseVertex, (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei instancecount, GLint basevertex)) \
753     F(void, DrawRangeElementsBaseVertex, (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex)) \
754     F(void, DrawElementsBaseVertex, (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex)) \
755     F(void, FramebufferTexture, (GLenum target, GLenum attachment, GLuint texture, GLint level)) \
756     F(void, GetBufferParameteri64v, (GLenum target, GLenum pname, GLint64 *params)) \
757     F(void, GetInteger64i_v,(GLenum target, GLuint index, GLint64 *data))
758 
759     QT_OPENGL_DECLARE(QT_OPENGL_3_2_FUNCTIONS);
760 };
761 
762 class QOpenGLFunctions_3_3_CoreBackend : public QOpenGLVersionFunctionsBackend
763 {
764 public:
QOpenGLFunctions_3_3_CoreBackend(QOpenGLContext * c)765     QOpenGLFunctions_3_3_CoreBackend(QOpenGLContext *c)
766         : QOpenGLVersionFunctionsBackend(c)
767     {
768         init();
769     }
770 
versionStatus()771     Q_DECL_CONSTEXPR static Version versionStatus()
772     { return OpenGL_3_3_Core; }
773 
774     // OpenGL 3.3 core functions
775 #define QT_OPENGL_3_3_FUNCTIONS(F) \
776     F(void, VertexAttribP4uiv, (GLuint index, GLenum type, GLboolean normalized, const GLuint *value)) \
777     F(void, VertexAttribP4ui, (GLuint index, GLenum type, GLboolean normalized, GLuint value)) \
778     F(void, VertexAttribP3uiv, (GLuint index, GLenum type, GLboolean normalized, const GLuint *value)) \
779     F(void, VertexAttribP3ui, (GLuint index, GLenum type, GLboolean normalized, GLuint value)) \
780     F(void, VertexAttribP2uiv, (GLuint index, GLenum type, GLboolean normalized, const GLuint *value)) \
781     F(void, VertexAttribP2ui, (GLuint index, GLenum type, GLboolean normalized, GLuint value)) \
782     F(void, VertexAttribP1uiv, (GLuint index, GLenum type, GLboolean normalized, const GLuint *value)) \
783     F(void, VertexAttribP1ui, (GLuint index, GLenum type, GLboolean normalized, GLuint value)) \
784     F(void, SecondaryColorP3uiv, (GLenum type, const GLuint *color)) \
785     F(void, SecondaryColorP3ui, (GLenum type, GLuint color)) \
786     F(void, ColorP4uiv, (GLenum type, const GLuint *color)) \
787     F(void, ColorP4ui, (GLenum type, GLuint color)) \
788     F(void, ColorP3uiv, (GLenum type, const GLuint *color)) \
789     F(void, ColorP3ui, (GLenum type, GLuint color)) \
790     F(void, NormalP3uiv, (GLenum type, const GLuint *coords)) \
791     F(void, NormalP3ui, (GLenum type, GLuint coords)) \
792     F(void, MultiTexCoordP4uiv, (GLenum texture, GLenum type, const GLuint *coords)) \
793     F(void, MultiTexCoordP4ui, (GLenum texture, GLenum type, GLuint coords)) \
794     F(void, MultiTexCoordP3uiv, (GLenum texture, GLenum type, const GLuint *coords)) \
795     F(void, MultiTexCoordP3ui, (GLenum texture, GLenum type, GLuint coords)) \
796     F(void, MultiTexCoordP2uiv, (GLenum texture, GLenum type, const GLuint *coords)) \
797     F(void, MultiTexCoordP2ui, (GLenum texture, GLenum type, GLuint coords)) \
798     F(void, MultiTexCoordP1uiv, (GLenum texture, GLenum type, const GLuint *coords)) \
799     F(void, MultiTexCoordP1ui, (GLenum texture, GLenum type, GLuint coords)) \
800     F(void, TexCoordP4uiv, (GLenum type, const GLuint *coords)) \
801     F(void, TexCoordP4ui, (GLenum type, GLuint coords)) \
802     F(void, TexCoordP3uiv, (GLenum type, const GLuint *coords)) \
803     F(void, TexCoordP3ui, (GLenum type, GLuint coords)) \
804     F(void, TexCoordP2uiv, (GLenum type, const GLuint *coords)) \
805     F(void, TexCoordP2ui, (GLenum type, GLuint coords)) \
806     F(void, TexCoordP1uiv, (GLenum type, const GLuint *coords)) \
807     F(void, TexCoordP1ui, (GLenum type, GLuint coords)) \
808     F(void, VertexP4uiv, (GLenum type, const GLuint *value)) \
809     F(void, VertexP4ui, (GLenum type, GLuint value)) \
810     F(void, VertexP3uiv, (GLenum type, const GLuint *value)) \
811     F(void, VertexP3ui, (GLenum type, GLuint value)) \
812     F(void, VertexP2uiv, (GLenum type, const GLuint *value)) \
813     F(void, VertexP2ui, (GLenum type, GLuint value)) \
814     F(void, GetQueryObjectui64v, (GLuint id, GLenum pname, GLuint64 *params)) \
815     F(void, GetQueryObjecti64v, (GLuint id, GLenum pname, GLint64 *params)) \
816     F(void, QueryCounter, (GLuint id, GLenum target)) \
817     F(void, GetSamplerParameterIuiv, (GLuint sampler, GLenum pname, GLuint *params)) \
818     F(void, GetSamplerParameterfv, (GLuint sampler, GLenum pname, GLfloat *params)) \
819     F(void, GetSamplerParameterIiv, (GLuint sampler, GLenum pname, GLint *params)) \
820     F(void, GetSamplerParameteriv, (GLuint sampler, GLenum pname, GLint *params)) \
821     F(void, SamplerParameterIuiv, (GLuint sampler, GLenum pname, const GLuint *param)) \
822     F(void, SamplerParameterIiv, (GLuint sampler, GLenum pname, const GLint *param)) \
823     F(void, SamplerParameterfv, (GLuint sampler, GLenum pname, const GLfloat *param)) \
824     F(void, SamplerParameterf, (GLuint sampler, GLenum pname, GLfloat param)) \
825     F(void, SamplerParameteriv, (GLuint sampler, GLenum pname, const GLint *param)) \
826     F(void, SamplerParameteri, (GLuint sampler, GLenum pname, GLint param)) \
827     F(void, BindSampler, (GLuint unit, GLuint sampler)) \
828     F(GLboolean, IsSampler, (GLuint sampler)) \
829     F(void, DeleteSamplers, (GLsizei count, const GLuint *samplers)) \
830     F(void, GenSamplers, (GLsizei count, GLuint *samplers)) \
831     F(GLint, GetFragDataIndex, (GLuint program, const GLchar *name)) \
832     F(void, BindFragDataLocationIndexed, (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name)) \
833     F(void, VertexAttribDivisor, (GLuint index, GLuint divisor)) \
834 
835     QT_OPENGL_DECLARE(QT_OPENGL_3_3_FUNCTIONS);
836 };
837 
838 class QOpenGLFunctions_4_0_CoreBackend : public QOpenGLVersionFunctionsBackend
839 {
840 public:
QOpenGLFunctions_4_0_CoreBackend(QOpenGLContext * c)841     QOpenGLFunctions_4_0_CoreBackend(QOpenGLContext *c)
842         : QOpenGLVersionFunctionsBackend(c)
843     {
844         init();
845     }
846 
versionStatus()847     Q_DECL_CONSTEXPR static Version versionStatus()
848     { return OpenGL_4_0_Core; }
849 
850     // OpenGL 4.0 core functions
851 #define QT_OPENGL_4_0_FUNCTIONS(F) \
852     F(void, GetQueryIndexediv, (GLenum target, GLuint index, GLenum pname, GLint *params)) \
853     F(void, EndQueryIndexed, (GLenum target, GLuint index)) \
854     F(void, BeginQueryIndexed, (GLenum target, GLuint index, GLuint id)) \
855     F(void, DrawTransformFeedbackStream, (GLenum mode, GLuint id, GLuint stream)) \
856     F(void, DrawTransformFeedback, (GLenum mode, GLuint id)) \
857     F(void, ResumeTransformFeedback, ()) \
858     F(void, PauseTransformFeedback, ()) \
859     F(GLboolean, IsTransformFeedback, (GLuint id)) \
860     F(void, GenTransformFeedbacks, (GLsizei n, GLuint *ids)) \
861     F(void, DeleteTransformFeedbacks, (GLsizei n, const GLuint *ids)) \
862     F(void, BindTransformFeedback, (GLenum target, GLuint id)) \
863     F(void, PatchParameterfv, (GLenum pname, const GLfloat *values)) \
864     F(void, PatchParameteri, (GLenum pname, GLint value)) \
865     F(void, GetProgramStageiv, (GLuint program, GLenum shadertype, GLenum pname, GLint *values)) \
866     F(void, GetUniformSubroutineuiv, (GLenum shadertype, GLint location, GLuint *params)) \
867     F(void, UniformSubroutinesuiv, (GLenum shadertype, GLsizei count, const GLuint *indices)) \
868     F(void, GetActiveSubroutineName, (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name)) \
869     F(void, GetActiveSubroutineUniformName, (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name)) \
870     F(void, GetActiveSubroutineUniformiv, (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values)) \
871     F(GLuint, GetSubroutineIndex, (GLuint program, GLenum shadertype, const GLchar *name)) \
872     F(GLint, GetSubroutineUniformLocation, (GLuint program, GLenum shadertype, const GLchar *name)) \
873     F(void, GetUniformdv, (GLuint program, GLint location, GLdouble *params)) \
874     F(void, UniformMatrix4x3dv, (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) \
875     F(void, UniformMatrix4x2dv, (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) \
876     F(void, UniformMatrix3x4dv, (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) \
877     F(void, UniformMatrix3x2dv, (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) \
878     F(void, UniformMatrix2x4dv, (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) \
879     F(void, UniformMatrix2x3dv, (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) \
880     F(void, UniformMatrix4dv, (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) \
881     F(void, UniformMatrix3dv, (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) \
882     F(void, UniformMatrix2dv, (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) \
883     F(void, Uniform4dv, (GLint location, GLsizei count, const GLdouble *value)) \
884     F(void, Uniform3dv, (GLint location, GLsizei count, const GLdouble *value)) \
885     F(void, Uniform2dv, (GLint location, GLsizei count, const GLdouble *value)) \
886     F(void, Uniform1dv, (GLint location, GLsizei count, const GLdouble *value)) \
887     F(void, Uniform4d, (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w)) \
888     F(void, Uniform3d, (GLint location, GLdouble x, GLdouble y, GLdouble z)) \
889     F(void, Uniform2d, (GLint location, GLdouble x, GLdouble y)) \
890     F(void, Uniform1d, (GLint location, GLdouble x)) \
891     F(void, DrawElementsIndirect, (GLenum mode, GLenum type, const GLvoid *indirect)) \
892     F(void, DrawArraysIndirect, (GLenum mode, const GLvoid *indirect)) \
893     F(void, BlendFuncSeparatei, (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)) \
894     F(void, BlendFunci, (GLuint buf, GLenum src, GLenum dst)) \
895     F(void, BlendEquationSeparatei, (GLuint buf, GLenum modeRGB, GLenum modeAlpha)) \
896     F(void, BlendEquationi, (GLuint buf, GLenum mode)) \
897     F(void, MinSampleShading, (GLfloat value)) \
898 
899     QT_OPENGL_DECLARE(QT_OPENGL_4_0_FUNCTIONS);
900 };
901 
902 class QOpenGLFunctions_4_1_CoreBackend : public QOpenGLVersionFunctionsBackend
903 {
904 public:
QOpenGLFunctions_4_1_CoreBackend(QOpenGLContext * c)905     QOpenGLFunctions_4_1_CoreBackend(QOpenGLContext *c)
906         : QOpenGLVersionFunctionsBackend(c)
907     {
908         init();
909     }
910 
versionStatus()911     Q_DECL_CONSTEXPR static Version versionStatus()
912     { return OpenGL_4_1_Core; }
913 
914     // OpenGL 4.1 core functions
915 #define QT_OPENGL_4_1_FUNCTIONS(F) \
916     F(void, GetDoublei_v, (GLenum target, GLuint index, GLdouble *data)) \
917     F(void, GetFloati_v,(GLenum target, GLuint index, GLfloat *data)) \
918     F(void, DepthRangeIndexed, (GLuint index, GLdouble n, GLdouble f)) \
919     F(void, DepthRangeArrayv, (GLuint first, GLsizei count, const GLdouble *v)) \
920     F(void, ScissorIndexedv, (GLuint index, const GLint *v)) \
921     F(void, ScissorIndexed, (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height)) \
922     F(void, ScissorArrayv, (GLuint first, GLsizei count, const GLint *v)) \
923     F(void, ViewportIndexedfv, (GLuint index, const GLfloat *v)) \
924     F(void, ViewportIndexedf, (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h)) \
925     F(void, ViewportArrayv, (GLuint first, GLsizei count, const GLfloat *v)) \
926     F(void, GetVertexAttribLdv, (GLuint index, GLenum pname, GLdouble *params)) \
927     F(void, VertexAttribLPointer, (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)) \
928     F(void, VertexAttribL4dv, (GLuint index, const GLdouble *v)) \
929     F(void, VertexAttribL3dv, (GLuint index, const GLdouble *v)) \
930     F(void, VertexAttribL2dv, (GLuint index, const GLdouble *v)) \
931     F(void, VertexAttribL1dv, (GLuint index, const GLdouble *v)) \
932     F(void, VertexAttribL4d, (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)) \
933     F(void, VertexAttribL3d, (GLuint index, GLdouble x, GLdouble y, GLdouble z)) \
934     F(void, VertexAttribL2d, (GLuint index, GLdouble x, GLdouble y)) \
935     F(void, VertexAttribL1d, (GLuint index, GLdouble x)) \
936     F(void, GetProgramPipelineInfoLog, (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog)) \
937     F(void, ValidateProgramPipeline, (GLuint pipeline)) \
938     F(void, ProgramUniformMatrix4x3dv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) \
939     F(void, ProgramUniformMatrix3x4dv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) \
940     F(void, ProgramUniformMatrix4x2dv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) \
941     F(void, ProgramUniformMatrix2x4dv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) \
942     F(void, ProgramUniformMatrix3x2dv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) \
943     F(void, ProgramUniformMatrix2x3dv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) \
944     F(void, ProgramUniformMatrix4x3fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
945     F(void, ProgramUniformMatrix3x4fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
946     F(void, ProgramUniformMatrix4x2fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
947     F(void, ProgramUniformMatrix2x4fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
948     F(void, ProgramUniformMatrix3x2fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
949     F(void, ProgramUniformMatrix2x3fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
950     F(void, ProgramUniformMatrix4dv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) \
951     F(void, ProgramUniformMatrix3dv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) \
952     F(void, ProgramUniformMatrix2dv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value)) \
953     F(void, ProgramUniformMatrix4fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
954     F(void, ProgramUniformMatrix3fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
955     F(void, ProgramUniformMatrix2fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
956     F(void, ProgramUniform4uiv, (GLuint program, GLint location, GLsizei count, const GLuint *value)) \
957     F(void, ProgramUniform4ui, (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3)) \
958     F(void, ProgramUniform4dv, (GLuint program, GLint location, GLsizei count, const GLdouble *value)) \
959     F(void, ProgramUniform4d, (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3)) \
960     F(void, ProgramUniform4fv, (GLuint program, GLint location, GLsizei count, const GLfloat *value)) \
961     F(void, ProgramUniform4f, (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3)) \
962     F(void, ProgramUniform4iv, (GLuint program, GLint location, GLsizei count, const GLint *value)) \
963     F(void, ProgramUniform4i, (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3)) \
964     F(void, ProgramUniform3uiv, (GLuint program, GLint location, GLsizei count, const GLuint *value)) \
965     F(void, ProgramUniform3ui, (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2)) \
966     F(void, ProgramUniform3dv, (GLuint program, GLint location, GLsizei count, const GLdouble *value)) \
967     F(void, ProgramUniform3d, (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2)) \
968     F(void, ProgramUniform3fv, (GLuint program, GLint location, GLsizei count, const GLfloat *value)) \
969     F(void, ProgramUniform3f, (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2)) \
970     F(void, ProgramUniform3iv, (GLuint program, GLint location, GLsizei count, const GLint *value)) \
971     F(void, ProgramUniform3i, (GLuint program, GLint location, GLint v0, GLint v1, GLint v2)) \
972     F(void, ProgramUniform2uiv, (GLuint program, GLint location, GLsizei count, const GLuint *value)) \
973     F(void, ProgramUniform2ui, (GLuint program, GLint location, GLuint v0, GLuint v1)) \
974     F(void, ProgramUniform2dv, (GLuint program, GLint location, GLsizei count, const GLdouble *value)) \
975     F(void, ProgramUniform2d, (GLuint program, GLint location, GLdouble v0, GLdouble v1)) \
976     F(void, ProgramUniform2fv, (GLuint program, GLint location, GLsizei count, const GLfloat *value)) \
977     F(void, ProgramUniform2f, (GLuint program, GLint location, GLfloat v0, GLfloat v1)) \
978     F(void, ProgramUniform2iv, (GLuint program, GLint location, GLsizei count, const GLint *value)) \
979     F(void, ProgramUniform2i, (GLuint program, GLint location, GLint v0, GLint v1)) \
980     F(void, ProgramUniform1uiv, (GLuint program, GLint location, GLsizei count, const GLuint *value)) \
981     F(void, ProgramUniform1ui, (GLuint program, GLint location, GLuint v0)) \
982     F(void, ProgramUniform1dv, (GLuint program, GLint location, GLsizei count, const GLdouble *value)) \
983     F(void, ProgramUniform1d, (GLuint program, GLint location, GLdouble v0)) \
984     F(void, ProgramUniform1fv, (GLuint program, GLint location, GLsizei count, const GLfloat *value)) \
985     F(void, ProgramUniform1f, (GLuint program, GLint location, GLfloat v0)) \
986     F(void, ProgramUniform1iv, (GLuint program, GLint location, GLsizei count, const GLint *value)) \
987     F(void, ProgramUniform1i, (GLuint program, GLint location, GLint v0)) \
988     F(void, GetProgramPipelineiv, (GLuint pipeline, GLenum pname, GLint *params)) \
989     F(GLboolean, IsProgramPipeline, (GLuint pipeline)) \
990     F(void, GenProgramPipelines, (GLsizei n, GLuint *pipelines)) \
991     F(void, DeleteProgramPipelines, (GLsizei n, const GLuint *pipelines)) \
992     F(void, BindProgramPipeline, (GLuint pipeline)) \
993     F(GLuint, CreateShaderProgramv, (GLenum type, GLsizei count, const GLchar* const *strings)) \
994     F(void, ActiveShaderProgram, (GLuint pipeline, GLuint program)) \
995     F(void, UseProgramStages, (GLuint pipeline, GLbitfield stages, GLuint program)) \
996     F(void, ProgramParameteri, (GLuint program, GLenum pname, GLint value)) \
997     F(void, ProgramBinary, (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLsizei length)) \
998     F(void, GetProgramBinary, (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary)) \
999     F(void, ClearDepthf, (GLfloat dd)) \
1000     F(void, DepthRangef, (GLfloat n, GLfloat f)) \
1001     F(void, GetShaderPrecisionFormat, (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision)) \
1002     F(void, ShaderBinary, (GLsizei count, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length)) \
1003     F(void, ReleaseShaderCompiler, ()) \
1004 
1005     QT_OPENGL_DECLARE(QT_OPENGL_4_1_FUNCTIONS);
1006 };
1007 
1008 class QOpenGLFunctions_4_2_CoreBackend : public QOpenGLVersionFunctionsBackend
1009 {
1010 public:
QOpenGLFunctions_4_2_CoreBackend(QOpenGLContext * c)1011     QOpenGLFunctions_4_2_CoreBackend(QOpenGLContext *c)
1012         : QOpenGLVersionFunctionsBackend(c)
1013     {
1014         init();
1015     }
1016 
versionStatus()1017     Q_DECL_CONSTEXPR static Version versionStatus()
1018     { return OpenGL_4_2_Core; }
1019 
1020     // OpenGL 4.2 core functions
1021 #define QT_OPENGL_4_2_FUNCTIONS(F) \
1022     F(void, TexStorage3D, (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth)) \
1023     F(void, TexStorage2D, (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height)) \
1024     F(void, TexStorage1D, (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width)) \
1025     F(void, MemoryBarrier, (GLbitfield barriers)) \
1026     F(void, BindImageTexture, (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format)) \
1027     F(void, GetActiveAtomicCounterBufferiv, (GLuint program, GLuint bufferIndex, GLenum pname, GLint *params)) \
1028     F(void, GetInternalformativ, (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params)) \
1029     F(void, DrawTransformFeedbackStreamInstanced, (GLenum mode, GLuint id, GLuint stream, GLsizei instancecount)) \
1030     F(void, DrawTransformFeedbackInstanced, (GLenum mode, GLuint id, GLsizei instancecount)) \
1031     F(void, DrawElementsInstancedBaseVertexBaseInstance, (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance)) \
1032     F(void, DrawElementsInstancedBaseInstance, (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance)) \
1033     F(void, DrawArraysInstancedBaseInstance, (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance)) \
1034 
1035     QT_OPENGL_DECLARE(QT_OPENGL_4_2_FUNCTIONS);
1036 };
1037 
1038 class QOpenGLFunctions_4_3_CoreBackend : public QOpenGLVersionFunctionsBackend
1039 {
1040 public:
QOpenGLFunctions_4_3_CoreBackend(QOpenGLContext * c)1041     QOpenGLFunctions_4_3_CoreBackend(QOpenGLContext *c)
1042         : QOpenGLVersionFunctionsBackend(c)
1043     {
1044         init();
1045     }
1046 
versionStatus()1047     Q_DECL_CONSTEXPR static Version versionStatus()
1048     { return OpenGL_4_3_Core; }
1049 
1050     // OpenGL 4.3 core functions
1051 #define QT_OPENGL_4_3_FUNCTIONS(F) \
1052     F(void, TexStorage3DMultisample, (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations)) \
1053     F(void, TexStorage2DMultisample, (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations)) \
1054     F(void, TexBufferRange, (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size)) \
1055     F(void, ShaderStorageBlockBinding, (GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding)) \
1056     F(GLint, GetProgramResourceLocationIndex, (GLuint program, GLenum programInterface, const GLchar *name)) \
1057     F(GLint, GetProgramResourceLocation, (GLuint program, GLenum programInterface, const GLchar *name)) \
1058     F(void, GetProgramResourceiv, (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params)) \
1059     F(void, GetProgramResourceName, (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name)) \
1060     F(GLuint, GetProgramResourceIndex, (GLuint program, GLenum programInterface, const GLchar *name)) \
1061     F(void, GetProgramInterfaceiv, (GLuint program, GLenum programInterface, GLenum pname, GLint *params)) \
1062     F(void, MultiDrawElementsIndirect, (GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride)) \
1063     F(void, MultiDrawArraysIndirect, (GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride)) \
1064     F(void, InvalidateSubFramebuffer, (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height)) \
1065     F(void, InvalidateFramebuffer, (GLenum target, GLsizei numAttachments, const GLenum *attachments)) \
1066     F(void, InvalidateBufferData, (GLuint buffer)) \
1067     F(void, InvalidateBufferSubData, (GLuint buffer, GLintptr offset, GLsizeiptr length)) \
1068     F(void, InvalidateTexImage, (GLuint texture, GLint level)) \
1069     F(void, InvalidateTexSubImage, (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth)) \
1070     F(void, GetInternalformati64v, (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64 *params)) \
1071     F(void, GetFramebufferParameteriv, (GLenum target, GLenum pname, GLint *params)) \
1072     F(void, FramebufferParameteri, (GLenum target, GLenum pname, GLint param)) \
1073     F(void, VertexBindingDivisor, (GLuint bindingindex, GLuint divisor)) \
1074     F(void, VertexAttribBinding, (GLuint attribindex, GLuint bindingindex)) \
1075     F(void, VertexAttribLFormat, (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset)) \
1076     F(void, VertexAttribIFormat, (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset)) \
1077     F(void, VertexAttribFormat, (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset)) \
1078     F(void, BindVertexBuffer, (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride)) \
1079     F(void, TextureView, (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers)) \
1080     F(void, CopyImageSubData, (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth)) \
1081     F(void, DispatchComputeIndirect, (GLintptr indirect)) \
1082     F(void, DispatchCompute, (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z)) \
1083     F(void, ClearBufferSubData, (GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data)) \
1084     F(void, ClearBufferData, (GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data)) \
1085     F(void, GetObjectPtrLabel, (const GLvoid *ptr, GLsizei bufSize, GLsizei *length, GLchar *label)) \
1086     F(void, ObjectPtrLabel, (const GLvoid *ptr, GLsizei length, const GLchar *label)) \
1087     F(void, GetObjectLabel, (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label)) \
1088     F(void, ObjectLabel, (GLenum identifier, GLuint name, GLsizei length, const GLchar *label)) \
1089     F(void, PopDebugGroup, ()) \
1090     F(void, PushDebugGroup, (GLenum source, GLuint id, GLsizei length, const GLchar *message)) \
1091     F(GLuint, GetDebugMessageLog, (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog)) \
1092     F(void, DebugMessageCallback, (GLDEBUGPROC callback, const GLvoid *userParam)) \
1093     F(void, DebugMessageInsert, (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf)) \
1094     F(void, DebugMessageControl, (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled)) \
1095 
1096     QT_OPENGL_DECLARE(QT_OPENGL_4_3_FUNCTIONS);
1097 };
1098 
1099 class QOpenGLFunctions_4_4_CoreBackend : public QOpenGLVersionFunctionsBackend
1100 {
1101 public:
QOpenGLFunctions_4_4_CoreBackend(QOpenGLContext * c)1102     QOpenGLFunctions_4_4_CoreBackend(QOpenGLContext *c)
1103         : QOpenGLVersionFunctionsBackend(c)
1104     {
1105         init();
1106     }
1107 
versionStatus()1108     Q_DECL_CONSTEXPR static Version versionStatus()
1109     { return OpenGL_4_4_Core; }
1110 
1111     // OpenGL 4.4 core functions
1112 #define QT_OPENGL_4_4_FUNCTIONS(F) \
1113     F(void, BindVertexBuffers, (GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides)) \
1114     F(void, BindImageTextures, (GLuint first, GLsizei count, const GLuint *textures)) \
1115     F(void, BindSamplers, (GLuint first, GLsizei count, const GLuint *samplers)) \
1116     F(void, BindTextures, (GLuint first, GLsizei count, const GLuint *textures)) \
1117     F(void, BindBuffersRange, (GLenum target, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizeiptr *sizes)) \
1118     F(void, BindBuffersBase, (GLenum target, GLuint first, GLsizei count, const GLuint *buffers)) \
1119     F(void, ClearTexSubImage, (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *data)) \
1120     F(void, ClearTexImage, (GLuint texture, GLint level, GLenum format, GLenum type, const void *data)) \
1121     F(void, BufferStorage, (GLenum target, GLsizeiptr size, const void *data, GLbitfield flags)) \
1122 
1123     QT_OPENGL_DECLARE(QT_OPENGL_4_4_FUNCTIONS);
1124 };
1125 
1126 class QOpenGLFunctions_4_5_CoreBackend : public QOpenGLVersionFunctionsBackend
1127 {
1128 public:
QOpenGLFunctions_4_5_CoreBackend(QOpenGLContext * c)1129     QOpenGLFunctions_4_5_CoreBackend(QOpenGLContext *c)
1130         : QOpenGLVersionFunctionsBackend(c)
1131     {
1132         init();
1133     }
1134 
versionStatus()1135     Q_DECL_CONSTEXPR static Version versionStatus()
1136     { return OpenGL_4_5_Core; }
1137 
1138     // OpenGL 4.5 core functions
1139 #define QT_OPENGL_4_5_FUNCTIONS(F) \
1140     F(void, TextureBarrier, ()) \
1141     F(void, ReadnPixels, (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data)) \
1142     F(void, GetnUniformuiv, (GLuint program, GLint location, GLsizei bufSize, GLuint *params)) \
1143     F(void, GetnUniformiv, (GLuint program, GLint location, GLsizei bufSize, GLint *params)) \
1144     F(void, GetnUniformfv, (GLuint program, GLint location, GLsizei bufSize, GLfloat *params)) \
1145     F(void, GetnUniformdv, (GLuint program, GLint location, GLsizei bufSize, GLdouble *params)) \
1146     F(void, GetnTexImage, (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels)) \
1147     F(void, GetnCompressedTexImage, (GLenum target, GLint lod, GLsizei bufSize, void *pixels)) \
1148     F(GLenum, GetGraphicsResetStatus, ()) \
1149     F(void, GetCompressedTextureSubImage, (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei bufSize, void *pixels)) \
1150     F(void, GetTextureSubImage, (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLsizei bufSize, void *pixels)) \
1151     F(void, MemoryBarrierByRegion, (GLbitfield barriers)) \
1152     F(void, CreateQueries, (GLenum target, GLsizei n, GLuint *ids)) \
1153     F(void, CreateProgramPipelines, (GLsizei n, GLuint *pipelines)) \
1154     F(void, CreateSamplers, (GLsizei n, GLuint *samplers)) \
1155     F(void, GetVertexArrayIndexed64iv, (GLuint vaobj, GLuint index, GLenum pname, GLint64 *param)) \
1156     F(void, GetVertexArrayIndexediv, (GLuint vaobj, GLuint index, GLenum pname, GLint *param)) \
1157     F(void, GetVertexArrayiv, (GLuint vaobj, GLenum pname, GLint *param)) \
1158     F(void, VertexArrayBindingDivisor, (GLuint vaobj, GLuint bindingindex, GLuint divisor)) \
1159     F(void, VertexArrayAttribLFormat, (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset)) \
1160     F(void, VertexArrayAttribIFormat, (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset)) \
1161     F(void, VertexArrayAttribFormat, (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset)) \
1162     F(void, VertexArrayAttribBinding, (GLuint vaobj, GLuint attribindex, GLuint bindingindex)) \
1163     F(void, VertexArrayVertexBuffers, (GLuint vaobj, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides)) \
1164     F(void, VertexArrayVertexBuffer, (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride)) \
1165     F(void, VertexArrayElementBuffer, (GLuint vaobj, GLuint buffer)) \
1166     F(void, EnableVertexArrayAttrib, (GLuint vaobj, GLuint index)) \
1167     F(void, DisableVertexArrayAttrib, (GLuint vaobj, GLuint index)) \
1168     F(void, CreateVertexArrays, (GLsizei n, GLuint *arrays)) \
1169     F(void, GetTextureParameteriv, (GLuint texture, GLenum pname, GLint *params)) \
1170     F(void, GetTextureParameterIuiv, (GLuint texture, GLenum pname, GLuint *params)) \
1171     F(void, GetTextureParameterIiv, (GLuint texture, GLenum pname, GLint *params)) \
1172     F(void, GetTextureParameterfv, (GLuint texture, GLenum pname, GLfloat *params)) \
1173     F(void, GetTextureLevelParameteriv, (GLuint texture, GLint level, GLenum pname, GLint *params)) \
1174     F(void, GetTextureLevelParameterfv, (GLuint texture, GLint level, GLenum pname, GLfloat *params)) \
1175     F(void, GetCompressedTextureImage, (GLuint texture, GLint level, GLsizei bufSize, void *pixels)) \
1176     F(void, GetTextureImage, (GLuint texture, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels)) \
1177     F(void, BindTextureUnit, (GLuint unit, GLuint texture)) \
1178     F(void, GenerateTextureMipmap, (GLuint texture)) \
1179     F(void, TextureParameteriv, (GLuint texture, GLenum pname, const GLint *param)) \
1180     F(void, TextureParameterIuiv, (GLuint texture, GLenum pname, const GLuint *params)) \
1181     F(void, TextureParameterIiv, (GLuint texture, GLenum pname, const GLint *params)) \
1182     F(void, TextureParameteri, (GLuint texture, GLenum pname, GLint param)) \
1183     F(void, TextureParameterfv, (GLuint texture, GLenum pname, const GLfloat *param)) \
1184     F(void, TextureParameterf, (GLuint texture, GLenum pname, GLfloat param)) \
1185     F(void, CopyTextureSubImage3D, (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)) \
1186     F(void, CopyTextureSubImage2D, (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)) \
1187     F(void, CopyTextureSubImage1D, (GLuint texture, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width)) \
1188     F(void, CompressedTextureSubImage3D, (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data)) \
1189     F(void, CompressedTextureSubImage2D, (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data)) \
1190     F(void, CompressedTextureSubImage1D, (GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data)) \
1191     F(void, TextureSubImage3D, (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels)) \
1192     F(void, TextureSubImage2D, (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels)) \
1193     F(void, TextureSubImage1D, (GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels)) \
1194     F(void, TextureStorage3DMultisample, (GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations)) \
1195     F(void, TextureStorage2DMultisample, (GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations)) \
1196     F(void, TextureStorage3D, (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth)) \
1197     F(void, TextureStorage2D, (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height)) \
1198     F(void, TextureStorage1D, (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width)) \
1199     F(void, TextureBufferRange, (GLuint texture, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizei size)) \
1200     F(void, TextureBuffer, (GLuint texture, GLenum internalformat, GLuint buffer)) \
1201     F(void, CreateTextures, (GLenum target, GLsizei n, GLuint *textures)) \
1202     F(void, GetNamedRenderbufferParameteriv, (GLuint renderbuffer, GLenum pname, GLint *params)) \
1203     F(void, NamedRenderbufferStorageMultisample, (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)) \
1204     F(void, NamedRenderbufferStorage, (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height)) \
1205     F(void, CreateRenderbuffers, (GLsizei n, GLuint *renderbuffers)) \
1206     F(void, GetNamedFramebufferAttachmentParameteriv, (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params)) \
1207     F(void, GetNamedFramebufferParameteriv, (GLuint framebuffer, GLenum pname, GLint *param)) \
1208     F(GLenum, CheckNamedFramebufferStatus, (GLuint framebuffer, GLenum target)) \
1209     F(void, BlitNamedFramebuffer, (GLuint readFramebuffer, GLuint drawFramebuffer, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)) \
1210     F(void, ClearNamedFramebufferfi, (GLuint framebuffer, GLenum buffer, GLfloat depth, GLint stencil)) \
1211     F(void, ClearNamedFramebufferfv, (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLfloat *value)) \
1212     F(void, ClearNamedFramebufferuiv, (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLuint *value)) \
1213     F(void, ClearNamedFramebufferiv, (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLint *value)) \
1214     F(void, InvalidateNamedFramebufferSubData, (GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height)) \
1215     F(void, InvalidateNamedFramebufferData, (GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments)) \
1216     F(void, NamedFramebufferReadBuffer, (GLuint framebuffer, GLenum src)) \
1217     F(void, NamedFramebufferDrawBuffers, (GLuint framebuffer, GLsizei n, const GLenum *bufs)) \
1218     F(void, NamedFramebufferDrawBuffer, (GLuint framebuffer, GLenum buf)) \
1219     F(void, NamedFramebufferTextureLayer, (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer)) \
1220     F(void, NamedFramebufferTexture, (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level)) \
1221     F(void, NamedFramebufferParameteri, (GLuint framebuffer, GLenum pname, GLint param)) \
1222     F(void, NamedFramebufferRenderbuffer, (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)) \
1223     F(void, CreateFramebuffers, (GLsizei n, GLuint *framebuffers)) \
1224     F(void, GetNamedBufferSubData, (GLuint buffer, GLintptr offset, GLsizei size, void *data)) \
1225     F(void, GetNamedBufferPointerv, (GLuint buffer, GLenum pname, GLvoid* *params)) \
1226     F(void, GetNamedBufferParameteri64v, (GLuint buffer, GLenum pname, GLint64 *params)) \
1227     F(void, GetNamedBufferParameteriv, (GLuint buffer, GLenum pname, GLint *params)) \
1228     F(void, FlushMappedNamedBufferRange, (GLuint buffer, GLintptr offset, GLsizei length)) \
1229     F(GLboolean, UnmapNamedBuffer, (GLuint buffer)) \
1230     F(GLvoid *, MapNamedBufferRange, (GLuint buffer, GLintptr offset, GLsizei length, GLbitfield access)) \
1231     F(GLvoid *, MapNamedBuffer, (GLuint buffer, GLenum access)) \
1232     F(void, ClearNamedBufferSubData, (GLuint buffer, GLenum internalformat, GLintptr offset, GLsizei size, GLenum format, GLenum type, const void *data)) \
1233     F(void, ClearNamedBufferData, (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data)) \
1234     F(void, CopyNamedBufferSubData, (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizei size)) \
1235     F(void, NamedBufferSubData, (GLuint buffer, GLintptr offset, GLsizei size, const void *data)) \
1236     F(void, NamedBufferData, (GLuint buffer, GLsizei size, const void *data, GLenum usage)) \
1237     F(void, NamedBufferStorage, (GLuint buffer, GLsizei size, const void *data, GLbitfield flags)) \
1238     F(void, CreateBuffers, (GLsizei n, GLuint *buffers)) \
1239     F(void, GetTransformFeedbacki64_v,(GLuint xfb, GLenum pname, GLuint index, GLint64 *param)) \
1240     F(void, GetTransformFeedbacki_v,(GLuint xfb, GLenum pname, GLuint index, GLint *param)) \
1241     F(void, GetTransformFeedbackiv, (GLuint xfb, GLenum pname, GLint *param)) \
1242     F(void, TransformFeedbackBufferRange, (GLuint xfb, GLuint index, GLuint buffer, GLintptr offset, GLsizei size)) \
1243     F(void, TransformFeedbackBufferBase, (GLuint xfb, GLuint index, GLuint buffer)) \
1244     F(void, CreateTransformFeedbacks, (GLsizei n, GLuint *ids)) \
1245     F(void, ClipControl, (GLenum origin, GLenum depth)) \
1246 
1247     QT_OPENGL_DECLARE(QT_OPENGL_4_5_FUNCTIONS);
1248 };
1249 
1250 class QOpenGLFunctions_1_0_DeprecatedBackend : public QOpenGLVersionFunctionsBackend
1251 {
1252 public:
QOpenGLFunctions_1_0_DeprecatedBackend(QOpenGLContext * c)1253     QOpenGLFunctions_1_0_DeprecatedBackend(QOpenGLContext *c)
1254         : QOpenGLVersionFunctionsBackend(c)
1255     {
1256         init();
1257     }
1258 
versionStatus()1259     Q_DECL_CONSTEXPR static Version versionStatus()
1260     { return OpenGL_1_0_Deprecated; }
1261 
1262     // OpenGL 1.0 deprecated functions
1263 #define QT_OPENGL_1_0_DEPRECATED_FUNCTIONS(F) \
1264     F(void, Translatef, (GLfloat x, GLfloat y, GLfloat z)) \
1265     F(void, Translated, (GLdouble x, GLdouble y, GLdouble z)) \
1266     F(void, Scalef, (GLfloat x, GLfloat y, GLfloat z)) \
1267     F(void, Scaled, (GLdouble x, GLdouble y, GLdouble z)) \
1268     F(void, Rotatef, (GLfloat angle, GLfloat x, GLfloat y, GLfloat z)) \
1269     F(void, Rotated, (GLdouble angle, GLdouble x, GLdouble y, GLdouble z)) \
1270     F(void, PushMatrix, ()) \
1271     F(void, PopMatrix, ()) \
1272     F(void, Ortho, (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)) \
1273     F(void, MultMatrixd, (const GLdouble *m)) \
1274     F(void, MultMatrixf, (const GLfloat *m)) \
1275     F(void, MatrixMode, (GLenum mode)) \
1276     F(void, LoadMatrixd, (const GLdouble *m)) \
1277     F(void, LoadMatrixf, (const GLfloat *m)) \
1278     F(void, LoadIdentity, ()) \
1279     F(void, Frustum, (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)) \
1280     F(GLboolean, IsList, (GLuint list)) \
1281     F(void, GetTexGeniv, (GLenum coord, GLenum pname, GLint *params)) \
1282     F(void, GetTexGenfv, (GLenum coord, GLenum pname, GLfloat *params)) \
1283     F(void, GetTexGendv, (GLenum coord, GLenum pname, GLdouble *params)) \
1284     F(void, GetTexEnviv, (GLenum target, GLenum pname, GLint *params)) \
1285     F(void, GetTexEnvfv, (GLenum target, GLenum pname, GLfloat *params)) \
1286     F(void, GetPolygonStipple, (GLubyte *mask)) \
1287     F(void, GetPixelMapusv, (GLenum map, GLushort *values)) \
1288     F(void, GetPixelMapuiv, (GLenum map, GLuint *values)) \
1289     F(void, GetPixelMapfv, (GLenum map, GLfloat *values)) \
1290     F(void, GetMaterialiv, (GLenum face, GLenum pname, GLint *params)) \
1291     F(void, GetMaterialfv, (GLenum face, GLenum pname, GLfloat *params)) \
1292     F(void, GetMapiv, (GLenum target, GLenum query, GLint *v)) \
1293     F(void, GetMapfv, (GLenum target, GLenum query, GLfloat *v)) \
1294     F(void, GetMapdv, (GLenum target, GLenum query, GLdouble *v)) \
1295     F(void, GetLightiv, (GLenum light, GLenum pname, GLint *params)) \
1296     F(void, GetLightfv, (GLenum light, GLenum pname, GLfloat *params)) \
1297     F(void, GetClipPlane, (GLenum plane, GLdouble *equation)) \
1298     F(void, DrawPixels, (GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)) \
1299     F(void, CopyPixels, (GLint x, GLint y, GLsizei width, GLsizei height, GLenum type)) \
1300     F(void, PixelMapusv, (GLenum map, GLsizei mapsize, const GLushort *values)) \
1301     F(void, PixelMapuiv, (GLenum map, GLsizei mapsize, const GLuint *values)) \
1302     F(void, PixelMapfv, (GLenum map, GLsizei mapsize, const GLfloat *values)) \
1303     F(void, PixelTransferi, (GLenum pname, GLint param)) \
1304     F(void, PixelTransferf, (GLenum pname, GLfloat param)) \
1305     F(void, PixelZoom, (GLfloat xfactor, GLfloat yfactor)) \
1306     F(void, AlphaFunc, (GLenum func, GLfloat ref)) \
1307     F(void, EvalPoint2, (GLint i, GLint j)) \
1308     F(void, EvalMesh2, (GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)) \
1309     F(void, EvalPoint1, (GLint i)) \
1310     F(void, EvalMesh1, (GLenum mode, GLint i1, GLint i2)) \
1311     F(void, EvalCoord2fv, (const GLfloat *u)) \
1312     F(void, EvalCoord2f, (GLfloat u, GLfloat v)) \
1313     F(void, EvalCoord2dv, (const GLdouble *u)) \
1314     F(void, EvalCoord2d, (GLdouble u, GLdouble v)) \
1315     F(void, EvalCoord1fv, (const GLfloat *u)) \
1316     F(void, EvalCoord1f, (GLfloat u)) \
1317     F(void, EvalCoord1dv, (const GLdouble *u)) \
1318     F(void, EvalCoord1d, (GLdouble u)) \
1319     F(void, MapGrid2f, (GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2)) \
1320     F(void, MapGrid2d, (GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2)) \
1321     F(void, MapGrid1f, (GLint un, GLfloat u1, GLfloat u2)) \
1322     F(void, MapGrid1d, (GLint un, GLdouble u1, GLdouble u2)) \
1323     F(void, Map2f, (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points)) \
1324     F(void, Map2d, (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points)) \
1325     F(void, Map1f, (GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points)) \
1326     F(void, Map1d, (GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points)) \
1327     F(void, PushAttrib, (GLbitfield mask)) \
1328     F(void, PopAttrib, ()) \
1329     F(void, Accum, (GLenum op, GLfloat value)) \
1330     F(void, IndexMask, (GLuint mask)) \
1331     F(void, ClearIndex, (GLfloat c)) \
1332     F(void, ClearAccum, (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)) \
1333     F(void, PushName, (GLuint name)) \
1334     F(void, PopName, ()) \
1335     F(void, PassThrough, (GLfloat token)) \
1336     F(void, LoadName, (GLuint name)) \
1337     F(void, InitNames, ()) \
1338     F(GLint, RenderMode, (GLenum mode)) \
1339     F(void, SelectBuffer, (GLsizei size, GLuint *buffer)) \
1340     F(void, FeedbackBuffer, (GLsizei size, GLenum type, GLfloat *buffer)) \
1341     F(void, TexGeniv, (GLenum coord, GLenum pname, const GLint *params)) \
1342     F(void, TexGeni, (GLenum coord, GLenum pname, GLint param)) \
1343     F(void, TexGenfv, (GLenum coord, GLenum pname, const GLfloat *params)) \
1344     F(void, TexGenf, (GLenum coord, GLenum pname, GLfloat param)) \
1345     F(void, TexGendv, (GLenum coord, GLenum pname, const GLdouble *params)) \
1346     F(void, TexGend, (GLenum coord, GLenum pname, GLdouble param)) \
1347     F(void, TexEnviv, (GLenum target, GLenum pname, const GLint *params)) \
1348     F(void, TexEnvi, (GLenum target, GLenum pname, GLint param)) \
1349     F(void, TexEnvfv, (GLenum target, GLenum pname, const GLfloat *params)) \
1350     F(void, TexEnvf, (GLenum target, GLenum pname, GLfloat param)) \
1351     F(void, ShadeModel, (GLenum mode)) \
1352     F(void, PolygonStipple, (const GLubyte *mask)) \
1353     F(void, Materialiv, (GLenum face, GLenum pname, const GLint *params)) \
1354     F(void, Materiali, (GLenum face, GLenum pname, GLint param)) \
1355     F(void, Materialfv, (GLenum face, GLenum pname, const GLfloat *params)) \
1356     F(void, Materialf, (GLenum face, GLenum pname, GLfloat param)) \
1357     F(void, LineStipple, (GLint factor, GLushort pattern)) \
1358     F(void, LightModeliv, (GLenum pname, const GLint *params)) \
1359     F(void, LightModeli, (GLenum pname, GLint param)) \
1360     F(void, LightModelfv, (GLenum pname, const GLfloat *params)) \
1361     F(void, LightModelf, (GLenum pname, GLfloat param)) \
1362     F(void, Lightiv, (GLenum light, GLenum pname, const GLint *params)) \
1363     F(void, Lighti, (GLenum light, GLenum pname, GLint param)) \
1364     F(void, Lightfv, (GLenum light, GLenum pname, const GLfloat *params)) \
1365     F(void, Lightf, (GLenum light, GLenum pname, GLfloat param)) \
1366     F(void, Fogiv, (GLenum pname, const GLint *params)) \
1367     F(void, Fogi, (GLenum pname, GLint param)) \
1368     F(void, Fogfv, (GLenum pname, const GLfloat *params)) \
1369     F(void, Fogf, (GLenum pname, GLfloat param)) \
1370     F(void, ColorMaterial, (GLenum face, GLenum mode)) \
1371     F(void, ClipPlane, (GLenum plane, const GLdouble *equation)) \
1372     F(void, Vertex4sv, (const GLshort *v)) \
1373     F(void, Vertex4s, (GLshort x, GLshort y, GLshort z, GLshort w)) \
1374     F(void, Vertex4iv, (const GLint *v)) \
1375     F(void, Vertex4i, (GLint x, GLint y, GLint z, GLint w)) \
1376     F(void, Vertex4fv, (const GLfloat *v)) \
1377     F(void, Vertex4f, (GLfloat x, GLfloat y, GLfloat z, GLfloat w)) \
1378     F(void, Vertex4dv, (const GLdouble *v)) \
1379     F(void, Vertex4d, (GLdouble x, GLdouble y, GLdouble z, GLdouble w)) \
1380     F(void, Vertex3sv, (const GLshort *v)) \
1381     F(void, Vertex3s, (GLshort x, GLshort y, GLshort z)) \
1382     F(void, Vertex3iv, (const GLint *v)) \
1383     F(void, Vertex3i, (GLint x, GLint y, GLint z)) \
1384     F(void, Vertex3fv, (const GLfloat *v)) \
1385     F(void, Vertex3f, (GLfloat x, GLfloat y, GLfloat z)) \
1386     F(void, Vertex3dv, (const GLdouble *v)) \
1387     F(void, Vertex3d, (GLdouble x, GLdouble y, GLdouble z)) \
1388     F(void, Vertex2sv, (const GLshort *v)) \
1389     F(void, Vertex2s, (GLshort x, GLshort y)) \
1390     F(void, Vertex2iv, (const GLint *v)) \
1391     F(void, Vertex2i, (GLint x, GLint y)) \
1392     F(void, Vertex2fv, (const GLfloat *v)) \
1393     F(void, Vertex2f, (GLfloat x, GLfloat y)) \
1394     F(void, Vertex2dv, (const GLdouble *v)) \
1395     F(void, Vertex2d, (GLdouble x, GLdouble y)) \
1396     F(void, TexCoord4sv, (const GLshort *v)) \
1397     F(void, TexCoord4s, (GLshort s, GLshort t, GLshort r, GLshort q)) \
1398     F(void, TexCoord4iv, (const GLint *v)) \
1399     F(void, TexCoord4i, (GLint s, GLint t, GLint r, GLint q)) \
1400     F(void, TexCoord4fv, (const GLfloat *v)) \
1401     F(void, TexCoord4f, (GLfloat s, GLfloat t, GLfloat r, GLfloat q)) \
1402     F(void, TexCoord4dv, (const GLdouble *v)) \
1403     F(void, TexCoord4d, (GLdouble s, GLdouble t, GLdouble r, GLdouble q)) \
1404     F(void, TexCoord3sv, (const GLshort *v)) \
1405     F(void, TexCoord3s, (GLshort s, GLshort t, GLshort r)) \
1406     F(void, TexCoord3iv, (const GLint *v)) \
1407     F(void, TexCoord3i, (GLint s, GLint t, GLint r)) \
1408     F(void, TexCoord3fv, (const GLfloat *v)) \
1409     F(void, TexCoord3f, (GLfloat s, GLfloat t, GLfloat r)) \
1410     F(void, TexCoord3dv, (const GLdouble *v)) \
1411     F(void, TexCoord3d, (GLdouble s, GLdouble t, GLdouble r)) \
1412     F(void, TexCoord2sv, (const GLshort *v)) \
1413     F(void, TexCoord2s, (GLshort s, GLshort t)) \
1414     F(void, TexCoord2iv, (const GLint *v)) \
1415     F(void, TexCoord2i, (GLint s, GLint t)) \
1416     F(void, TexCoord2fv, (const GLfloat *v)) \
1417     F(void, TexCoord2f, (GLfloat s, GLfloat t)) \
1418     F(void, TexCoord2dv, (const GLdouble *v)) \
1419     F(void, TexCoord2d, (GLdouble s, GLdouble t)) \
1420     F(void, TexCoord1sv, (const GLshort *v)) \
1421     F(void, TexCoord1s, (GLshort s)) \
1422     F(void, TexCoord1iv, (const GLint *v)) \
1423     F(void, TexCoord1i, (GLint s)) \
1424     F(void, TexCoord1fv, (const GLfloat *v)) \
1425     F(void, TexCoord1f, (GLfloat s)) \
1426     F(void, TexCoord1dv, (const GLdouble *v)) \
1427     F(void, TexCoord1d, (GLdouble s)) \
1428     F(void, Rectsv, (const GLshort *v1, const GLshort *v2)) \
1429     F(void, Rects, (GLshort x1, GLshort y1, GLshort x2, GLshort y2)) \
1430     F(void, Rectiv, (const GLint *v1, const GLint *v2)) \
1431     F(void, Recti, (GLint x1, GLint y1, GLint x2, GLint y2)) \
1432     F(void, Rectfv, (const GLfloat *v1, const GLfloat *v2)) \
1433     F(void, Rectf, (GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)) \
1434     F(void, Rectdv, (const GLdouble *v1, const GLdouble *v2)) \
1435     F(void, Rectd, (GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)) \
1436     F(void, RasterPos4sv, (const GLshort *v)) \
1437     F(void, RasterPos4s, (GLshort x, GLshort y, GLshort z, GLshort w)) \
1438     F(void, RasterPos4iv, (const GLint *v)) \
1439     F(void, RasterPos4i, (GLint x, GLint y, GLint z, GLint w)) \
1440     F(void, RasterPos4fv, (const GLfloat *v)) \
1441     F(void, RasterPos4f, (GLfloat x, GLfloat y, GLfloat z, GLfloat w)) \
1442     F(void, RasterPos4dv, (const GLdouble *v)) \
1443     F(void, RasterPos4d, (GLdouble x, GLdouble y, GLdouble z, GLdouble w)) \
1444     F(void, RasterPos3sv, (const GLshort *v)) \
1445     F(void, RasterPos3s, (GLshort x, GLshort y, GLshort z)) \
1446     F(void, RasterPos3iv, (const GLint *v)) \
1447     F(void, RasterPos3i, (GLint x, GLint y, GLint z)) \
1448     F(void, RasterPos3fv, (const GLfloat *v)) \
1449     F(void, RasterPos3f, (GLfloat x, GLfloat y, GLfloat z)) \
1450     F(void, RasterPos3dv, (const GLdouble *v)) \
1451     F(void, RasterPos3d, (GLdouble x, GLdouble y, GLdouble z)) \
1452     F(void, RasterPos2sv, (const GLshort *v)) \
1453     F(void, RasterPos2s, (GLshort x, GLshort y)) \
1454     F(void, RasterPos2iv, (const GLint *v)) \
1455     F(void, RasterPos2i, (GLint x, GLint y)) \
1456     F(void, RasterPos2fv, (const GLfloat *v)) \
1457     F(void, RasterPos2f, (GLfloat x, GLfloat y)) \
1458     F(void, RasterPos2dv, (const GLdouble *v)) \
1459     F(void, RasterPos2d, (GLdouble x, GLdouble y)) \
1460     F(void, Normal3sv, (const GLshort *v)) \
1461     F(void, Normal3s, (GLshort nx, GLshort ny, GLshort nz)) \
1462     F(void, Normal3iv, (const GLint *v)) \
1463     F(void, Normal3i, (GLint nx, GLint ny, GLint nz)) \
1464     F(void, Normal3fv, (const GLfloat *v)) \
1465     F(void, Normal3f, (GLfloat nx, GLfloat ny, GLfloat nz)) \
1466     F(void, Normal3dv, (const GLdouble *v)) \
1467     F(void, Normal3d, (GLdouble nx, GLdouble ny, GLdouble nz)) \
1468     F(void, Normal3bv, (const GLbyte *v)) \
1469     F(void, Normal3b, (GLbyte nx, GLbyte ny, GLbyte nz)) \
1470     F(void, Indexsv, (const GLshort *c)) \
1471     F(void, Indexs, (GLshort c)) \
1472     F(void, Indexiv, (const GLint *c)) \
1473     F(void, Indexi, (GLint c)) \
1474     F(void, Indexfv, (const GLfloat *c)) \
1475     F(void, Indexf, (GLfloat c)) \
1476     F(void, Indexdv, (const GLdouble *c)) \
1477     F(void, Indexd, (GLdouble c)) \
1478     F(void, End, ()) \
1479     F(void, EdgeFlagv, (const GLboolean *flag)) \
1480     F(void, EdgeFlag, (GLboolean flag)) \
1481     F(void, Color4usv, (const GLushort *v)) \
1482     F(void, Color4us, (GLushort red, GLushort green, GLushort blue, GLushort alpha)) \
1483     F(void, Color4uiv, (const GLuint *v)) \
1484     F(void, Color4ui, (GLuint red, GLuint green, GLuint blue, GLuint alpha)) \
1485     F(void, Color4ubv, (const GLubyte *v)) \
1486     F(void, Color4ub, (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)) \
1487     F(void, Color4sv, (const GLshort *v)) \
1488     F(void, Color4s, (GLshort red, GLshort green, GLshort blue, GLshort alpha)) \
1489     F(void, Color4iv, (const GLint *v)) \
1490     F(void, Color4i, (GLint red, GLint green, GLint blue, GLint alpha)) \
1491     F(void, Color4fv, (const GLfloat *v)) \
1492     F(void, Color4f, (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)) \
1493     F(void, Color4dv, (const GLdouble *v)) \
1494     F(void, Color4d, (GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha)) \
1495     F(void, Color4bv, (const GLbyte *v)) \
1496     F(void, Color4b, (GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha)) \
1497     F(void, Color3usv, (const GLushort *v)) \
1498     F(void, Color3us, (GLushort red, GLushort green, GLushort blue)) \
1499     F(void, Color3uiv, (const GLuint *v)) \
1500     F(void, Color3ui, (GLuint red, GLuint green, GLuint blue)) \
1501     F(void, Color3ubv, (const GLubyte *v)) \
1502     F(void, Color3ub, (GLubyte red, GLubyte green, GLubyte blue)) \
1503     F(void, Color3sv, (const GLshort *v)) \
1504     F(void, Color3s, (GLshort red, GLshort green, GLshort blue)) \
1505     F(void, Color3iv, (const GLint *v)) \
1506     F(void, Color3i, (GLint red, GLint green, GLint blue)) \
1507     F(void, Color3fv, (const GLfloat *v)) \
1508     F(void, Color3f, (GLfloat red, GLfloat green, GLfloat blue)) \
1509     F(void, Color3dv, (const GLdouble *v)) \
1510     F(void, Color3d, (GLdouble red, GLdouble green, GLdouble blue)) \
1511     F(void, Color3bv, (const GLbyte *v)) \
1512     F(void, Color3b, (GLbyte red, GLbyte green, GLbyte blue)) \
1513     F(void, Bitmap, (GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap)) \
1514     F(void, Begin, (GLenum mode)) \
1515     F(void, ListBase, (GLuint base)) \
1516     F(GLuint, GenLists, (GLsizei range)) \
1517     F(void, DeleteLists, (GLuint list, GLsizei range)) \
1518     F(void, CallLists, (GLsizei n, GLenum type, const GLvoid *lists)) \
1519     F(void, CallList, (GLuint list)) \
1520     F(void, EndList, ()) \
1521     F(void, NewList, (GLuint list, GLenum mode)) \
1522 
1523     QT_OPENGL_DECLARE(QT_OPENGL_1_0_DEPRECATED_FUNCTIONS);
1524 };
1525 
1526 class QOpenGLFunctions_1_1_DeprecatedBackend : public QOpenGLVersionFunctionsBackend
1527 {
1528 public:
QOpenGLFunctions_1_1_DeprecatedBackend(QOpenGLContext * c)1529     QOpenGLFunctions_1_1_DeprecatedBackend(QOpenGLContext *c)
1530         : QOpenGLVersionFunctionsBackend(c)
1531     {
1532         init();
1533     }
1534 
versionStatus()1535     Q_DECL_CONSTEXPR static Version versionStatus()
1536     { return OpenGL_1_1_Deprecated; }
1537 
1538     // OpenGL 1.1 deprecated functions
1539 #define QT_OPENGL_1_1_DEPRECATED_FUNCTIONS(F) \
1540     F(void, PushClientAttrib, (GLbitfield mask)) \
1541     F(void, PopClientAttrib, ()) \
1542     F(void, PrioritizeTextures, (GLsizei n, const GLuint *textures, const GLfloat *priorities)) \
1543     F(GLboolean, AreTexturesResident, (GLsizei n, const GLuint *textures, GLboolean *residences)) \
1544     F(void, VertexPointer, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)) \
1545     F(void, TexCoordPointer, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)) \
1546     F(void, NormalPointer, (GLenum type, GLsizei stride, const GLvoid *pointer)) \
1547     F(void, InterleavedArrays, (GLenum format, GLsizei stride, const GLvoid *pointer)) \
1548     F(void, IndexPointer, (GLenum type, GLsizei stride, const GLvoid *pointer)) \
1549     F(void, EnableClientState, (GLenum array)) \
1550     F(void, EdgeFlagPointer, (GLsizei stride, const GLvoid *pointer)) \
1551     F(void, DisableClientState, (GLenum array)) \
1552     F(void, ColorPointer, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)) \
1553     F(void, ArrayElement, (GLint i)) \
1554     F(void, Indexubv, (const GLubyte *c)) \
1555     F(void, Indexub, (GLubyte c)) \
1556     F(void, GetPointerv, (GLenum pname, GLvoid* *params)) \
1557 
1558     QT_OPENGL_DECLARE(QT_OPENGL_1_1_DEPRECATED_FUNCTIONS);
1559 };
1560 
1561 class QOpenGLFunctions_1_2_DeprecatedBackend : public QOpenGLVersionFunctionsBackend
1562 {
1563 public:
QOpenGLFunctions_1_2_DeprecatedBackend(QOpenGLContext * c)1564     QOpenGLFunctions_1_2_DeprecatedBackend(QOpenGLContext *c)
1565         : QOpenGLVersionFunctionsBackend(c)
1566     {
1567         init();
1568     }
1569 
versionStatus()1570     Q_DECL_CONSTEXPR static Version versionStatus()
1571     { return OpenGL_1_2_Deprecated; }
1572 
1573     // OpenGL 1.2 deprecated functions
1574 #define QT_OPENGL_1_2_DEPRECATED_FUNCTIONS(F) \
1575     F(void, ColorTableParameterfv, (GLenum target, GLenum pname, const GLfloat *params)) \
1576     F(void, ColorTableParameteriv, (GLenum target, GLenum pname, const GLint *params)) \
1577     F(void, CopyColorTable, (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width)) \
1578     F(void, GetColorTable, (GLenum target, GLenum format, GLenum type, GLvoid *table)) \
1579     F(void, GetColorTableParameterfv, (GLenum target, GLenum pname, GLfloat *params)) \
1580     F(void, GetColorTableParameteriv, (GLenum target, GLenum pname, GLint *params)) \
1581     F(void, ColorSubTable, (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data)) \
1582     F(void, CopyColorSubTable, (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width)) \
1583     F(void, ConvolutionFilter1D, (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image)) \
1584     F(void, ConvolutionFilter2D, (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image)) \
1585     F(void, ConvolutionParameterf, (GLenum target, GLenum pname, GLfloat params)) \
1586     F(void, ConvolutionParameterfv, (GLenum target, GLenum pname, const GLfloat *params)) \
1587     F(void, ConvolutionParameteri, (GLenum target, GLenum pname, GLint params)) \
1588     F(void, ConvolutionParameteriv, (GLenum target, GLenum pname, const GLint *params)) \
1589     F(void, CopyConvolutionFilter1D, (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width)) \
1590     F(void, CopyConvolutionFilter2D, (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height)) \
1591     F(void, GetConvolutionFilter, (GLenum target, GLenum format, GLenum type, GLvoid *image)) \
1592     F(void, GetConvolutionParameterfv, (GLenum target, GLenum pname, GLfloat *params)) \
1593     F(void, GetConvolutionParameteriv, (GLenum target, GLenum pname, GLint *params)) \
1594     F(void, GetSeparableFilter, (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span)) \
1595     F(void, SeparableFilter2D, (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column)) \
1596     F(void, GetHistogram, (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values)) \
1597     F(void, GetHistogramParameterfv, (GLenum target, GLenum pname, GLfloat *params)) \
1598     F(void, GetHistogramParameteriv, (GLenum target, GLenum pname, GLint *params)) \
1599     F(void, GetMinmax, (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values)) \
1600     F(void, GetMinmaxParameterfv, (GLenum target, GLenum pname, GLfloat *params)) \
1601     F(void, GetMinmaxParameteriv, (GLenum target, GLenum pname, GLint *params)) \
1602     F(void, Histogram, (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink)) \
1603     F(void, Minmax, (GLenum target, GLenum internalformat, GLboolean sink)) \
1604     F(void, ResetHistogram, (GLenum target)) \
1605     F(void, ResetMinmax, (GLenum target)) \
1606     F(void, ColorTable, (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table)) \
1607 
1608     QT_OPENGL_DECLARE(QT_OPENGL_1_2_DEPRECATED_FUNCTIONS);
1609 };
1610 
1611 class QOpenGLFunctions_1_3_DeprecatedBackend : public QOpenGLVersionFunctionsBackend
1612 {
1613 public:
QOpenGLFunctions_1_3_DeprecatedBackend(QOpenGLContext * c)1614     QOpenGLFunctions_1_3_DeprecatedBackend(QOpenGLContext *c)
1615         : QOpenGLVersionFunctionsBackend(c)
1616     {
1617         init();
1618     }
1619 
versionStatus()1620     Q_DECL_CONSTEXPR static Version versionStatus()
1621     { return OpenGL_1_3_Deprecated; }
1622 
1623     // OpenGL 1.3 deprecated functions
1624 #define QT_OPENGL_1_3_DEPRECATED_FUNCTIONS(F) \
1625     F(void, MultTransposeMatrixd, (const GLdouble *m)) \
1626     F(void, MultTransposeMatrixf, (const GLfloat *m)) \
1627     F(void, LoadTransposeMatrixd, (const GLdouble *m)) \
1628     F(void, LoadTransposeMatrixf, (const GLfloat *m)) \
1629     F(void, MultiTexCoord4sv, (GLenum target, const GLshort *v)) \
1630     F(void, MultiTexCoord4s, (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q)) \
1631     F(void, MultiTexCoord4iv, (GLenum target, const GLint *v)) \
1632     F(void, MultiTexCoord4i, (GLenum target, GLint s, GLint t, GLint r, GLint q)) \
1633     F(void, MultiTexCoord4fv, (GLenum target, const GLfloat *v)) \
1634     F(void, MultiTexCoord4f, (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q)) \
1635     F(void, MultiTexCoord4dv, (GLenum target, const GLdouble *v)) \
1636     F(void, MultiTexCoord4d, (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q)) \
1637     F(void, MultiTexCoord3sv, (GLenum target, const GLshort *v)) \
1638     F(void, MultiTexCoord3s, (GLenum target, GLshort s, GLshort t, GLshort r)) \
1639     F(void, MultiTexCoord3iv, (GLenum target, const GLint *v)) \
1640     F(void, MultiTexCoord3i, (GLenum target, GLint s, GLint t, GLint r)) \
1641     F(void, MultiTexCoord3fv, (GLenum target, const GLfloat *v)) \
1642     F(void, MultiTexCoord3f, (GLenum target, GLfloat s, GLfloat t, GLfloat r)) \
1643     F(void, MultiTexCoord3dv, (GLenum target, const GLdouble *v)) \
1644     F(void, MultiTexCoord3d, (GLenum target, GLdouble s, GLdouble t, GLdouble r)) \
1645     F(void, MultiTexCoord2sv, (GLenum target, const GLshort *v)) \
1646     F(void, MultiTexCoord2s, (GLenum target, GLshort s, GLshort t)) \
1647     F(void, MultiTexCoord2iv, (GLenum target, const GLint *v)) \
1648     F(void, MultiTexCoord2i, (GLenum target, GLint s, GLint t)) \
1649     F(void, MultiTexCoord2fv, (GLenum target, const GLfloat *v)) \
1650     F(void, MultiTexCoord2f, (GLenum target, GLfloat s, GLfloat t)) \
1651     F(void, MultiTexCoord2dv, (GLenum target, const GLdouble *v)) \
1652     F(void, MultiTexCoord2d, (GLenum target, GLdouble s, GLdouble t)) \
1653     F(void, MultiTexCoord1sv, (GLenum target, const GLshort *v)) \
1654     F(void, MultiTexCoord1s, (GLenum target, GLshort s)) \
1655     F(void, MultiTexCoord1iv, (GLenum target, const GLint *v)) \
1656     F(void, MultiTexCoord1i, (GLenum target, GLint s)) \
1657     F(void, MultiTexCoord1fv, (GLenum target, const GLfloat *v)) \
1658     F(void, MultiTexCoord1f, (GLenum target, GLfloat s)) \
1659     F(void, MultiTexCoord1dv, (GLenum target, const GLdouble *v)) \
1660     F(void, MultiTexCoord1d, (GLenum target, GLdouble s)) \
1661     F(void, ClientActiveTexture, (GLenum texture)) \
1662 
1663     QT_OPENGL_DECLARE(QT_OPENGL_1_3_DEPRECATED_FUNCTIONS);
1664 };
1665 
1666 class QOpenGLFunctions_1_4_DeprecatedBackend : public QOpenGLVersionFunctionsBackend
1667 {
1668 public:
QOpenGLFunctions_1_4_DeprecatedBackend(QOpenGLContext * c)1669     QOpenGLFunctions_1_4_DeprecatedBackend(QOpenGLContext *c)
1670         : QOpenGLVersionFunctionsBackend(c)
1671     {
1672         init();
1673     }
1674 
versionStatus()1675     Q_DECL_CONSTEXPR static Version versionStatus()
1676     { return OpenGL_1_4_Deprecated; }
1677 
1678     // OpenGL 1.4 deprecated functions
1679 #define QT_OPENGL_1_4_DEPRECATED_FUNCTIONS(F) \
1680     F(void, WindowPos3sv, (const GLshort *v)) \
1681     F(void, WindowPos3s, (GLshort x, GLshort y, GLshort z)) \
1682     F(void, WindowPos3iv, (const GLint *v)) \
1683     F(void, WindowPos3i, (GLint x, GLint y, GLint z)) \
1684     F(void, WindowPos3fv, (const GLfloat *v)) \
1685     F(void, WindowPos3f, (GLfloat x, GLfloat y, GLfloat z)) \
1686     F(void, WindowPos3dv, (const GLdouble *v)) \
1687     F(void, WindowPos3d, (GLdouble x, GLdouble y, GLdouble z)) \
1688     F(void, WindowPos2sv, (const GLshort *v)) \
1689     F(void, WindowPos2s, (GLshort x, GLshort y)) \
1690     F(void, WindowPos2iv, (const GLint *v)) \
1691     F(void, WindowPos2i, (GLint x, GLint y)) \
1692     F(void, WindowPos2fv, (const GLfloat *v)) \
1693     F(void, WindowPos2f, (GLfloat x, GLfloat y)) \
1694     F(void, WindowPos2dv, (const GLdouble *v)) \
1695     F(void, WindowPos2d, (GLdouble x, GLdouble y)) \
1696     F(void, SecondaryColorPointer, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)) \
1697     F(void, SecondaryColor3usv, (const GLushort *v)) \
1698     F(void, SecondaryColor3us, (GLushort red, GLushort green, GLushort blue)) \
1699     F(void, SecondaryColor3uiv, (const GLuint *v)) \
1700     F(void, SecondaryColor3ui, (GLuint red, GLuint green, GLuint blue)) \
1701     F(void, SecondaryColor3ubv, (const GLubyte *v)) \
1702     F(void, SecondaryColor3ub, (GLubyte red, GLubyte green, GLubyte blue)) \
1703     F(void, SecondaryColor3sv, (const GLshort *v)) \
1704     F(void, SecondaryColor3s, (GLshort red, GLshort green, GLshort blue)) \
1705     F(void, SecondaryColor3iv, (const GLint *v)) \
1706     F(void, SecondaryColor3i, (GLint red, GLint green, GLint blue)) \
1707     F(void, SecondaryColor3fv, (const GLfloat *v)) \
1708     F(void, SecondaryColor3f, (GLfloat red, GLfloat green, GLfloat blue)) \
1709     F(void, SecondaryColor3dv, (const GLdouble *v)) \
1710     F(void, SecondaryColor3d, (GLdouble red, GLdouble green, GLdouble blue)) \
1711     F(void, SecondaryColor3bv, (const GLbyte *v)) \
1712     F(void, SecondaryColor3b, (GLbyte red, GLbyte green, GLbyte blue)) \
1713     F(void, FogCoordPointer, (GLenum type, GLsizei stride, const GLvoid *pointer)) \
1714     F(void, FogCoorddv, (const GLdouble *coord)) \
1715     F(void, FogCoordd, (GLdouble coord)) \
1716     F(void, FogCoordfv, (const GLfloat *coord)) \
1717     F(void, FogCoordf, (GLfloat coord)) \
1718 
1719     QT_OPENGL_DECLARE(QT_OPENGL_1_4_DEPRECATED_FUNCTIONS);
1720 };
1721 
1722 class QOpenGLFunctions_2_0_DeprecatedBackend : public QOpenGLVersionFunctionsBackend
1723 {
1724 public:
QOpenGLFunctions_2_0_DeprecatedBackend(QOpenGLContext * c)1725     QOpenGLFunctions_2_0_DeprecatedBackend(QOpenGLContext *c)
1726         : QOpenGLVersionFunctionsBackend(c)
1727     {
1728         init();
1729     }
1730 
versionStatus()1731     Q_DECL_CONSTEXPR static Version versionStatus()
1732     { return OpenGL_2_0_Deprecated; }
1733 
1734     // OpenGL 2.0 deprecated functions
1735 #define QT_OPENGL_2_0_DEPRECATED_FUNCTIONS(F) \
1736     F(void, VertexAttrib4usv, (GLuint index, const GLushort *v)) \
1737     F(void, VertexAttrib4uiv, (GLuint index, const GLuint *v)) \
1738     F(void, VertexAttrib4ubv, (GLuint index, const GLubyte *v)) \
1739     F(void, VertexAttrib4sv, (GLuint index, const GLshort *v)) \
1740     F(void, VertexAttrib4s, (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)) \
1741     F(void, VertexAttrib4iv, (GLuint index, const GLint *v)) \
1742     F(void, VertexAttrib4fv, (GLuint index, const GLfloat *v)) \
1743     F(void, VertexAttrib4f, (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)) \
1744     F(void, VertexAttrib4dv, (GLuint index, const GLdouble *v)) \
1745     F(void, VertexAttrib4d, (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)) \
1746     F(void, VertexAttrib4bv, (GLuint index, const GLbyte *v)) \
1747     F(void, VertexAttrib4Nusv, (GLuint index, const GLushort *v)) \
1748     F(void, VertexAttrib4Nuiv, (GLuint index, const GLuint *v)) \
1749     F(void, VertexAttrib4Nubv, (GLuint index, const GLubyte *v)) \
1750     F(void, VertexAttrib4Nub, (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)) \
1751     F(void, VertexAttrib4Nsv, (GLuint index, const GLshort *v)) \
1752     F(void, VertexAttrib4Niv, (GLuint index, const GLint *v)) \
1753     F(void, VertexAttrib4Nbv, (GLuint index, const GLbyte *v)) \
1754     F(void, VertexAttrib3sv, (GLuint index, const GLshort *v)) \
1755     F(void, VertexAttrib3s, (GLuint index, GLshort x, GLshort y, GLshort z)) \
1756     F(void, VertexAttrib3fv, (GLuint index, const GLfloat *v)) \
1757     F(void, VertexAttrib3f, (GLuint index, GLfloat x, GLfloat y, GLfloat z)) \
1758     F(void, VertexAttrib3dv, (GLuint index, const GLdouble *v)) \
1759     F(void, VertexAttrib3d, (GLuint index, GLdouble x, GLdouble y, GLdouble z)) \
1760     F(void, VertexAttrib2sv, (GLuint index, const GLshort *v)) \
1761     F(void, VertexAttrib2s, (GLuint index, GLshort x, GLshort y)) \
1762     F(void, VertexAttrib2fv, (GLuint index, const GLfloat *v)) \
1763     F(void, VertexAttrib2f, (GLuint index, GLfloat x, GLfloat y)) \
1764     F(void, VertexAttrib2dv, (GLuint index, const GLdouble *v)) \
1765     F(void, VertexAttrib2d, (GLuint index, GLdouble x, GLdouble y)) \
1766     F(void, VertexAttrib1sv, (GLuint index, const GLshort *v)) \
1767     F(void, VertexAttrib1s, (GLuint index, GLshort x)) \
1768     F(void, VertexAttrib1fv, (GLuint index, const GLfloat *v)) \
1769     F(void, VertexAttrib1f, (GLuint index, GLfloat x)) \
1770     F(void, VertexAttrib1dv, (GLuint index, const GLdouble *v)) \
1771     F(void, VertexAttrib1d, (GLuint index, GLdouble x)) \
1772 
1773     QT_OPENGL_DECLARE(QT_OPENGL_2_0_DEPRECATED_FUNCTIONS);
1774 };
1775 
1776 class QOpenGLFunctions_3_0_DeprecatedBackend : public QOpenGLVersionFunctionsBackend
1777 {
1778 public:
QOpenGLFunctions_3_0_DeprecatedBackend(QOpenGLContext * c)1779     QOpenGLFunctions_3_0_DeprecatedBackend(QOpenGLContext *c)
1780         : QOpenGLVersionFunctionsBackend(c)
1781     {
1782         init();
1783     }
1784 
versionStatus()1785     Q_DECL_CONSTEXPR static Version versionStatus()
1786     { return OpenGL_3_0_Deprecated; }
1787 
1788     // OpenGL 3.0 deprecated functions
1789 #define QT_OPENGL_3_0_DEPRECATED_FUNCTIONS(F) \
1790     F(void, VertexAttribI4usv, (GLuint index, const GLushort *v)) \
1791     F(void, VertexAttribI4ubv, (GLuint index, const GLubyte *v)) \
1792     F(void, VertexAttribI4sv, (GLuint index, const GLshort *v)) \
1793     F(void, VertexAttribI4bv, (GLuint index, const GLbyte *v)) \
1794     F(void, VertexAttribI4uiv, (GLuint index, const GLuint *v)) \
1795     F(void, VertexAttribI3uiv, (GLuint index, const GLuint *v)) \
1796     F(void, VertexAttribI2uiv, (GLuint index, const GLuint *v)) \
1797     F(void, VertexAttribI1uiv, (GLuint index, const GLuint *v)) \
1798     F(void, VertexAttribI4iv, (GLuint index, const GLint *v)) \
1799     F(void, VertexAttribI3iv, (GLuint index, const GLint *v)) \
1800     F(void, VertexAttribI2iv, (GLuint index, const GLint *v)) \
1801     F(void, VertexAttribI1iv, (GLuint index, const GLint *v)) \
1802     F(void, VertexAttribI4ui, (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)) \
1803     F(void, VertexAttribI3ui, (GLuint index, GLuint x, GLuint y, GLuint z)) \
1804     F(void, VertexAttribI2ui, (GLuint index, GLuint x, GLuint y)) \
1805     F(void, VertexAttribI1ui, (GLuint index, GLuint x)) \
1806     F(void, VertexAttribI4i, (GLuint index, GLint x, GLint y, GLint z, GLint w)) \
1807     F(void, VertexAttribI3i, (GLuint index, GLint x, GLint y, GLint z)) \
1808     F(void, VertexAttribI2i, (GLuint index, GLint x, GLint y)) \
1809     F(void, VertexAttribI1i, (GLuint index, GLint x)) \
1810 
1811     QT_OPENGL_DECLARE(QT_OPENGL_3_0_DEPRECATED_FUNCTIONS);
1812 };
1813 
1814 class QOpenGLFunctions_3_3_DeprecatedBackend : public QOpenGLVersionFunctionsBackend
1815 {
1816 public:
QOpenGLFunctions_3_3_DeprecatedBackend(QOpenGLContext * c)1817     QOpenGLFunctions_3_3_DeprecatedBackend(QOpenGLContext *c)
1818         : QOpenGLVersionFunctionsBackend(c)
1819     {
1820         init();
1821     }
1822 
versionStatus()1823     Q_DECL_CONSTEXPR static Version versionStatus()
1824     { return OpenGL_3_3_Deprecated; }
1825 
1826     // OpenGL 3.3 deprecated functions
1827 #define QT_OPENGL_3_3_DEPRECATED_FUNCTIONS(F) \
1828     F(void, SecondaryColorP3uiv, (GLenum type, const GLuint *color)) \
1829     F(void, SecondaryColorP3ui, (GLenum type, GLuint color)) \
1830     F(void, ColorP4uiv, (GLenum type, const GLuint *color)) \
1831     F(void, ColorP4ui, (GLenum type, GLuint color)) \
1832     F(void, ColorP3uiv, (GLenum type, const GLuint *color)) \
1833     F(void, ColorP3ui, (GLenum type, GLuint color)) \
1834     F(void, NormalP3uiv, (GLenum type, const GLuint *coords)) \
1835     F(void, NormalP3ui, (GLenum type, GLuint coords)) \
1836     F(void, MultiTexCoordP4uiv, (GLenum texture, GLenum type, const GLuint *coords)) \
1837     F(void, MultiTexCoordP4ui, (GLenum texture, GLenum type, GLuint coords)) \
1838     F(void, MultiTexCoordP3uiv, (GLenum texture, GLenum type, const GLuint *coords)) \
1839     F(void, MultiTexCoordP3ui, (GLenum texture, GLenum type, GLuint coords)) \
1840     F(void, MultiTexCoordP2uiv, (GLenum texture, GLenum type, const GLuint *coords)) \
1841     F(void, MultiTexCoordP2ui, (GLenum texture, GLenum type, GLuint coords)) \
1842     F(void, MultiTexCoordP1uiv, (GLenum texture, GLenum type, const GLuint *coords)) \
1843     F(void, MultiTexCoordP1ui, (GLenum texture, GLenum type, GLuint coords)) \
1844     F(void, TexCoordP4uiv, (GLenum type, const GLuint *coords)) \
1845     F(void, TexCoordP4ui, (GLenum type, GLuint coords)) \
1846     F(void, TexCoordP3uiv, (GLenum type, const GLuint *coords)) \
1847     F(void, TexCoordP3ui, (GLenum type, GLuint coords)) \
1848     F(void, TexCoordP2uiv, (GLenum type, const GLuint *coords)) \
1849     F(void, TexCoordP2ui, (GLenum type, GLuint coords)) \
1850     F(void, TexCoordP1uiv, (GLenum type, const GLuint *coords)) \
1851     F(void, TexCoordP1ui, (GLenum type, GLuint coords)) \
1852     F(void, VertexP4uiv, (GLenum type, const GLuint *value)) \
1853     F(void, VertexP4ui, (GLenum type, GLuint value)) \
1854     F(void, VertexP3uiv, (GLenum type, const GLuint *value)) \
1855     F(void, VertexP3ui, (GLenum type, GLuint value)) \
1856     F(void, VertexP2uiv, (GLenum type, const GLuint *value)) \
1857     F(void, VertexP2ui, (GLenum type, GLuint value)) \
1858 
1859     QT_OPENGL_DECLARE(QT_OPENGL_3_3_DEPRECATED_FUNCTIONS);
1860 };
1861 
1862 class QOpenGLFunctions_4_5_DeprecatedBackend : public QOpenGLVersionFunctionsBackend
1863 {
1864 public:
QOpenGLFunctions_4_5_DeprecatedBackend(QOpenGLContext * c)1865     QOpenGLFunctions_4_5_DeprecatedBackend(QOpenGLContext *c)
1866         : QOpenGLVersionFunctionsBackend(c)
1867     {
1868         init();
1869     }
1870 
versionStatus()1871     Q_DECL_CONSTEXPR static Version versionStatus()
1872     { return OpenGL_4_5_Deprecated; }
1873 
1874     // OpenGL 4.5 deprecated functions
1875 #define QT_OPENGL_4_5_DEPRECATED_FUNCTIONS(F) \
1876     F(void, GetnMinmax, (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values)) \
1877     F(void, GetnHistogram, (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid *values)) \
1878     F(void, GetnSeparableFilter, (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, GLvoid *row, GLsizei columnBufSize, GLvoid *column, GLvoid *span)) \
1879     F(void, GetnConvolutionFilter, (GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *image)) \
1880     F(void, GetnColorTable, (GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid *table)) \
1881     F(void, GetnPolygonStipple, (GLsizei bufSize, GLubyte *pattern)) \
1882     F(void, GetnPixelMapusv, (GLenum map, GLsizei bufSize, GLushort *values)) \
1883     F(void, GetnPixelMapuiv, (GLenum map, GLsizei bufSize, GLuint *values)) \
1884     F(void, GetnPixelMapfv, (GLenum map, GLsizei bufSize, GLfloat *values)) \
1885     F(void, GetnMapiv, (GLenum target, GLenum query, GLsizei bufSize, GLint *v)) \
1886     F(void, GetnMapfv, (GLenum target, GLenum query, GLsizei bufSize, GLfloat *v)) \
1887     F(void, GetnMapdv, (GLenum target, GLenum query, GLsizei bufSize, GLdouble *v)) \
1888 
1889     QT_OPENGL_DECLARE(QT_OPENGL_4_5_DEPRECATED_FUNCTIONS);
1890 };
1891 
1892 #else
1893 
1894 // No need for backend classes with function pointers with ES2.
1895 // All function addresses are independent of context and display.
1896 
1897 #endif // !QT_OPENGL_ES_2
1898 
1899 #undef QT_OPENGL_DECLARE_FUNCTIONS
1900 #undef QT_OPENGL_COUNT_FUNCTIONS
1901 #undef QT_OPENGL_DECLARE
1902 
1903 
1904 QT_END_NAMESPACE
1905 
1906 #ifdef Q_OS_WIN
1907 #pragma pop_macro("MemoryBarrier")
1908 #endif
1909 
1910 #endif // QT_NO_OPENGL
1911 
1912 #endif
1913