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