1/****************************************************************************
2**
3** Copyright (C) 2016 The Qt Company Ltd.
4** Contact: https://www.qt.io/licensing/
5**
6** This file is part of the QtGui module of the Qt Toolkit.
7**
8** $QT_BEGIN_LICENSE:LGPL$
9** Commercial License Usage
10** Licensees holding valid commercial Qt licenses may use this file in
11** accordance with the commercial license agreement provided with the
12** Software or, alternatively, in accordance with the terms contained in
13** a written agreement between you and The Qt Company. For licensing terms
14** and conditions see https://www.qt.io/terms-conditions. For further
15** information use the contact form at https://www.qt.io/contact-us.
16**
17** GNU Lesser General Public License Usage
18** Alternatively, this file may be used under the terms of the GNU Lesser
19** General Public License version 3 as published by the Free Software
20** Foundation and appearing in the file LICENSE.LGPL3 included in the
21** packaging of this file. Please review the following information to
22** ensure the GNU Lesser General Public License version 3 requirements
23** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
24**
25** GNU General Public License Usage
26** Alternatively, this file may be used under the terms of the GNU
27** General Public License version 2.0 or (at your option) the GNU General
28** Public license version 3 or any later version approved by the KDE Free
29** Qt Foundation. The licenses are as published by the Free Software
30** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
31** included in the packaging of this file. Please review the following
32** information to ensure the GNU General Public License requirements will
33** be met: https://www.gnu.org/licenses/gpl-2.0.html and
34** https://www.gnu.org/licenses/gpl-3.0.html.
35**
36** $QT_END_LICENSE$
37**
38****************************************************************************/
39
40#ifndef QOPENGLEXTRAFUNCTIONS_H
41#define QOPENGLEXTRAFUNCTIONS_H
42
43#include <QtGui/qtguiglobal.h>
44
45#ifndef QT_NO_OPENGL
46
47#include <QtGui/qopenglfunctions.h>
48
49// MemoryBarrier is a macro on some architectures on Windows
50#ifdef Q_OS_WIN
51#pragma push_macro("MemoryBarrier")
52#undef MemoryBarrier
53#endif
54
55// GLES build without having included gl32.h -> GLDEBUGPROC is still need for the protos, define it here
56#if defined(QT_OPENGL_ES_2) && !defined(QT_OPENGL_ES_3_2)
57typedef void (QOPENGLF_APIENTRYP *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
58#endif
59
60QT_BEGIN_NAMESPACE
61
62class QOpenGLExtraFunctionsPrivate;
63
64#undef glReadBuffer
65#undef glDrawRangeElements
66#undef glTexImage3D
67#undef glTexSubImage3D
68#undef glCopyTexSubImage3D
69#undef glCompressedTexImage3D
70#undef glCompressedTexSubImage3D
71#undef glGenQueries
72#undef glDeleteQueries
73#undef glIsQuery
74#undef glBeginQuery
75#undef glEndQuery
76#undef glGetQueryiv
77#undef glGetQueryObjectuiv
78#undef glUnmapBuffer
79#undef glGetBufferPointerv
80#undef glDrawBuffers
81#undef glUniformMatrix2x3fv
82#undef glUniformMatrix3x2fv
83#undef glUniformMatrix2x4fv
84#undef glUniformMatrix4x2fv
85#undef glUniformMatrix3x4fv
86#undef glUniformMatrix4x3fv
87#undef glBlitFramebuffer
88#undef glRenderbufferStorageMultisample
89#undef glFramebufferTextureLayer
90#undef glMapBufferRange
91#undef glFlushMappedBufferRange
92#undef glBindVertexArray
93#undef glDeleteVertexArrays
94#undef glGenVertexArrays
95#undef glIsVertexArray
96#undef glGetIntegeri_v
97#undef glBeginTransformFeedback
98#undef glEndTransformFeedback
99#undef glBindBufferRange
100#undef glBindBufferBase
101#undef glTransformFeedbackVaryings
102#undef glGetTransformFeedbackVarying
103#undef glVertexAttribIPointer
104#undef glGetVertexAttribIiv
105#undef glGetVertexAttribIuiv
106#undef glVertexAttribI4i
107#undef glVertexAttribI4ui
108#undef glVertexAttribI4iv
109#undef glVertexAttribI4uiv
110#undef glGetUniformuiv
111#undef glGetFragDataLocation
112#undef glUniform1ui
113#undef glUniform2ui
114#undef glUniform3ui
115#undef glUniform4ui
116#undef glUniform1uiv
117#undef glUniform2uiv
118#undef glUniform3uiv
119#undef glUniform4uiv
120#undef glClearBufferiv
121#undef glClearBufferuiv
122#undef glClearBufferfv
123#undef glClearBufferfi
124#undef glGetStringi
125#undef glCopyBufferSubData
126#undef glGetUniformIndices
127#undef glGetActiveUniformsiv
128#undef glGetUniformBlockIndex
129#undef glGetActiveUniformBlockiv
130#undef glGetActiveUniformBlockName
131#undef glUniformBlockBinding
132#undef glDrawArraysInstanced
133#undef glDrawElementsInstanced
134#undef glFenceSync
135#undef glIsSync
136#undef glDeleteSync
137#undef glClientWaitSync
138#undef glWaitSync
139#undef glGetInteger64v
140#undef glGetSynciv
141#undef glGetInteger64i_v
142#undef glGetBufferParameteri64v
143#undef glGenSamplers
144#undef glDeleteSamplers
145#undef glIsSampler
146#undef glBindSampler
147#undef glSamplerParameteri
148#undef glSamplerParameteriv
149#undef glSamplerParameterf
150#undef glSamplerParameterfv
151#undef glGetSamplerParameteriv
152#undef glGetSamplerParameterfv
153#undef glVertexAttribDivisor
154#undef glBindTransformFeedback
155#undef glDeleteTransformFeedbacks
156#undef glGenTransformFeedbacks
157#undef glIsTransformFeedback
158#undef glPauseTransformFeedback
159#undef glResumeTransformFeedback
160#undef glGetProgramBinary
161#undef glProgramBinary
162#undef glProgramParameteri
163#undef glInvalidateFramebuffer
164#undef glInvalidateSubFramebuffer
165#undef glTexStorage2D
166#undef glTexStorage3D
167#undef glGetInternalformativ
168
169#undef glDispatchCompute
170#undef glDispatchComputeIndirect
171#undef glDrawArraysIndirect
172#undef glDrawElementsIndirect
173#undef glFramebufferParameteri
174#undef glGetFramebufferParameteriv
175#undef glGetProgramInterfaceiv
176#undef glGetProgramResourceIndex
177#undef glGetProgramResourceName
178#undef glGetProgramResourceiv
179#undef glGetProgramResourceLocation
180#undef glUseProgramStages
181#undef glActiveShaderProgram
182#undef glCreateShaderProgramv
183#undef glBindProgramPipeline
184#undef glDeleteProgramPipelines
185#undef glGenProgramPipelines
186#undef glIsProgramPipeline
187#undef glGetProgramPipelineiv
188#undef glProgramUniform1i
189#undef glProgramUniform2i
190#undef glProgramUniform3i
191#undef glProgramUniform4i
192#undef glProgramUniform1ui
193#undef glProgramUniform2ui
194#undef glProgramUniform3ui
195#undef glProgramUniform4ui
196#undef glProgramUniform1f
197#undef glProgramUniform2f
198#undef glProgramUniform3f
199#undef glProgramUniform4f
200#undef glProgramUniform1iv
201#undef glProgramUniform2iv
202#undef glProgramUniform3iv
203#undef glProgramUniform4iv
204#undef glProgramUniform1uiv
205#undef glProgramUniform2uiv
206#undef glProgramUniform3uiv
207#undef glProgramUniform4uiv
208#undef glProgramUniform1fv
209#undef glProgramUniform2fv
210#undef glProgramUniform3fv
211#undef glProgramUniform4fv
212#undef glProgramUniformMatrix2fv
213#undef glProgramUniformMatrix3fv
214#undef glProgramUniformMatrix4fv
215#undef glProgramUniformMatrix2x3fv
216#undef glProgramUniformMatrix3x2fv
217#undef glProgramUniformMatrix2x4fv
218#undef glProgramUniformMatrix4x2fv
219#undef glProgramUniformMatrix3x4fv
220#undef glProgramUniformMatrix4x3fv
221#undef glValidateProgramPipeline
222#undef glGetProgramPipelineInfoLog
223#undef glBindImageTexture
224#undef glGetBooleani_v
225#undef glMemoryBarrier
226#undef glMemoryBarrierByRegion
227#undef glTexStorage2DMultisample
228#undef glGetMultisamplefv
229#undef glSampleMaski
230#undef glGetTexLevelParameteriv
231#undef glGetTexLevelParameterfv
232#undef glBindVertexBuffer
233#undef glVertexAttribFormat
234#undef glVertexAttribIFormat
235#undef glVertexAttribBinding
236#undef glVertexBindingDivisor
237
238#undef glBlendBarrier
239#undef glCopyImageSubData
240#undef glDebugMessageControl
241#undef glDebugMessageInsert
242#undef glDebugMessageCallback
243#undef glGetDebugMessageLog
244#undef glPushDebugGroup
245#undef glPopDebugGroup
246#undef glObjectLabel
247#undef glGetObjectLabel
248#undef glGetObjectPtrLabel
249#undef glGetPointerv
250#undef glEnablei
251#undef glDisablei
252#undef glBlendEquationi
253#undef glBlendEquationSeparatei
254#undef glBlendFunci
255#undef glBlendFuncSeparatei
256#undef glColorMaski
257#undef glIsEnabledi
258#undef glDrawElementsBaseVertex
259#undef glDrawRangeElementsBaseVertex
260#undef glDrawElementsInstancedBaseVertex
261#undef glFrameBufferTexture
262#undef glPrimitiveBoundingBox
263#undef glGetGraphicsResetStatus
264#undef glReadnPixels
265#undef glGetnUniformfv
266#undef glGetnUniformiv
267#undef glGetnUniformuiv
268#undef glMinSampleShading
269#undef glPatchParameteri
270#undef glTexParameterIiv
271#undef glTexParameterIuiv
272#undef glGetTexParameterIiv
273#undef glGetTexParameterIuiv
274#undef glSamplerParameterIiv
275#undef glSamplerParameterIuiv
276#undef glGetSamplerParameterIiv
277#undef glGetSamplerParameterIuiv
278#undef glTexBuffer
279#undef glTexBufferRange
280#undef glTexStorage3DMultisample
281
282class Q_GUI_EXPORT QOpenGLExtraFunctions : public QOpenGLFunctions
283{
284 Q_DECLARE_PRIVATE(QOpenGLExtraFunctions)
285
286public:
287 QOpenGLExtraFunctions();
288 QOpenGLExtraFunctions(QOpenGLContext *context);
289 ~QOpenGLExtraFunctions() {}
290
291 // GLES3
292 void glReadBuffer(GLenum mode);
293 void glDrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices);
294 void glTexImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels);
295 void glTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
296 void glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
297 void glCompressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data);
298 void glCompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
299 void glGenQueries(GLsizei n, GLuint *ids);
300 void glDeleteQueries(GLsizei n, const GLuint *ids);
301 GLboolean glIsQuery(GLuint id);
302 void glBeginQuery(GLenum target, GLuint id);
303 void glEndQuery(GLenum target);
304 void glGetQueryiv(GLenum target, GLenum pname, GLint *params);
305 void glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint *params);
306 GLboolean glUnmapBuffer(GLenum target);
307 void glGetBufferPointerv(GLenum target, GLenum pname, void **params);
308 void glDrawBuffers(GLsizei n, const GLenum *bufs);
309 void glUniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
310 void glUniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
311 void glUniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
312 void glUniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
313 void glUniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
314 void glUniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
315 void glBlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
316 void glRenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
317 void glFramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
318 void *glMapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
319 void glFlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length);
320 void glBindVertexArray(GLuint array);
321 void glDeleteVertexArrays(GLsizei n, const GLuint *arrays);
322 void glGenVertexArrays(GLsizei n, GLuint *arrays);
323 GLboolean glIsVertexArray(GLuint array);
324 void glGetIntegeri_v(GLenum target, GLuint index, GLint *data);
325 void glBeginTransformFeedback(GLenum primitiveMode);
326 void glEndTransformFeedback(void);
327 void glBindBufferRange(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
328 void glBindBufferBase(GLenum target, GLuint index, GLuint buffer);
329 void glTransformFeedbackVaryings(GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode);
330 void glGetTransformFeedbackVarying(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
331 void glVertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer);
332 void glGetVertexAttribIiv(GLuint index, GLenum pname, GLint *params);
333 void glGetVertexAttribIuiv(GLuint index, GLenum pname, GLuint *params);
334 void glVertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w);
335 void glVertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
336 void glVertexAttribI4iv(GLuint index, const GLint *v);
337 void glVertexAttribI4uiv(GLuint index, const GLuint *v);
338 void glGetUniformuiv(GLuint program, GLint location, GLuint *params);
339 GLint glGetFragDataLocation(GLuint program, const GLchar *name);
340 void glUniform1ui(GLint location, GLuint v0);
341 void glUniform2ui(GLint location, GLuint v0, GLuint v1);
342 void glUniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2);
343 void glUniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
344 void glUniform1uiv(GLint location, GLsizei count, const GLuint *value);
345 void glUniform2uiv(GLint location, GLsizei count, const GLuint *value);
346 void glUniform3uiv(GLint location, GLsizei count, const GLuint *value);
347 void glUniform4uiv(GLint location, GLsizei count, const GLuint *value);
348 void glClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint *value);
349 void glClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint *value);
350 void glClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat *value);
351 void glClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
352 const GLubyte *glGetStringi(GLenum name, GLuint index);
353 void glCopyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
354 void glGetUniformIndices(GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices);
355 void glGetActiveUniformsiv(GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params);
356 GLuint glGetUniformBlockIndex(GLuint program, const GLchar *uniformBlockName);
357 void glGetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params);
358 void glGetActiveUniformBlockName(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName);
359 void glUniformBlockBinding(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
360 void glDrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instancecount);
361 void glDrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount);
362 GLsync glFenceSync(GLenum condition, GLbitfield flags);
363 GLboolean glIsSync(GLsync sync);
364 void glDeleteSync(GLsync sync);
365 GLenum glClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout);
366 void glWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout);
367 void glGetInteger64v(GLenum pname, GLint64 *data);
368 void glGetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
369 void glGetInteger64i_v(GLenum target, GLuint index, GLint64 *data);
370 void glGetBufferParameteri64v(GLenum target, GLenum pname, GLint64 *params);
371 void glGenSamplers(GLsizei count, GLuint *samplers);
372 void glDeleteSamplers(GLsizei count, const GLuint *samplers);
373 GLboolean glIsSampler(GLuint sampler);
374 void glBindSampler(GLuint unit, GLuint sampler);
375 void glSamplerParameteri(GLuint sampler, GLenum pname, GLint param);
376 void glSamplerParameteriv(GLuint sampler, GLenum pname, const GLint *param);
377 void glSamplerParameterf(GLuint sampler, GLenum pname, GLfloat param);
378 void glSamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat *param);
379 void glGetSamplerParameteriv(GLuint sampler, GLenum pname, GLint *params);
380 void glGetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat *params);
381 void glVertexAttribDivisor(GLuint index, GLuint divisor);
382 void glBindTransformFeedback(GLenum target, GLuint id);
383 void glDeleteTransformFeedbacks(GLsizei n, const GLuint *ids);
384 void glGenTransformFeedbacks(GLsizei n, GLuint *ids);
385 GLboolean glIsTransformFeedback(GLuint id);
386 void glPauseTransformFeedback(void);
387 void glResumeTransformFeedback(void);
388 void glGetProgramBinary(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary);
389 void glProgramBinary(GLuint program, GLenum binaryFormat, const void *binary, GLsizei length);
390 void glProgramParameteri(GLuint program, GLenum pname, GLint value);
391 void glInvalidateFramebuffer(GLenum target, GLsizei numAttachments, const GLenum *attachments);
392 void glInvalidateSubFramebuffer(GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);
393 void glTexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
394 void glTexStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
395 void glGetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params);
396
397 // GLES 3.1
398 void glDispatchCompute(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z);
399 void glDispatchComputeIndirect(GLintptr indirect);
400 void glDrawArraysIndirect(GLenum mode, const void *indirect);
401 void glDrawElementsIndirect(GLenum mode, GLenum type, const void *indirect);
402 void glFramebufferParameteri(GLenum target, GLenum pname, GLint param);
403 void glGetFramebufferParameteriv(GLenum target, GLenum pname, GLint *params);
404 void glGetProgramInterfaceiv(GLuint program, GLenum programInterface, GLenum pname, GLint *params);
405 GLuint glGetProgramResourceIndex(GLuint program, GLenum programInterface, const GLchar *name);
406 void glGetProgramResourceName(GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name);
407 void glGetProgramResourceiv(GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params);
408 GLint glGetProgramResourceLocation(GLuint program, GLenum programInterface, const GLchar *name);
409 void glUseProgramStages(GLuint pipeline, GLbitfield stages, GLuint program);
410 void glActiveShaderProgram(GLuint pipeline, GLuint program);
411 GLuint glCreateShaderProgramv(GLenum type, GLsizei count, const GLchar *const*strings);
412 void glBindProgramPipeline(GLuint pipeline);
413 void glDeleteProgramPipelines(GLsizei n, const GLuint *pipelines);
414 void glGenProgramPipelines(GLsizei n, GLuint *pipelines);
415 GLboolean glIsProgramPipeline(GLuint pipeline);
416 void glGetProgramPipelineiv(GLuint pipeline, GLenum pname, GLint *params);
417 void glProgramUniform1i(GLuint program, GLint location, GLint v0);
418 void glProgramUniform2i(GLuint program, GLint location, GLint v0, GLint v1);
419 void glProgramUniform3i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
420 void glProgramUniform4i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
421 void glProgramUniform1ui(GLuint program, GLint location, GLuint v0);
422 void glProgramUniform2ui(GLuint program, GLint location, GLuint v0, GLuint v1);
423 void glProgramUniform3ui(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
424 void glProgramUniform4ui(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
425 void glProgramUniform1f(GLuint program, GLint location, GLfloat v0);
426 void glProgramUniform2f(GLuint program, GLint location, GLfloat v0, GLfloat v1);
427 void glProgramUniform3f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
428 void glProgramUniform4f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
429 void glProgramUniform1iv(GLuint program, GLint location, GLsizei count, const GLint *value);
430 void glProgramUniform2iv(GLuint program, GLint location, GLsizei count, const GLint *value);
431 void glProgramUniform3iv(GLuint program, GLint location, GLsizei count, const GLint *value);
432 void glProgramUniform4iv(GLuint program, GLint location, GLsizei count, const GLint *value);
433 void glProgramUniform1uiv(GLuint program, GLint location, GLsizei count, const GLuint *value);
434 void glProgramUniform2uiv(GLuint program, GLint location, GLsizei count, const GLuint *value);
435 void glProgramUniform3uiv(GLuint program, GLint location, GLsizei count, const GLuint *value);
436 void glProgramUniform4uiv(GLuint program, GLint location, GLsizei count, const GLuint *value);
437 void glProgramUniform1fv(GLuint program, GLint location, GLsizei count, const GLfloat *value);
438 void glProgramUniform2fv(GLuint program, GLint location, GLsizei count, const GLfloat *value);
439 void glProgramUniform3fv(GLuint program, GLint location, GLsizei count, const GLfloat *value);
440 void glProgramUniform4fv(GLuint program, GLint location, GLsizei count, const GLfloat *value);
441 void glProgramUniformMatrix2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
442 void glProgramUniformMatrix3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
443 void glProgramUniformMatrix4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
444 void glProgramUniformMatrix2x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
445 void glProgramUniformMatrix3x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
446 void glProgramUniformMatrix2x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
447 void glProgramUniformMatrix4x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
448 void glProgramUniformMatrix3x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
449 void glProgramUniformMatrix4x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
450 void glValidateProgramPipeline(GLuint pipeline);
451 void glGetProgramPipelineInfoLog(GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
452 void glBindImageTexture(GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format);
453 void glGetBooleani_v(GLenum target, GLuint index, GLboolean *data);
454 void glMemoryBarrier(GLbitfield barriers);
455 void glMemoryBarrierByRegion(GLbitfield barriers);
456 void glTexStorage2DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
457 void glGetMultisamplefv(GLenum pname, GLuint index, GLfloat *val);
458 void glSampleMaski(GLuint maskNumber, GLbitfield mask);
459 void glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint *params);
460 void glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat *params);
461 void glBindVertexBuffer(GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
462 void glVertexAttribFormat(GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
463 void glVertexAttribIFormat(GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
464 void glVertexAttribBinding(GLuint attribindex, GLuint bindingindex);
465 void glVertexBindingDivisor(GLuint bindingindex, GLuint divisor);
466
467 // GLES 3.2
468 void glBlendBarrier(void);
469 void glCopyImageSubData(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);
470 void glDebugMessageControl(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
471 void glDebugMessageInsert(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
472 void glDebugMessageCallback(GLDEBUGPROC callback, const void *userParam);
473 GLuint glGetDebugMessageLog(GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
474 void glPushDebugGroup(GLenum source, GLuint id, GLsizei length, const GLchar *message);
475 void glPopDebugGroup(void);
476 void glObjectLabel(GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
477 void glGetObjectLabel(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
478 void glObjectPtrLabel(const void *ptr, GLsizei length, const GLchar *label);
479 void glGetObjectPtrLabel(const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
480 void glGetPointerv(GLenum pname, void **params);
481 void glEnablei(GLenum target, GLuint index);
482 void glDisablei(GLenum target, GLuint index);
483 void glBlendEquationi(GLuint buf, GLenum mode);
484 void glBlendEquationSeparatei(GLuint buf, GLenum modeRGB, GLenum modeAlpha);
485 void glBlendFunci(GLuint buf, GLenum src, GLenum dst);
486 void glBlendFuncSeparatei(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
487 void glColorMaski(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
488 GLboolean glIsEnabledi(GLenum target, GLuint index);
489 void glDrawElementsBaseVertex(GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex);
490 void glDrawRangeElementsBaseVertex(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex);
491 void glDrawElementsInstancedBaseVertex(GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex);
492 void glFramebufferTexture(GLenum target, GLenum attachment, GLuint texture, GLint level);
493 void glPrimitiveBoundingBox(GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW);
494 GLenum glGetGraphicsResetStatus(void);
495 void glReadnPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
496 void glGetnUniformfv(GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
497 void glGetnUniformiv(GLuint program, GLint location, GLsizei bufSize, GLint *params);
498 void glGetnUniformuiv(GLuint program, GLint location, GLsizei bufSize, GLuint *params);
499 void glMinSampleShading(GLfloat value);
500 void glPatchParameteri(GLenum pname, GLint value);
501 void glTexParameterIiv(GLenum target, GLenum pname, const GLint *params);
502 void glTexParameterIuiv(GLenum target, GLenum pname, const GLuint *params);
503 void glGetTexParameterIiv(GLenum target, GLenum pname, GLint *params);
504 void glGetTexParameterIuiv(GLenum target, GLenum pname, GLuint *params);
505 void glSamplerParameterIiv(GLuint sampler, GLenum pname, const GLint *param);
506 void glSamplerParameterIuiv(GLuint sampler, GLenum pname, const GLuint *param);
507 void glGetSamplerParameterIiv(GLuint sampler, GLenum pname, GLint *params);
508 void glGetSamplerParameterIuiv(GLuint sampler, GLenum pname, GLuint *params);
509 void glTexBuffer(GLenum target, GLenum internalformat, GLuint buffer);
510 void glTexBufferRange(GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
511 void glTexStorage3DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
512
513private:
514 static bool isInitialized(const QOpenGLExtraFunctionsPrivate *d) { return d != nullptr; }
515};
516
517
518#define QT_OPENGL_DECLARE_FUNCTIONS(ret, name, args) \
519 ret (QOPENGLF_APIENTRYP name)args;
520#define QT_OPENGL_COUNT_FUNCTIONS(ret, name, args) +1
521
522#define QT_OPENGL_DECLARE(FUNCTIONS) \
523public: \
524 struct Functions { \
525 FUNCTIONS(QT_OPENGL_DECLARE_FUNCTIONS) \
526 }; \
527 union { \
528 QFunctionPointer functions[FUNCTIONS(QT_OPENGL_COUNT_FUNCTIONS)]; \
529 Functions f; \
530 }; \
531private: \
532 void init(QOpenGLContext *context);
533
534class QOpenGLExtraFunctionsPrivate : public QOpenGLFunctionsPrivate
535{
536public:
537 QOpenGLExtraFunctionsPrivate(QOpenGLContext *ctx);
538
539 // GLES3
540#define QT_OPENGL_EXTRA_FUNCTIONS(F) \
541 F(void, ReadBuffer, (GLenum mode)) \
542 F(void, DrawRangeElements, (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices)) \
543 F(void, TexImage3D, (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels)) \
544 F(void, TexSubImage3D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels)) \
545 F(void, CopyTexSubImage3D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)) \
546 F(void, CompressedTexImage3D, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data)) \
547 F(void, CompressedTexSubImage3D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data)) \
548 F(void, GenQueries, (GLsizei n, GLuint *ids)) \
549 F(void, DeleteQueries, (GLsizei n, const GLuint *ids)) \
550 F(GLboolean, IsQuery, (GLuint id)) \
551 F(void, BeginQuery, (GLenum target, GLuint id)) \
552 F(void, EndQuery, (GLenum target)) \
553 F(void, GetQueryiv, (GLenum target, GLenum pname, GLint *params)) \
554 F(void, GetQueryObjectuiv, (GLuint id, GLenum pname, GLuint *params)) \
555 F(GLboolean, UnmapBuffer, (GLenum target)) \
556 F(void, GetBufferPointerv, (GLenum target, GLenum pname, void **params)) \
557 F(void, DrawBuffers, (GLsizei n, const GLenum *bufs)) \
558 F(void, UniformMatrix2x3fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
559 F(void, UniformMatrix3x2fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
560 F(void, UniformMatrix2x4fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
561 F(void, UniformMatrix4x2fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
562 F(void, UniformMatrix3x4fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
563 F(void, UniformMatrix4x3fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
564 F(void, BlitFramebuffer, (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)) \
565 F(void, RenderbufferStorageMultisample, (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)) \
566 F(void, FramebufferTextureLayer, (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer)) \
567 F(void *,MapBufferRange, (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access)) \
568 F(void, FlushMappedBufferRange, (GLenum target, GLintptr offset, GLsizeiptr length)) \
569 F(void, BindVertexArray, (GLuint array)) \
570 F(void, DeleteVertexArrays, (GLsizei n, const GLuint *arrays)) \
571 F(void, GenVertexArrays, (GLsizei n, GLuint *arrays)) \
572 F(GLboolean, IsVertexArray, (GLuint array)) \
573 F(void, GetIntegeri_v, (GLenum target, GLuint index, GLint *data)) \
574 F(void, BeginTransformFeedback, (GLenum primitiveMode)) \
575 F(void, EndTransformFeedback, (void)) \
576 F(void, BindBufferRange, (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size)) \
577 F(void, BindBufferBase, (GLenum target, GLuint index, GLuint buffer)) \
578 F(void, TransformFeedbackVaryings, (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode)) \
579 F(void, GetTransformFeedbackVarying, (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name)) \
580 F(void, VertexAttribIPointer, (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer)) \
581 F(void, GetVertexAttribIiv, (GLuint index, GLenum pname, GLint *params)) \
582 F(void, GetVertexAttribIuiv, (GLuint index, GLenum pname, GLuint *params)) \
583 F(void, VertexAttribI4i, (GLuint index, GLint x, GLint y, GLint z, GLint w)) \
584 F(void, VertexAttribI4ui, (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w)) \
585 F(void, VertexAttribI4iv, (GLuint index, const GLint *v)) \
586 F(void, VertexAttribI4uiv, (GLuint index, const GLuint *v)) \
587 F(void, GetUniformuiv, (GLuint program, GLint location, GLuint *params)) \
588 F(GLint, GetFragDataLocation, (GLuint program, const GLchar *name)) \
589 F(void, Uniform1ui, (GLint location, GLuint v0)) \
590 F(void, Uniform2ui, (GLint location, GLuint v0, GLuint v1)) \
591 F(void, Uniform3ui, (GLint location, GLuint v0, GLuint v1, GLuint v2)) \
592 F(void, Uniform4ui, (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3)) \
593 F(void, Uniform1uiv, (GLint location, GLsizei count, const GLuint *value)) \
594 F(void, Uniform2uiv, (GLint location, GLsizei count, const GLuint *value)) \
595 F(void, Uniform3uiv, (GLint location, GLsizei count, const GLuint *value)) \
596 F(void, Uniform4uiv, (GLint location, GLsizei count, const GLuint *value)) \
597 F(void, ClearBufferiv, (GLenum buffer, GLint drawbuffer, const GLint *value)) \
598 F(void, ClearBufferuiv, (GLenum buffer, GLint drawbuffer, const GLuint *value)) \
599 F(void, ClearBufferfv, (GLenum buffer, GLint drawbuffer, const GLfloat *value)) \
600 F(void, ClearBufferfi, (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil)) \
601 F(const GLubyte *, GetStringi, (GLenum name, GLuint index)) \
602 F(void, CopyBufferSubData, (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size)) \
603 F(void, GetUniformIndices, (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices)) \
604 F(void, GetActiveUniformsiv, (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params)) \
605 F(GLuint, GetUniformBlockIndex, (GLuint program, const GLchar *uniformBlockName)) \
606 F(void, GetActiveUniformBlockiv, (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params)) \
607 F(void, GetActiveUniformBlockName, (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName)) \
608 F(void, UniformBlockBinding, (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding)) \
609 F(void, DrawArraysInstanced, (GLenum mode, GLint first, GLsizei count, GLsizei instancecount)) \
610 F(void, DrawElementsInstanced, (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount)) \
611 F(GLsync, FenceSync, (GLenum condition, GLbitfield flags)) \
612 F(GLboolean, IsSync, (GLsync sync)) \
613 F(void, DeleteSync, (GLsync sync)) \
614 F(GLenum, ClientWaitSync, (GLsync sync, GLbitfield flags, GLuint64 timeout)) \
615 F(void, WaitSync, (GLsync sync, GLbitfield flags, GLuint64 timeout)) \
616 F(void, GetInteger64v, (GLenum pname, GLint64 *data)) \
617 F(void, GetSynciv, (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values)) \
618 F(void, GetInteger64i_v, (GLenum target, GLuint index, GLint64 *data)) \
619 F(void, GetBufferParameteri64v, (GLenum target, GLenum pname, GLint64 *params)) \
620 F(void, GenSamplers, (GLsizei count, GLuint *samplers)) \
621 F(void, DeleteSamplers, (GLsizei count, const GLuint *samplers)) \
622 F(GLboolean, IsSampler, (GLuint sampler)) \
623 F(void, BindSampler, (GLuint unit, GLuint sampler)) \
624 F(void, SamplerParameteri, (GLuint sampler, GLenum pname, GLint param)) \
625 F(void, SamplerParameteriv, (GLuint sampler, GLenum pname, const GLint *param)) \
626 F(void, SamplerParameterf, (GLuint sampler, GLenum pname, GLfloat param)) \
627 F(void, SamplerParameterfv, (GLuint sampler, GLenum pname, const GLfloat *param)) \
628 F(void, GetSamplerParameteriv, (GLuint sampler, GLenum pname, GLint *params)) \
629 F(void, GetSamplerParameterfv, (GLuint sampler, GLenum pname, GLfloat *params)) \
630 F(void, VertexAttribDivisor, (GLuint index, GLuint divisor)) \
631 F(void, BindTransformFeedback, (GLenum target, GLuint id)) \
632 F(void, DeleteTransformFeedbacks, (GLsizei n, const GLuint *ids)) \
633 F(void, GenTransformFeedbacks, (GLsizei n, GLuint *ids)) \
634 F(GLboolean, IsTransformFeedback, (GLuint id)) \
635 F(void, PauseTransformFeedback, (void)) \
636 F(void, ResumeTransformFeedback, (void)) \
637 F(void, GetProgramBinary, (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary)) \
638 F(void, ProgramBinary, (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length)) \
639 F(void, ProgramParameteri, (GLuint program, GLenum pname, GLint value)) \
640 F(void, InvalidateFramebuffer, (GLenum target, GLsizei numAttachments, const GLenum *attachments)) \
641 F(void, InvalidateSubFramebuffer, (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height)) \
642 F(void, TexStorage2D, (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height)) \
643 F(void, TexStorage3D, (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth)) \
644 F(void, GetInternalformativ, (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params)) \
645 F(void, DispatchCompute, (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z)) \
646 F(void, DispatchComputeIndirect, (GLintptr indirect)) \
647 F(void, DrawArraysIndirect, (GLenum mode, const void *indirect)) \
648 F(void, DrawElementsIndirect, (GLenum mode, GLenum type, const void *indirect)) \
649 F(void, FramebufferParameteri, (GLenum target, GLenum pname, GLint param)) \
650 F(void, GetFramebufferParameteriv, (GLenum target, GLenum pname, GLint *params)) \
651 F(void, GetProgramInterfaceiv, (GLuint program, GLenum programInterface, GLenum pname, GLint *params)) \
652 F(GLuint, GetProgramResourceIndex, (GLuint program, GLenum programInterface, const GLchar *name)) \
653 F(void, GetProgramResourceName, (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name)) \
654 F(void, GetProgramResourceiv, (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params)) \
655 F(GLint, GetProgramResourceLocation, (GLuint program, GLenum programInterface, const GLchar *name)) \
656 F(void, UseProgramStages, (GLuint pipeline, GLbitfield stages, GLuint program)) \
657 F(void, ActiveShaderProgram, (GLuint pipeline, GLuint program)) \
658 F(GLuint, CreateShaderProgramv, (GLenum type, GLsizei count, const GLchar *const*strings)) \
659 F(void, BindProgramPipeline, (GLuint pipeline)) \
660 F(void, DeleteProgramPipelines, (GLsizei n, const GLuint *pipelines)) \
661 F(void, GenProgramPipelines, (GLsizei n, GLuint *pipelines)) \
662 F(GLboolean, IsProgramPipeline, (GLuint pipeline)) \
663 F(void, GetProgramPipelineiv, (GLuint pipeline, GLenum pname, GLint *params)) \
664 F(void, ProgramUniform1i, (GLuint program, GLint location, GLint v0)) \
665 F(void, ProgramUniform2i, (GLuint program, GLint location, GLint v0, GLint v1)) \
666 F(void, ProgramUniform3i, (GLuint program, GLint location, GLint v0, GLint v1, GLint v2)) \
667 F(void, ProgramUniform4i, (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3)) \
668 F(void, ProgramUniform1ui, (GLuint program, GLint location, GLuint v0)) \
669 F(void, ProgramUniform2ui, (GLuint program, GLint location, GLuint v0, GLuint v1)) \
670 F(void, ProgramUniform3ui, (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2)) \
671 F(void, ProgramUniform4ui, (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3)) \
672 F(void, ProgramUniform1f, (GLuint program, GLint location, GLfloat v0)) \
673 F(void, ProgramUniform2f, (GLuint program, GLint location, GLfloat v0, GLfloat v1)) \
674 F(void, ProgramUniform3f, (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2)) \
675 F(void, ProgramUniform4f, (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3)) \
676 F(void, ProgramUniform1iv, (GLuint program, GLint location, GLsizei count, const GLint *value)) \
677 F(void, ProgramUniform2iv, (GLuint program, GLint location, GLsizei count, const GLint *value)) \
678 F(void, ProgramUniform3iv, (GLuint program, GLint location, GLsizei count, const GLint *value)) \
679 F(void, ProgramUniform4iv, (GLuint program, GLint location, GLsizei count, const GLint *value)) \
680 F(void, ProgramUniform1uiv, (GLuint program, GLint location, GLsizei count, const GLuint *value)) \
681 F(void, ProgramUniform2uiv, (GLuint program, GLint location, GLsizei count, const GLuint *value)) \
682 F(void, ProgramUniform3uiv, (GLuint program, GLint location, GLsizei count, const GLuint *value)) \
683 F(void, ProgramUniform4uiv, (GLuint program, GLint location, GLsizei count, const GLuint *value)) \
684 F(void, ProgramUniform1fv, (GLuint program, GLint location, GLsizei count, const GLfloat *value)) \
685 F(void, ProgramUniform2fv, (GLuint program, GLint location, GLsizei count, const GLfloat *value)) \
686 F(void, ProgramUniform3fv, (GLuint program, GLint location, GLsizei count, const GLfloat *value)) \
687 F(void, ProgramUniform4fv, (GLuint program, GLint location, GLsizei count, const GLfloat *value)) \
688 F(void, ProgramUniformMatrix2fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
689 F(void, ProgramUniformMatrix3fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
690 F(void, ProgramUniformMatrix4fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
691 F(void, ProgramUniformMatrix2x3fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
692 F(void, ProgramUniformMatrix3x2fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
693 F(void, ProgramUniformMatrix2x4fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
694 F(void, ProgramUniformMatrix4x2fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
695 F(void, ProgramUniformMatrix3x4fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
696 F(void, ProgramUniformMatrix4x3fv, (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)) \
697 F(void, ValidateProgramPipeline, (GLuint pipeline)) \
698 F(void, GetProgramPipelineInfoLog, (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog)) \
699 F(void, BindImageTexture, (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format)) \
700 F(void, GetBooleani_v, (GLenum target, GLuint index, GLboolean *data)) \
701 F(void, MemoryBarrier, (GLbitfield barriers)) \
702 F(void, MemoryBarrierByRegion, (GLbitfield barriers)) \
703 F(void, TexStorage2DMultisample, (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations)) \
704 F(void, GetMultisamplefv, (GLenum pname, GLuint index, GLfloat *val)) \
705 F(void, SampleMaski, (GLuint maskNumber, GLbitfield mask)) \
706 F(void, GetTexLevelParameteriv, (GLenum target, GLint level, GLenum pname, GLint *params)) \
707 F(void, GetTexLevelParameterfv, (GLenum target, GLint level, GLenum pname, GLfloat *params)) \
708 F(void, BindVertexBuffer, (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride)) \
709 F(void, VertexAttribFormat, (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset)) \
710 F(void, VertexAttribIFormat, (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset)) \
711 F(void, VertexAttribBinding, (GLuint attribindex, GLuint bindingindex)) \
712 F(void, VertexBindingDivisor, (GLuint bindingindex, GLuint divisor)) \
713 F(void, BlendBarrier, (void)) \
714 F(void, BlendEquationSeparatei, (GLuint buf, GLenum modeRGB, GLenum modeAlpha)) \
715 F(void, BlendEquationi, (GLuint buf, GLenum mode)) \
716 F(void, BlendFuncSeparatei, (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)) \
717 F(void, BlendFunci, (GLuint buf, GLenum src, GLenum dst)) \
718 F(void, ColorMaski, (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a)) \
719 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)) \
720 F(void, DebugMessageCallback, (GLDEBUGPROC callback, const void * userParam)) \
721 F(void, DebugMessageControl, (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint * ids, GLboolean enabled)) \
722 F(void, DebugMessageInsert, (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar * buf)) \
723 F(void, Disablei, (GLenum target, GLuint index)) \
724 F(void, DrawElementsBaseVertex, (GLenum mode, GLsizei count, GLenum type, const void * indices, GLint basevertex)) \
725 F(void, DrawElementsInstancedBaseVertex, (GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei instancecount, GLint basevertex)) \
726 F(void, DrawRangeElementsBaseVertex, (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void * indices, GLint basevertex)) \
727 F(void, Enablei, (GLenum target, GLuint index)) \
728 F(void, FramebufferTexture, (GLenum target, GLenum attachment, GLuint texture, GLint level)) \
729 F(GLuint, GetDebugMessageLog, (GLuint count, GLsizei bufSize, GLenum* sources, GLenum* types, GLuint* ids, GLenum* severities, GLsizei* lengths, GLchar* messageLog)) \
730 F(GLenum, GetGraphicsResetStatus, (void)) \
731 F(void, GetObjectLabel, (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei* length, GLchar* label)) \
732 F(void, GetObjectPtrLabel, (const void * ptr, GLsizei bufSize, GLsizei* length, GLchar* label)) \
733 F(void, GetPointerv, (GLenum pname, void ** params)) \
734 F(void, GetSamplerParameterIiv, (GLuint sampler, GLenum pname, GLint* params)) \
735 F(void, GetSamplerParameterIuiv, (GLuint sampler, GLenum pname, GLuint* params)) \
736 F(void, GetTexParameterIiv, (GLenum target, GLenum pname, GLint* params)) \
737 F(void, GetTexParameterIuiv, (GLenum target, GLenum pname, GLuint* params)) \
738 F(void, GetnUniformfv, (GLuint program, GLint location, GLsizei bufSize, GLfloat* params)) \
739 F(void, GetnUniformiv, (GLuint program, GLint location, GLsizei bufSize, GLint* params)) \
740 F(void, GetnUniformuiv, (GLuint program, GLint location, GLsizei bufSize, GLuint* params)) \
741 F(GLboolean, IsEnabledi, (GLenum target, GLuint index)) \
742 F(void, MinSampleShading, (GLfloat value)) \
743 F(void, ObjectLabel, (GLenum identifier, GLuint name, GLsizei length, const GLchar * label)) \
744 F(void, ObjectPtrLabel, (const void * ptr, GLsizei length, const GLchar * label)) \
745 F(void, PatchParameteri, (GLenum pname, GLint value)) \
746 F(void, PopDebugGroup, (void)) \
747 F(void, PrimitiveBoundingBox, (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW)) \
748 F(void, PushDebugGroup, (GLenum source, GLuint id, GLsizei length, const GLchar * message)) \
749 F(void, ReadnPixels, (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void * data)) \
750 F(void, SamplerParameterIiv, (GLuint sampler, GLenum pname, const GLint * param)) \
751 F(void, SamplerParameterIuiv, (GLuint sampler, GLenum pname, const GLuint * param)) \
752 F(void, TexBuffer, (GLenum target, GLenum internalformat, GLuint buffer)) \
753 F(void, TexBufferRange, (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size)) \
754 F(void, TexParameterIiv, (GLenum target, GLenum pname, const GLint * params)) \
755 F(void, TexParameterIuiv, (GLenum target, GLenum pname, const GLuint * params)) \
756 F(void, TexStorage3DMultisample, (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations)) \
757
758 QT_OPENGL_DECLARE(QT_OPENGL_EXTRA_FUNCTIONS)
759};
760
761// GLES 3.0 and 3.1
762
763inline void QOpenGLExtraFunctions::glBeginQuery(GLenum target, GLuint id)
764{
765 Q_D(QOpenGLExtraFunctions);
766 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
767 d->f.BeginQuery(target, id);
768 Q_OPENGL_FUNCTIONS_DEBUG
769}
770
771inline void QOpenGLExtraFunctions::glBeginTransformFeedback(GLenum primitiveMode)
772{
773 Q_D(QOpenGLExtraFunctions);
774 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
775 d->f.BeginTransformFeedback(primitiveMode);
776 Q_OPENGL_FUNCTIONS_DEBUG
777}
778
779inline void QOpenGLExtraFunctions::glBindBufferBase(GLenum target, GLuint index, GLuint buffer)
780{
781 Q_D(QOpenGLExtraFunctions);
782 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
783 d->f.BindBufferBase(target, index, buffer);
784 Q_OPENGL_FUNCTIONS_DEBUG
785}
786
787inline void QOpenGLExtraFunctions::glBindBufferRange(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size)
788{
789 Q_D(QOpenGLExtraFunctions);
790 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
791 d->f.BindBufferRange(target, index, buffer, offset, size);
792 Q_OPENGL_FUNCTIONS_DEBUG
793}
794
795inline void QOpenGLExtraFunctions::glBindSampler(GLuint unit, GLuint sampler)
796{
797 Q_D(QOpenGLExtraFunctions);
798 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
799 d->f.BindSampler(unit, sampler);
800 Q_OPENGL_FUNCTIONS_DEBUG
801}
802
803inline void QOpenGLExtraFunctions::glBindTransformFeedback(GLenum target, GLuint id)
804{
805 Q_D(QOpenGLExtraFunctions);
806 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
807 d->f.BindTransformFeedback(target, id);
808 Q_OPENGL_FUNCTIONS_DEBUG
809}
810
811inline void QOpenGLExtraFunctions::glBindVertexArray(GLuint array)
812{
813 Q_D(QOpenGLExtraFunctions);
814 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
815 d->f.BindVertexArray(array);
816 Q_OPENGL_FUNCTIONS_DEBUG
817}
818
819inline void QOpenGLExtraFunctions::glBlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter)
820{
821 Q_D(QOpenGLExtraFunctions);
822 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
823 d->f.BlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
824 Q_OPENGL_FUNCTIONS_DEBUG
825}
826
827inline void QOpenGLExtraFunctions::glClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil)
828{
829 Q_D(QOpenGLExtraFunctions);
830 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
831 d->f.ClearBufferfi(buffer, drawbuffer, depth, stencil);
832 Q_OPENGL_FUNCTIONS_DEBUG
833}
834
835inline void QOpenGLExtraFunctions::glClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat * value)
836{
837 Q_D(QOpenGLExtraFunctions);
838 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
839 d->f.ClearBufferfv(buffer, drawbuffer, value);
840 Q_OPENGL_FUNCTIONS_DEBUG
841}
842
843inline void QOpenGLExtraFunctions::glClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint * value)
844{
845 Q_D(QOpenGLExtraFunctions);
846 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
847 d->f.ClearBufferiv(buffer, drawbuffer, value);
848 Q_OPENGL_FUNCTIONS_DEBUG
849}
850
851inline void QOpenGLExtraFunctions::glClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint * value)
852{
853 Q_D(QOpenGLExtraFunctions);
854 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
855 d->f.ClearBufferuiv(buffer, drawbuffer, value);
856 Q_OPENGL_FUNCTIONS_DEBUG
857}
858
859inline GLenum QOpenGLExtraFunctions::glClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout)
860{
861 Q_D(QOpenGLExtraFunctions);
862 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
863 GLenum result = d->f.ClientWaitSync(sync, flags, timeout);
864 Q_OPENGL_FUNCTIONS_DEBUG
865 return result;
866}
867
868inline void QOpenGLExtraFunctions::glCompressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void * data)
869{
870 Q_D(QOpenGLExtraFunctions);
871 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
872 d->f.CompressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, data);
873 Q_OPENGL_FUNCTIONS_DEBUG
874}
875
876inline void QOpenGLExtraFunctions::glCompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void * data)
877{
878 Q_D(QOpenGLExtraFunctions);
879 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
880 d->f.CompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data);
881 Q_OPENGL_FUNCTIONS_DEBUG
882}
883
884inline void QOpenGLExtraFunctions::glCopyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size)
885{
886 Q_D(QOpenGLExtraFunctions);
887 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
888 d->f.CopyBufferSubData(readTarget, writeTarget, readOffset, writeOffset, size);
889 Q_OPENGL_FUNCTIONS_DEBUG
890}
891
892inline void QOpenGLExtraFunctions::glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height)
893{
894 Q_D(QOpenGLExtraFunctions);
895 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
896 d->f.CopyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, height);
897 Q_OPENGL_FUNCTIONS_DEBUG
898}
899
900inline void QOpenGLExtraFunctions::glDeleteQueries(GLsizei n, const GLuint * ids)
901{
902 Q_D(QOpenGLExtraFunctions);
903 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
904 d->f.DeleteQueries(n, ids);
905 Q_OPENGL_FUNCTIONS_DEBUG
906}
907
908inline void QOpenGLExtraFunctions::glDeleteSamplers(GLsizei count, const GLuint * samplers)
909{
910 Q_D(QOpenGLExtraFunctions);
911 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
912 d->f.DeleteSamplers(count, samplers);
913 Q_OPENGL_FUNCTIONS_DEBUG
914}
915
916inline void QOpenGLExtraFunctions::glDeleteSync(GLsync sync)
917{
918 Q_D(QOpenGLExtraFunctions);
919 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
920 d->f.DeleteSync(sync);
921 Q_OPENGL_FUNCTIONS_DEBUG
922}
923
924inline void QOpenGLExtraFunctions::glDeleteTransformFeedbacks(GLsizei n, const GLuint * ids)
925{
926 Q_D(QOpenGLExtraFunctions);
927 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
928 d->f.DeleteTransformFeedbacks(n, ids);
929 Q_OPENGL_FUNCTIONS_DEBUG
930}
931
932inline void QOpenGLExtraFunctions::glDeleteVertexArrays(GLsizei n, const GLuint * arrays)
933{
934 Q_D(QOpenGLExtraFunctions);
935 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
936 d->f.DeleteVertexArrays(n, arrays);
937 Q_OPENGL_FUNCTIONS_DEBUG
938}
939
940inline void QOpenGLExtraFunctions::glDrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instancecount)
941{
942 Q_D(QOpenGLExtraFunctions);
943 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
944 d->f.DrawArraysInstanced(mode, first, count, instancecount);
945 Q_OPENGL_FUNCTIONS_DEBUG
946}
947
948inline void QOpenGLExtraFunctions::glDrawBuffers(GLsizei n, const GLenum * bufs)
949{
950 Q_D(QOpenGLExtraFunctions);
951 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
952 d->f.DrawBuffers(n, bufs);
953 Q_OPENGL_FUNCTIONS_DEBUG
954}
955
956inline void QOpenGLExtraFunctions::glDrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei instancecount)
957{
958 Q_D(QOpenGLExtraFunctions);
959 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
960 d->f.DrawElementsInstanced(mode, count, type, indices, instancecount);
961 Q_OPENGL_FUNCTIONS_DEBUG
962}
963
964inline void QOpenGLExtraFunctions::glDrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void * indices)
965{
966 Q_D(QOpenGLExtraFunctions);
967 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
968 d->f.DrawRangeElements(mode, start, end, count, type, indices);
969 Q_OPENGL_FUNCTIONS_DEBUG
970}
971
972inline void QOpenGLExtraFunctions::glEndQuery(GLenum target)
973{
974 Q_D(QOpenGLExtraFunctions);
975 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
976 d->f.EndQuery(target);
977 Q_OPENGL_FUNCTIONS_DEBUG
978}
979
980inline void QOpenGLExtraFunctions::glEndTransformFeedback()
981{
982 Q_D(QOpenGLExtraFunctions);
983 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
984 d->f.EndTransformFeedback();
985 Q_OPENGL_FUNCTIONS_DEBUG
986}
987
988inline GLsync QOpenGLExtraFunctions::glFenceSync(GLenum condition, GLbitfield flags)
989{
990 Q_D(QOpenGLExtraFunctions);
991 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
992 GLsync result = d->f.FenceSync(condition, flags);
993 Q_OPENGL_FUNCTIONS_DEBUG
994 return result;
995}
996
997inline void QOpenGLExtraFunctions::glFlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length)
998{
999 Q_D(QOpenGLExtraFunctions);
1000 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
1001 d->f.FlushMappedBufferRange(target, offset, length);
1002 Q_OPENGL_FUNCTIONS_DEBUG
1003}
1004
1005inline void QOpenGLExtraFunctions::glFramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer)
1006{
1007 Q_D(QOpenGLExtraFunctions);
1008 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
1009 d->f.FramebufferTextureLayer(target, attachment, texture, level, layer);
1010 Q_OPENGL_FUNCTIONS_DEBUG
1011}
1012
1013inline void QOpenGLExtraFunctions::glGenQueries(GLsizei n, GLuint* ids)
1014{
1015 Q_D(QOpenGLExtraFunctions);
1016 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
1017 d->f.GenQueries(n, ids);
1018 Q_OPENGL_FUNCTIONS_DEBUG
1019}
1020
1021inline void QOpenGLExtraFunctions::glGenSamplers(GLsizei count, GLuint* samplers)
1022{
1023 Q_D(QOpenGLExtraFunctions);
1024 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
1025 d->f.GenSamplers(count, samplers);
1026 Q_OPENGL_FUNCTIONS_DEBUG
1027}
1028
1029inline void QOpenGLExtraFunctions::glGenTransformFeedbacks(GLsizei n, GLuint* ids)
1030{
1031 Q_D(QOpenGLExtraFunctions);
1032 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
1033 d->f.GenTransformFeedbacks(n, ids);
1034 Q_OPENGL_FUNCTIONS_DEBUG
1035}
1036
1037inline void QOpenGLExtraFunctions::glGenVertexArrays(GLsizei n, GLuint* arrays)
1038{
1039 Q_D(QOpenGLExtraFunctions);
1040 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
1041 d->f.GenVertexArrays(n, arrays);
1042 Q_OPENGL_FUNCTIONS_DEBUG
1043}
1044
1045inline void QOpenGLExtraFunctions::glGetActiveUniformBlockName(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei* length, GLchar* uniformBlockName)
1046{
1047 Q_D(QOpenGLExtraFunctions);
1048 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
1049 d->f.GetActiveUniformBlockName(program, uniformBlockIndex, bufSize, length, uniformBlockName);
1050 Q_OPENGL_FUNCTIONS_DEBUG
1051}
1052
1053inline void QOpenGLExtraFunctions::glGetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint* params)
1054{
1055 Q_D(QOpenGLExtraFunctions);
1056 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
1057 d->f.GetActiveUniformBlockiv(program, uniformBlockIndex, pname, params);
1058 Q_OPENGL_FUNCTIONS_DEBUG
1059}
1060
1061inline void QOpenGLExtraFunctions::glGetActiveUniformsiv(GLuint program, GLsizei uniformCount, const GLuint * uniformIndices, GLenum pname, GLint* params)
1062{
1063 Q_D(QOpenGLExtraFunctions);
1064 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
1065 d->f.GetActiveUniformsiv(program, uniformCount, uniformIndices, pname, params);
1066 Q_OPENGL_FUNCTIONS_DEBUG
1067}
1068
1069inline void QOpenGLExtraFunctions::glGetBufferParameteri64v(GLenum target, GLenum pname, GLint64* params)
1070{
1071 Q_D(QOpenGLExtraFunctions);
1072 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
1073 d->f.GetBufferParameteri64v(target, pname, params);
1074 Q_OPENGL_FUNCTIONS_DEBUG
1075}
1076
1077inline void QOpenGLExtraFunctions::glGetBufferPointerv(GLenum target, GLenum pname, void ** params)
1078{
1079 Q_D(QOpenGLExtraFunctions);
1080 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
1081 d->f.GetBufferPointerv(target, pname, params);
1082 Q_OPENGL_FUNCTIONS_DEBUG
1083}
1084
1085inline GLint QOpenGLExtraFunctions::glGetFragDataLocation(GLuint program, const GLchar * name)
1086{
1087 Q_D(QOpenGLExtraFunctions);
1088 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
1089 GLint result = d->f.GetFragDataLocation(program, name);
1090 Q_OPENGL_FUNCTIONS_DEBUG
1091 return result;
1092}
1093
1094inline void QOpenGLExtraFunctions::glGetInteger64i_v(GLenum target, GLuint index, GLint64* data)
1095{
1096 Q_D(QOpenGLExtraFunctions);
1097 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
1098 d->f.GetInteger64i_v(target, index, data);
1099 Q_OPENGL_FUNCTIONS_DEBUG
1100}
1101
1102inline void QOpenGLExtraFunctions::glGetInteger64v(GLenum pname, GLint64* data)
1103{
1104 Q_D(QOpenGLExtraFunctions);
1105 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
1106 d->f.GetInteger64v(pname, data);
1107 Q_OPENGL_FUNCTIONS_DEBUG
1108}
1109
1110inline void QOpenGLExtraFunctions::glGetIntegeri_v(GLenum target, GLuint index, GLint* data)
1111{
1112 Q_D(QOpenGLExtraFunctions);
1113 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
1114 d->f.GetIntegeri_v(target, index, data);
1115 Q_OPENGL_FUNCTIONS_DEBUG
1116}
1117
1118inline void QOpenGLExtraFunctions::glGetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint* params)
1119{
1120 Q_D(QOpenGLExtraFunctions);
1121 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
1122 d->f.GetInternalformativ(target, internalformat, pname, bufSize, params);
1123 Q_OPENGL_FUNCTIONS_DEBUG
1124}
1125
1126inline void QOpenGLExtraFunctions::glGetProgramBinary(GLuint program, GLsizei bufSize, GLsizei* length, GLenum* binaryFormat, void * binary)
1127{
1128 Q_D(QOpenGLExtraFunctions);
1129 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
1130 d->f.GetProgramBinary(program, bufSize, length, binaryFormat, binary);
1131 Q_OPENGL_FUNCTIONS_DEBUG
1132}
1133
1134inline void QOpenGLExtraFunctions::glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint* params)
1135{
1136 Q_D(QOpenGLExtraFunctions);
1137 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
1138 d->f.GetQueryObjectuiv(id, pname, params);
1139 Q_OPENGL_FUNCTIONS_DEBUG
1140}
1141
1142inline void QOpenGLExtraFunctions::glGetQueryiv(GLenum target, GLenum pname, GLint* params)
1143{
1144 Q_D(QOpenGLExtraFunctions);
1145 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
1146 d->f.GetQueryiv(target, pname, params);
1147 Q_OPENGL_FUNCTIONS_DEBUG
1148}
1149
1150inline void QOpenGLExtraFunctions::glGetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat* params)
1151{
1152 Q_D(QOpenGLExtraFunctions);
1153 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
1154 d->f.GetSamplerParameterfv(sampler, pname, params);
1155 Q_OPENGL_FUNCTIONS_DEBUG
1156}
1157
1158inline void QOpenGLExtraFunctions::glGetSamplerParameteriv(GLuint sampler, GLenum pname, GLint* params)
1159{
1160 Q_D(QOpenGLExtraFunctions);
1161 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
1162 d->f.GetSamplerParameteriv(sampler, pname, params);
1163 Q_OPENGL_FUNCTIONS_DEBUG
1164}
1165
1166inline const GLubyte * QOpenGLExtraFunctions::glGetStringi(GLenum name, GLuint index)
1167{
1168 Q_D(QOpenGLExtraFunctions);
1169 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
1170 const GLubyte * result = d->f.GetStringi(name, index);
1171 Q_OPENGL_FUNCTIONS_DEBUG
1172 return result;
1173}
1174
1175inline void QOpenGLExtraFunctions::glGetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei* length, GLint* values)
1176{
1177 Q_D(QOpenGLExtraFunctions);
1178 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
1179 d->f.GetSynciv(sync, pname, bufSize, length, values);
1180 Q_OPENGL_FUNCTIONS_DEBUG
1181}
1182
1183inline void QOpenGLExtraFunctions::glGetTransformFeedbackVarying(GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLsizei* size, GLenum* type, GLchar* name)
1184{
1185 Q_D(QOpenGLExtraFunctions);
1186 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
1187 d->f.GetTransformFeedbackVarying(program, index, bufSize, length, size, type, name);
1188 Q_OPENGL_FUNCTIONS_DEBUG
1189}
1190
1191inline GLuint QOpenGLExtraFunctions::glGetUniformBlockIndex(GLuint program, const GLchar * uniformBlockName)
1192{
1193 Q_D(QOpenGLExtraFunctions);
1194 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
1195 GLuint result = d->f.GetUniformBlockIndex(program, uniformBlockName);
1196 Q_OPENGL_FUNCTIONS_DEBUG
1197 return result;
1198}
1199
1200inline void QOpenGLExtraFunctions::glGetUniformIndices(GLuint program, GLsizei uniformCount, const GLchar *const* uniformNames, GLuint* uniformIndices)
1201{
1202 Q_D(QOpenGLExtraFunctions);
1203 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
1204 d->f.GetUniformIndices(program, uniformCount, uniformNames, uniformIndices);
1205 Q_OPENGL_FUNCTIONS_DEBUG
1206}
1207
1208inline void QOpenGLExtraFunctions::glGetUniformuiv(GLuint program, GLint location, GLuint* params)
1209{
1210 Q_D(QOpenGLExtraFunctions);
1211 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
1212 d->f.GetUniformuiv(program, location, params);
1213 Q_OPENGL_FUNCTIONS_DEBUG
1214}
1215
1216inline void QOpenGLExtraFunctions::glGetVertexAttribIiv(GLuint index, GLenum pname, GLint* params)
1217{
1218 Q_D(QOpenGLExtraFunctions);
1219 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
1220 d->f.GetVertexAttribIiv(index, pname, params);
1221 Q_OPENGL_FUNCTIONS_DEBUG
1222}
1223
1224inline void QOpenGLExtraFunctions::glGetVertexAttribIuiv(GLuint index, GLenum pname, GLuint* params)
1225{
1226 Q_D(QOpenGLExtraFunctions);
1227 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
1228 d->f.GetVertexAttribIuiv(index, pname, params);
1229 Q_OPENGL_FUNCTIONS_DEBUG
1230}
1231
1232inline void QOpenGLExtraFunctions::glInvalidateFramebuffer(GLenum target, GLsizei numAttachments, const GLenum * attachments)
1233{
1234 Q_D(QOpenGLExtraFunctions);
1235 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
1236 d->f.InvalidateFramebuffer(target, numAttachments, attachments);
1237 Q_OPENGL_FUNCTIONS_DEBUG
1238}
1239
1240inline void QOpenGLExtraFunctions::glInvalidateSubFramebuffer(GLenum target, GLsizei numAttachments, const GLenum * attachments, GLint x, GLint y, GLsizei width, GLsizei height)
1241{
1242 Q_D(QOpenGLExtraFunctions);
1243 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
1244 d->f.InvalidateSubFramebuffer(target, numAttachments, attachments, x, y, width, height);
1245 Q_OPENGL_FUNCTIONS_DEBUG
1246}
1247
1248inline GLboolean QOpenGLExtraFunctions::glIsQuery(GLuint id)
1249{
1250 Q_D(QOpenGLExtraFunctions);
1251 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
1252 GLboolean result = d->f.IsQuery(id);
1253 Q_OPENGL_FUNCTIONS_DEBUG
1254 return result;
1255}
1256
1257inline GLboolean QOpenGLExtraFunctions::glIsSampler(GLuint sampler)
1258{
1259 Q_D(QOpenGLExtraFunctions);
1260 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
1261 GLboolean result = d->f.IsSampler(sampler);
1262 Q_OPENGL_FUNCTIONS_DEBUG
1263 return result;
1264}
1265
1266inline GLboolean QOpenGLExtraFunctions::glIsSync(GLsync sync)
1267{
1268 Q_D(QOpenGLExtraFunctions);
1269 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
1270 GLboolean result = d->f.IsSync(sync);
1271 Q_OPENGL_FUNCTIONS_DEBUG
1272 return result;
1273}
1274
1275inline GLboolean QOpenGLExtraFunctions::glIsTransformFeedback(GLuint id)
1276{
1277 Q_D(QOpenGLExtraFunctions);
1278 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
1279 GLboolean result = d->f.IsTransformFeedback(id);
1280 Q_OPENGL_FUNCTIONS_DEBUG
1281 return result;
1282}
1283
1284inline GLboolean QOpenGLExtraFunctions::glIsVertexArray(GLuint array)
1285{
1286 Q_D(QOpenGLExtraFunctions);
1287 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
1288 GLboolean result = d->f.IsVertexArray(array);
1289 Q_OPENGL_FUNCTIONS_DEBUG
1290 return result;
1291}
1292
1293inline void * QOpenGLExtraFunctions::glMapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access)
1294{
1295 Q_D(QOpenGLExtraFunctions);
1296 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
1297 void *result = d->f.MapBufferRange(target, offset, length, access);
1298 Q_OPENGL_FUNCTIONS_DEBUG
1299 return result;
1300}
1301
1302inline void QOpenGLExtraFunctions::glPauseTransformFeedback()
1303{
1304 Q_D(QOpenGLExtraFunctions);
1305 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
1306 d->f.PauseTransformFeedback();
1307 Q_OPENGL_FUNCTIONS_DEBUG
1308}
1309
1310inline void QOpenGLExtraFunctions::glProgramBinary(GLuint program, GLenum binaryFormat, const void * binary, GLsizei length)
1311{
1312 Q_D(QOpenGLExtraFunctions);
1313 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
1314 d->f.ProgramBinary(program, binaryFormat, binary, length);
1315 Q_OPENGL_FUNCTIONS_DEBUG
1316}
1317
1318inline void QOpenGLExtraFunctions::glProgramParameteri(GLuint program, GLenum pname, GLint value)
1319{
1320 Q_D(QOpenGLExtraFunctions);
1321 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
1322 d->f.ProgramParameteri(program, pname, value);
1323 Q_OPENGL_FUNCTIONS_DEBUG
1324}
1325
1326inline void QOpenGLExtraFunctions::glReadBuffer(GLenum src)
1327{
1328 Q_D(QOpenGLExtraFunctions);
1329 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
1330 d->f.ReadBuffer(src);
1331 Q_OPENGL_FUNCTIONS_DEBUG
1332}
1333
1334inline void QOpenGLExtraFunctions::glRenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
1335{
1336 Q_D(QOpenGLExtraFunctions);
1337 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
1338 d->f.RenderbufferStorageMultisample(target, samples, internalformat, width, height);
1339 Q_OPENGL_FUNCTIONS_DEBUG
1340}
1341
1342inline void QOpenGLExtraFunctions::glResumeTransformFeedback()
1343{
1344 Q_D(QOpenGLExtraFunctions);
1345 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
1346 d->f.ResumeTransformFeedback();
1347 Q_OPENGL_FUNCTIONS_DEBUG
1348}
1349
1350inline void QOpenGLExtraFunctions::glSamplerParameterf(GLuint sampler, GLenum pname, GLfloat param)
1351{
1352 Q_D(QOpenGLExtraFunctions);
1353 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
1354 d->f.SamplerParameterf(sampler, pname, param);
1355 Q_OPENGL_FUNCTIONS_DEBUG
1356}
1357
1358inline void QOpenGLExtraFunctions::glSamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat * param)
1359{
1360 Q_D(QOpenGLExtraFunctions);
1361 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
1362 d->f.SamplerParameterfv(sampler, pname, param);
1363 Q_OPENGL_FUNCTIONS_DEBUG
1364}
1365
1366inline void QOpenGLExtraFunctions::glSamplerParameteri(GLuint sampler, GLenum pname, GLint param)
1367{
1368 Q_D(QOpenGLExtraFunctions);
1369 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
1370 d->f.SamplerParameteri(sampler, pname, param);
1371 Q_OPENGL_FUNCTIONS_DEBUG
1372}
1373
1374inline void QOpenGLExtraFunctions::glSamplerParameteriv(GLuint sampler, GLenum pname, const GLint * param)
1375{
1376 Q_D(QOpenGLExtraFunctions);
1377 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
1378 d->f.SamplerParameteriv(sampler, pname, param);
1379 Q_OPENGL_FUNCTIONS_DEBUG
1380}
1381
1382inline void QOpenGLExtraFunctions::glTexImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void * pixels)
1383{
1384 Q_D(QOpenGLExtraFunctions);
1385 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
1386 d->f.TexImage3D(target, level, internalformat, width, height, depth, border, format, type, pixels);
1387 Q_OPENGL_FUNCTIONS_DEBUG
1388}
1389
1390inline void QOpenGLExtraFunctions::glTexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height)
1391{
1392 Q_D(QOpenGLExtraFunctions);
1393 Q_ASSERT(QOpenGLExtraFunctions::isInitialized(d));
1394 d->