Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qopenglfunctions.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QOPENGLFUNCTIONS_H
5#define QOPENGLFUNCTIONS_H
6
7#include <QtGui/qtguiglobal.h>
8
9#ifndef QT_NO_OPENGL
10
11#ifdef __GLEW_H__
12#if defined(Q_CC_GNU)
13#warning qopenglfunctions.h is not compatible with GLEW, GLEW defines will be undefined
14#warning To use GLEW with Qt, do not include <qopengl.h> or <QOpenGLFunctions> after glew.h
15#endif
16#endif
17
18#include <QtGui/qopengl.h>
19#include <QtGui/qopenglcontext.h>
20
21//#define Q_ENABLE_OPENGL_FUNCTIONS_DEBUG
22
23#if QT_CONFIG(opengles2)
24typedef double GLdouble;
25#endif
26
27#ifdef Q_ENABLE_OPENGL_FUNCTIONS_DEBUG
28#include <stdio.h>
29#define Q_OPENGL_FUNCTIONS_DEBUG \
30 GLenum error = glGetError(); \
31 if (error != GL_NO_ERROR) { \
32 unsigned clamped = qMin(unsigned(error - GL_INVALID_ENUM), 4U); \
33 const char *errors[] = { "GL_INVALID_ENUM", "GL_INVALID_VALUE", "GL_INVALID_OPERATION", "Unknown" }; \
34 printf("GL error at %s:%d: %s\n", __FILE__, __LINE__, errors[clamped]); \
35 int *value = nullptr; \
36 *value = 0; \
37 }
38#else
39#define Q_OPENGL_FUNCTIONS_DEBUG
40#endif
41
43
45
46// Undefine any macros from GLEW, qopenglextensions_p.h, etc that
47// may interfere with the definition of QOpenGLFunctions.
48#undef glBindTexture
49#undef glBlendFunc
50#undef glClear
51#undef glClearColor
52#undef glClearStencil
53#undef glColorMask
54#undef glCopyTexImage2D
55#undef glCopyTexSubImage2D
56#undef glCullFace
57#undef glDeleteTextures
58#undef glDepthFunc
59#undef glDepthMask
60#undef glDisable
61#undef glDrawArrays
62#undef glDrawElements
63#undef glEnable
64#undef glFinish
65#undef glFlush
66#undef glFrontFace
67#undef glGenTextures
68#undef glGetBooleanv
69#undef glGetError
70#undef glGetFloatv
71#undef glGetIntegerv
72#undef glGetString
73#undef glGetTexParameterfv
74#undef glGetTexParameteriv
75#undef glHint
76#undef glIsEnabled
77#undef glIsTexture
78#undef glLineWidth
79#undef glPixelStorei
80#undef glPolygonOffset
81#undef glReadPixels
82#undef glScissor
83#undef glStencilFunc
84#undef glStencilMask
85#undef glStencilOp
86#undef glTexImage2D
87#undef glTexParameterf
88#undef glTexParameterfv
89#undef glTexParameteri
90#undef glTexParameteriv
91#undef glTexSubImage2D
92#undef glViewport
93
94#undef glActiveTexture
95#undef glAttachShader
96#undef glBindAttribLocation
97#undef glBindBuffer
98#undef glBindFramebuffer
99#undef glBindRenderbuffer
100#undef glBlendColor
101#undef glBlendEquation
102#undef glBlendEquationSeparate
103#undef glBlendFuncSeparate
104#undef glBufferData
105#undef glBufferSubData
106#undef glCheckFramebufferStatus
107#undef glClearDepthf
108#undef glCompileShader
109#undef glCompressedTexImage2D
110#undef glCompressedTexSubImage2D
111#undef glCreateProgram
112#undef glCreateShader
113#undef glDeleteBuffers
114#undef glDeleteFramebuffers
115#undef glDeleteProgram
116#undef glDeleteRenderbuffers
117#undef glDeleteShader
118#undef glDepthRangef
119#undef glDetachShader
120#undef glDisableVertexAttribArray
121#undef glEnableVertexAttribArray
122#undef glFramebufferRenderbuffer
123#undef glFramebufferTexture2D
124#undef glGenBuffers
125#undef glGenerateMipmap
126#undef glGenFramebuffers
127#undef glGenRenderbuffers
128#undef glGetActiveAttrib
129#undef glGetActiveUniform
130#undef glGetAttachedShaders
131#undef glGetAttribLocation
132#undef glGetBufferParameteriv
133#undef glGetFramebufferAttachmentParameteriv
134#undef glGetProgramiv
135#undef glGetProgramInfoLog
136#undef glGetRenderbufferParameteriv
137#undef glGetShaderiv
138#undef glGetShaderInfoLog
139#undef glGetShaderPrecisionFormat
140#undef glGetShaderSource
141#undef glGetUniformfv
142#undef glGetUniformiv
143#undef glGetUniformLocation
144#undef glGetVertexAttribfv
145#undef glGetVertexAttribiv
146#undef glGetVertexAttribPointerv
147#undef glIsBuffer
148#undef glIsFramebuffer
149#undef glIsProgram
150#undef glIsRenderbuffer
151#undef glIsShader
152#undef glLinkProgram
153#undef glReleaseShaderCompiler
154#undef glRenderbufferStorage
155#undef glSampleCoverage
156#undef glShaderBinary
157#undef glShaderSource
158#undef glStencilFuncSeparate
159#undef glStencilMaskSeparate
160#undef glStencilOpSeparate
161#undef glUniform1f
162#undef glUniform1fv
163#undef glUniform1i
164#undef glUniform1iv
165#undef glUniform2f
166#undef glUniform2fv
167#undef glUniform2i
168#undef glUniform2iv
169#undef glUniform3f
170#undef glUniform3fv
171#undef glUniform3i
172#undef glUniform3iv
173#undef glUniform4f
174#undef glUniform4fv
175#undef glUniform4i
176#undef glUniform4iv
177#undef glUniformMatrix2fv
178#undef glUniformMatrix3fv
179#undef glUniformMatrix4fv
180#undef glUseProgram
181#undef glValidateProgram
182#undef glVertexAttrib1f
183#undef glVertexAttrib1fv
184#undef glVertexAttrib2f
185#undef glVertexAttrib2fv
186#undef glVertexAttrib3f
187#undef glVertexAttrib3fv
188#undef glVertexAttrib4f
189#undef glVertexAttrib4fv
190#undef glVertexAttribPointer
191
192#undef glTexLevelParameteriv
193
194#if defined(Q_QDOC)
195#undef GLbitfield
196typedef unsigned int GLbitfield;
197#undef GLchar
198typedef char GLchar;
199#endif
200
201class Q_GUI_EXPORT QOpenGLFunctions
202{
203public:
207
209 {
210 Multitexture = 0x0001,
211 Shaders = 0x0002,
212 Buffers = 0x0004,
213 Framebuffers = 0x0008,
214 BlendColor = 0x0010,
215 BlendEquation = 0x0020,
216 BlendEquationSeparate = 0x0040,
217 BlendFuncSeparate = 0x0080,
218 BlendSubtract = 0x0100,
219 CompressedTextures = 0x0200,
220 Multisample = 0x0400,
221 StencilSeparate = 0x0800,
222 NPOTTextures = 0x1000,
223 NPOTTextureRepeat = 0x2000,
224 FixedFunctionPipeline = 0x4000,
225 TextureRGFormats = 0x8000,
226 MultipleRenderTargets = 0x10000,
227 BlendEquationAdvanced = 0x20000,
228 };
229 Q_DECLARE_FLAGS(OpenGLFeatures, OpenGLFeature)
230
231 QOpenGLFunctions::OpenGLFeatures openGLFeatures() const;
232 bool hasOpenGLFeature(QOpenGLFunctions::OpenGLFeature feature) const;
233
234 void initializeOpenGLFunctions();
235
236 // GLES2 + OpenGL1 common subset
237 void glBindTexture(GLenum target, GLuint texture);
238 void glBlendFunc(GLenum sfactor, GLenum dfactor);
239 void glClear(GLbitfield mask);
240 void glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
241 void glClearStencil(GLint s);
245 void glCullFace(GLenum mode);
246 void glDeleteTextures(GLsizei n, const GLuint* textures);
247 void glDepthFunc(GLenum func);
248 void glDepthMask(GLboolean flag);
249 void glDisable(GLenum cap);
250 void glDrawArrays(GLenum mode, GLint first, GLsizei count);
251 void glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices);
252 void glEnable(GLenum cap);
253 void glFinish();
254 void glFlush();
255 void glFrontFace(GLenum mode);
256 void glGenTextures(GLsizei n, GLuint* textures);
257 void glGetBooleanv(GLenum pname, GLboolean* params);
258 GLenum glGetError();
259 void glGetFloatv(GLenum pname, GLfloat* params);
260 void glGetIntegerv(GLenum pname, GLint* params);
261 const GLubyte *glGetString(GLenum name);
262 void glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params);
263 void glGetTexParameteriv(GLenum target, GLenum pname, GLint* params);
264 void glHint(GLenum target, GLenum mode);
265 GLboolean glIsEnabled(GLenum cap);
266 GLboolean glIsTexture(GLuint texture);
267 void glLineWidth(GLfloat width);
268 void glPixelStorei(GLenum pname, GLint param);
269 void glPolygonOffset(GLfloat factor, GLfloat units);
270 void glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels);
271 void glScissor(GLint x, GLint y, GLsizei width, GLsizei height);
272 void glStencilFunc(GLenum func, GLint ref, GLuint mask);
273 void glStencilMask(GLuint mask);
274 void glStencilOp(GLenum fail, GLenum zfail, GLenum zpass);
276 void glTexParameterf(GLenum target, GLenum pname, GLfloat param);
277 void glTexParameterfv(GLenum target, GLenum pname, const GLfloat* params);
278 void glTexParameteri(GLenum target, GLenum pname, GLint param);
279 void glTexParameteriv(GLenum target, GLenum pname, const GLint* params);
280 void glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels);
281 void glViewport(GLint x, GLint y, GLsizei width, GLsizei height);
282
283 // GL(ES)2
284 void glActiveTexture(GLenum texture);
285 void glAttachShader(GLuint program, GLuint shader);
286 void glBindAttribLocation(GLuint program, GLuint index, const char* name);
287 void glBindBuffer(GLenum target, GLuint buffer);
288 void glBindFramebuffer(GLenum target, GLuint framebuffer);
289 void glBindRenderbuffer(GLenum target, GLuint renderbuffer);
290 void glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
291 void glBlendEquation(GLenum mode);
292 void glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha);
293 void glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
294 void glBufferData(GLenum target, qopengl_GLsizeiptr size, const void* data, GLenum usage);
295 void glBufferSubData(GLenum target, qopengl_GLintptr offset, qopengl_GLsizeiptr size, const void* data);
296 GLenum glCheckFramebufferStatus(GLenum target);
297 void glClearDepthf(GLclampf depth);
298 void glCompileShader(GLuint shader);
299 void glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data);
300 void glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data);
301 GLuint glCreateProgram();
302 GLuint glCreateShader(GLenum type);
303 void glDeleteBuffers(GLsizei n, const GLuint* buffers);
304 void glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers);
305 void glDeleteProgram(GLuint program);
306 void glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers);
307 void glDeleteShader(GLuint shader);
308 void glDepthRangef(GLclampf zNear, GLclampf zFar);
309 void glDetachShader(GLuint program, GLuint shader);
310 void glDisableVertexAttribArray(GLuint index);
311 void glEnableVertexAttribArray(GLuint index);
312 void glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
313 void glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
314 void glGenBuffers(GLsizei n, GLuint* buffers);
315 void glGenerateMipmap(GLenum target);
316 void glGenFramebuffers(GLsizei n, GLuint* framebuffers);
317 void glGenRenderbuffers(GLsizei n, GLuint* renderbuffers);
318 void glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name);
319 void glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name);
320 void glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders);
321 GLint glGetAttribLocation(GLuint program, const char* name);
322 void glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params);
323 void glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params);
324 void glGetProgramiv(GLuint program, GLenum pname, GLint* params);
325 void glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, char* infolog);
326 void glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params);
327 void glGetShaderiv(GLuint shader, GLenum pname, GLint* params);
328 void glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog);
329 void glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision);
330 void glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, char* source);
331 void glGetUniformfv(GLuint program, GLint location, GLfloat* params);
332 void glGetUniformiv(GLuint program, GLint location, GLint* params);
333 GLint glGetUniformLocation(GLuint program, const char* name);
334 void glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params);
335 void glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params);
336 void glGetVertexAttribPointerv(GLuint index, GLenum pname, void** pointer);
337 GLboolean glIsBuffer(GLuint buffer);
338 GLboolean glIsFramebuffer(GLuint framebuffer);
339 GLboolean glIsProgram(GLuint program);
340 GLboolean glIsRenderbuffer(GLuint renderbuffer);
341 GLboolean glIsShader(GLuint shader);
342 void glLinkProgram(GLuint program);
343 void glReleaseShaderCompiler();
344 void glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
345 void glSampleCoverage(GLclampf value, GLboolean invert);
346 void glShaderBinary(GLint n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLint length);
347 void glShaderSource(GLuint shader, GLsizei count, const char** string, const GLint* length);
348 void glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask);
349 void glStencilMaskSeparate(GLenum face, GLuint mask);
350 void glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass);
351 void glUniform1f(GLint location, GLfloat x);
352 void glUniform1fv(GLint location, GLsizei count, const GLfloat* v);
353 void glUniform1i(GLint location, GLint x);
354 void glUniform1iv(GLint location, GLsizei count, const GLint* v);
355 void glUniform2f(GLint location, GLfloat x, GLfloat y);
356 void glUniform2fv(GLint location, GLsizei count, const GLfloat* v);
357 void glUniform2i(GLint location, GLint x, GLint y);
358 void glUniform2iv(GLint location, GLsizei count, const GLint* v);
359 void glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z);
360 void glUniform3fv(GLint location, GLsizei count, const GLfloat* v);
361 void glUniform3i(GLint location, GLint x, GLint y, GLint z);
362 void glUniform3iv(GLint location, GLsizei count, const GLint* v);
363 void glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
364 void glUniform4fv(GLint location, GLsizei count, const GLfloat* v);
365 void glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w);
366 void glUniform4iv(GLint location, GLsizei count, const GLint* v);
367 void glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
368 void glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
369 void glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value);
370 void glUseProgram(GLuint program);
371 void glValidateProgram(GLuint program);
372 void glVertexAttrib1f(GLuint indx, GLfloat x);
373 void glVertexAttrib1fv(GLuint indx, const GLfloat* values);
374 void glVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y);
375 void glVertexAttrib2fv(GLuint indx, const GLfloat* values);
376 void glVertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z);
377 void glVertexAttrib3fv(GLuint indx, const GLfloat* values);
378 void glVertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
379 void glVertexAttrib4fv(GLuint indx, const GLfloat* values);
380 void glVertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr);
381
382protected:
384 static bool isInitialized(const QOpenGLFunctionsPrivate *d) { return d != nullptr; }
385};
386
387Q_DECLARE_OPERATORS_FOR_FLAGS(QOpenGLFunctions::OpenGLFeatures)
388
389#define QT_OPENGL_DECLARE_FUNCTIONS(ret, name, args) \
390 ret (QOPENGLF_APIENTRYP name)args;
391#define QT_OPENGL_COUNT_FUNCTIONS(ret, name, args) +1
392
393#define QT_OPENGL_DECLARE(FUNCTIONS) \
394public: \
395 struct Functions { \
396 FUNCTIONS(QT_OPENGL_DECLARE_FUNCTIONS) \
397 }; \
398 union { \
399 QFunctionPointer functions[FUNCTIONS(QT_OPENGL_COUNT_FUNCTIONS)]; \
400 Functions f; \
401 }; \
402private: \
403 void init(QOpenGLContext *context);
404
406{
408
409#define QT_OPENGL_FUNCTIONS(F) \
410 F(void, BindTexture, (GLenum target, GLuint texture)) \
411 F(void, BlendFunc, (GLenum sfactor, GLenum dfactor)) \
412 F(void, Clear, (GLbitfield mask)) \
413 F(void, ClearColor, (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)) \
414 F(void, ClearDepthf, (GLclampf depth)) \
415 F(void, ClearStencil, (GLint s)) \
416 F(void, ColorMask, (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)) \
417 F(void, CopyTexImage2D, (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)) \
418 F(void, CopyTexSubImage2D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)) \
419 F(void, CullFace, (GLenum mode)) \
420 F(void, DeleteTextures, (GLsizei n, const GLuint* textures)) \
421 F(void, DepthFunc, (GLenum func)) \
422 F(void, DepthMask, (GLboolean flag)) \
423 F(void, DepthRangef, (GLclampf nearVal, GLclampf farVal)) \
424 F(void, Disable, (GLenum cap)) \
425 F(void, DrawArrays, (GLenum mode, GLint first, GLsizei count)) \
426 F(void, DrawElements, (GLenum mode, GLsizei count, GLenum type, const GLvoid* indices)) \
427 F(void, Enable, (GLenum cap)) \
428 F(void, Finish, ()) \
429 F(void, Flush, ()) \
430 F(void, FrontFace, (GLenum mode)) \
431 F(void, GenTextures, (GLsizei n, GLuint* textures)) \
432 F(void, GetBooleanv, (GLenum pname, GLboolean* params)) \
433 F(GLenum, GetError, ()) \
434 F(void, GetFloatv, (GLenum pname, GLfloat* params)) \
435 F(void, GetIntegerv, (GLenum pname, GLint* params)) \
436 F(const GLubyte *, GetString, (GLenum name)) \
437 F(void, GetTexParameterfv, (GLenum target, GLenum pname, GLfloat* params)) \
438 F(void, GetTexParameteriv, (GLenum target, GLenum pname, GLint* params)) \
439 F(void, Hint, (GLenum target, GLenum mode)) \
440 F(GLboolean, IsEnabled, (GLenum cap)) \
441 F(GLboolean, IsTexture, (GLuint texture)) \
442 F(void, LineWidth, (GLfloat width)) \
443 F(void, PixelStorei, (GLenum pname, GLint param)) \
444 F(void, PolygonOffset, (GLfloat factor, GLfloat units)) \
445 F(void, ReadPixels, (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels)) \
446 F(void, Scissor, (GLint x, GLint y, GLsizei width, GLsizei height)) \
447 F(void, StencilFunc, (GLenum func, GLint ref, GLuint mask)) \
448 F(void, StencilMask, (GLuint mask)) \
449 F(void, StencilOp, (GLenum fail, GLenum zfail, GLenum zpass)) \
450 F(void, TexImage2D, (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels)) \
451 F(void, TexParameterf, (GLenum target, GLenum pname, GLfloat param)) \
452 F(void, TexParameterfv, (GLenum target, GLenum pname, const GLfloat* params)) \
453 F(void, TexParameteri, (GLenum target, GLenum pname, GLint param)) \
454 F(void, TexParameteriv, (GLenum target, GLenum pname, const GLint* params)) \
455 F(void, TexSubImage2D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels)) \
456 F(void, Viewport, (GLint x, GLint y, GLsizei width, GLsizei height)) \
457 F(void, ActiveTexture, (GLenum texture)) \
458 F(void, AttachShader, (GLuint program, GLuint shader)) \
459 F(void, BindAttribLocation, (GLuint program, GLuint index, const char* name)) \
460 F(void, BindBuffer, (GLenum target, GLuint buffer)) \
461 F(void, BindFramebuffer, (GLenum target, GLuint framebuffer)) \
462 F(void, BindRenderbuffer, (GLenum target, GLuint renderbuffer)) \
463 F(void, BlendColor, (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)) \
464 F(void, BlendEquation, (GLenum mode)) \
465 F(void, BlendEquationSeparate, (GLenum modeRGB, GLenum modeAlpha)) \
466 F(void, BlendFuncSeparate, (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)) \
467 F(void, BufferData, (GLenum target, qopengl_GLsizeiptr size, const void* data, GLenum usage)) \
468 F(void, BufferSubData, (GLenum target, qopengl_GLintptr offset, qopengl_GLsizeiptr size, const void* data)) \
469 F(GLenum, CheckFramebufferStatus, (GLenum target)) \
470 F(void, CompileShader, (GLuint shader)) \
471 F(void, CompressedTexImage2D, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data)) \
472 F(void, CompressedTexSubImage2D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data)) \
473 F(GLuint, CreateProgram, ()) \
474 F(GLuint, CreateShader, (GLenum type)) \
475 F(void, DeleteBuffers, (GLsizei n, const GLuint* buffers)) \
476 F(void, DeleteFramebuffers, (GLsizei n, const GLuint* framebuffers)) \
477 F(void, DeleteProgram, (GLuint program)) \
478 F(void, DeleteRenderbuffers, (GLsizei n, const GLuint* renderbuffers)) \
479 F(void, DeleteShader, (GLuint shader)) \
480 F(void, DetachShader, (GLuint program, GLuint shader)) \
481 F(void, DisableVertexAttribArray, (GLuint index)) \
482 F(void, EnableVertexAttribArray, (GLuint index)) \
483 F(void, FramebufferRenderbuffer, (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)) \
484 F(void, FramebufferTexture2D, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)) \
485 F(void, GenBuffers, (GLsizei n, GLuint* buffers)) \
486 F(void, GenerateMipmap, (GLenum target)) \
487 F(void, GenFramebuffers, (GLsizei n, GLuint* framebuffers)) \
488 F(void, GenRenderbuffers, (GLsizei n, GLuint* renderbuffers)) \
489 F(void, GetActiveAttrib, (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name)) \
490 F(void, GetActiveUniform, (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name)) \
491 F(void, GetAttachedShaders, (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders)) \
492 F(GLint, GetAttribLocation, (GLuint program, const char* name)) \
493 F(void, GetBufferParameteriv, (GLenum target, GLenum pname, GLint* params)) \
494 F(void, GetFramebufferAttachmentParameteriv, (GLenum target, GLenum attachment, GLenum pname, GLint* params)) \
495 F(void, GetProgramiv, (GLuint program, GLenum pname, GLint* params)) \
496 F(void, GetProgramInfoLog, (GLuint program, GLsizei bufsize, GLsizei* length, char* infolog)) \
497 F(void, GetRenderbufferParameteriv, (GLenum target, GLenum pname, GLint* params)) \
498 F(void, GetShaderiv, (GLuint shader, GLenum pname, GLint* params)) \
499 F(void, GetShaderInfoLog, (GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog)) \
500 F(void, GetShaderPrecisionFormat, (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision)) \
501 F(void, GetShaderSource, (GLuint shader, GLsizei bufsize, GLsizei* length, char* source)) \
502 F(void, GetUniformfv, (GLuint program, GLint location, GLfloat* params)) \
503 F(void, GetUniformiv, (GLuint program, GLint location, GLint* params)) \
504 F(GLint, GetUniformLocation, (GLuint program, const char* name)) \
505 F(void, GetVertexAttribfv, (GLuint index, GLenum pname, GLfloat* params)) \
506 F(void, GetVertexAttribiv, (GLuint index, GLenum pname, GLint* params)) \
507 F(void, GetVertexAttribPointerv, (GLuint index, GLenum pname, void** pointer)) \
508 F(GLboolean, IsBuffer, (GLuint buffer)) \
509 F(GLboolean, IsFramebuffer, (GLuint framebuffer)) \
510 F(GLboolean, IsProgram, (GLuint program)) \
511 F(GLboolean, IsRenderbuffer, (GLuint renderbuffer)) \
512 F(GLboolean, IsShader, (GLuint shader)) \
513 F(void, LinkProgram, (GLuint program)) \
514 F(void, ReleaseShaderCompiler, ()) \
515 F(void, RenderbufferStorage, (GLenum target, GLenum internalformat, GLsizei width, GLsizei height)) \
516 F(void, SampleCoverage, (GLclampf value, GLboolean invert)) \
517 F(void, ShaderBinary, (GLint n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLint length)) \
518 F(void, ShaderSource, (GLuint shader, GLsizei count, const char** string, const GLint* length)) \
519 F(void, StencilFuncSeparate, (GLenum face, GLenum func, GLint ref, GLuint mask)) \
520 F(void, StencilMaskSeparate, (GLenum face, GLuint mask)) \
521 F(void, StencilOpSeparate, (GLenum face, GLenum fail, GLenum zfail, GLenum zpass)) \
522 F(void, Uniform1f, (GLint location, GLfloat x)) \
523 F(void, Uniform1fv, (GLint location, GLsizei count, const GLfloat* v)) \
524 F(void, Uniform1i, (GLint location, GLint x)) \
525 F(void, Uniform1iv, (GLint location, GLsizei count, const GLint* v)) \
526 F(void, Uniform2f, (GLint location, GLfloat x, GLfloat y)) \
527 F(void, Uniform2fv, (GLint location, GLsizei count, const GLfloat* v)) \
528 F(void, Uniform2i, (GLint location, GLint x, GLint y)) \
529 F(void, Uniform2iv, (GLint location, GLsizei count, const GLint* v)) \
530 F(void, Uniform3f, (GLint location, GLfloat x, GLfloat y, GLfloat z)) \
531 F(void, Uniform3fv, (GLint location, GLsizei count, const GLfloat* v)) \
532 F(void, Uniform3i, (GLint location, GLint x, GLint y, GLint z)) \
533 F(void, Uniform3iv, (GLint location, GLsizei count, const GLint* v)) \
534 F(void, Uniform4f, (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)) \
535 F(void, Uniform4fv, (GLint location, GLsizei count, const GLfloat* v)) \
536 F(void, Uniform4i, (GLint location, GLint x, GLint y, GLint z, GLint w)) \
537 F(void, Uniform4iv, (GLint location, GLsizei count, const GLint* v)) \
538 F(void, UniformMatrix2fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)) \
539 F(void, UniformMatrix3fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)) \
540 F(void, UniformMatrix4fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)) \
541 F(void, UseProgram, (GLuint program)) \
542 F(void, ValidateProgram, (GLuint program)) \
543 F(void, VertexAttrib1f, (GLuint indx, GLfloat x)) \
544 F(void, VertexAttrib1fv, (GLuint indx, const GLfloat* values)) \
545 F(void, VertexAttrib2f, (GLuint indx, GLfloat x, GLfloat y)) \
546 F(void, VertexAttrib2fv, (GLuint indx, const GLfloat* values)) \
547 F(void, VertexAttrib3f, (GLuint indx, GLfloat x, GLfloat y, GLfloat z)) \
548 F(void, VertexAttrib3fv, (GLuint indx, const GLfloat* values)) \
549 F(void, VertexAttrib4f, (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w)) \
550 F(void, VertexAttrib4fv, (GLuint indx, const GLfloat* values)) \
551 F(void, VertexAttribPointer, (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr)) \
552 F(void, ClearDepth, (GLdouble depth)) \
553 F(void, DepthRange, (GLdouble zNear, GLdouble zFar)) \
554
556};
557
558// GLES2 + OpenGL1 common subset
559
561{
562#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
564#else
566 d_ptr->f.BindTexture(target, texture);
567#endif
569}
570
571inline void QOpenGLFunctions::glBlendFunc(GLenum sfactor, GLenum dfactor)
572{
573#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
574 ::glBlendFunc(sfactor, dfactor);
575#else
577 d_ptr->f.BlendFunc(sfactor, dfactor);
578#endif
580}
581
583{
584#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
586#else
588 d_ptr->f.Clear(mask);
589#endif
591}
592
593inline void QOpenGLFunctions::glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
594{
595#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
597#else
599 d_ptr->f.ClearColor(red, green, blue, alpha);
600#endif
602}
603
605{
606#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
608#else
610 d_ptr->f.ClearStencil(s);
611#endif
613}
614
616{
617#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
619#else
621 d_ptr->f.ColorMask(red, green, blue, alpha);
622#endif
624}
625
636
638{
639#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
641#else
643 d_ptr->f.CopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
644#endif
646}
647
649{
650#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
652#else
654 d_ptr->f.CullFace(mode);
655#endif
657}
658
660{
661#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
663#else
665 d_ptr->f.DeleteTextures(n, textures);
666#endif
668}
669
671{
672#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
674#else
676 d_ptr->f.DepthFunc(func);
677#endif
679}
680
682{
683#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
684 ::glDepthMask(flag);
685#else
687 d_ptr->f.DepthMask(flag);
688#endif
690}
691
693{
694#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
696#else
698 d_ptr->f.Disable(cap);
699#endif
701}
702
704{
705#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
707#else
709 d_ptr->f.DrawArrays(mode, first, count);
710#endif
712}
713
715{
716#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
718#else
720 d_ptr->f.DrawElements(mode, count, type, indices);
721#endif
723}
724
726{
727#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
729#else
731 d_ptr->f.Enable(cap);
732#endif
734}
735
737{
738#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
739 ::glFinish();
740#else
742 d_ptr->f.Finish();
743#endif
745}
746
748{
749#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
750 ::glFlush();
751#else
753 d_ptr->f.Flush();
754#endif
756}
757
759{
760#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
762#else
764 d_ptr->f.FrontFace(mode);
765#endif
767}
768
770{
771#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
773#else
775 d_ptr->f.GenTextures(n, textures);
776#endif
778}
779
781{
782#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
784#else
786 d_ptr->f.GetBooleanv(pname, params);
787#endif
789}
790
792{
793#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
795#else
797 GLenum result = d_ptr->f.GetError();
798#endif
799 return result;
800}
801
803{
804#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
806#else
808 d_ptr->f.GetFloatv(pname, params);
809#endif
811}
812
814{
815#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
817#else
819 d_ptr->f.GetIntegerv(pname, params);
820#endif
822}
823
825{
826#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
827 const GLubyte *result = ::glGetString(name);
828#else
830 const GLubyte *result = d_ptr->f.GetString(name);
831#endif
833 return result;
834}
835
837{
838#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
840#else
842 d_ptr->f.GetTexParameterfv(target, pname, params);
843#endif
845}
846
848{
849#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
851#else
853 d_ptr->f.GetTexParameteriv(target, pname, params);
854#endif
856}
857
859{
860#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
862#else
864 d_ptr->f.Hint(target, mode);
865#endif
867}
868
870{
871#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
873#else
875 GLboolean result = d_ptr->f.IsEnabled(cap);
876#endif
878 return result;
879}
880
882{
883#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
885#else
887 GLboolean result = d_ptr->f.IsTexture(texture);
888#endif
890 return result;
891}
892
894{
895#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
897#else
899 d_ptr->f.LineWidth(width);
900#endif
902}
903
905{
906#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
908#else
910 d_ptr->f.PixelStorei(pname, param);
911#endif
913}
914
916{
917#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
918 ::glPolygonOffset(factor, units);
919#else
921 d_ptr->f.PolygonOffset(factor, units);
922#endif
924}
925
927{
928#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
930#else
932 d_ptr->f.ReadPixels(x, y, width, height, format, type, pixels);
933#endif
935}
936
938{
939#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
941#else
943 d_ptr->f.Scissor(x, y, width, height);
944#endif
946}
947
949{
950#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
952#else
954 d_ptr->f.StencilFunc(func, ref, mask);
955#endif
957}
958
960{
961#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
963#else
965 d_ptr->f.StencilMask(mask);
966#endif
968}
969
970inline void QOpenGLFunctions::glStencilOp(GLenum fail, GLenum zfail, GLenum zpass)
971{
972#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
973 ::glStencilOp(fail, zfail, zpass);
974#else
976 d_ptr->f.StencilOp(fail, zfail, zpass);
977#endif
979}
980
991
993{
994#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
996#else
998 d_ptr->f.TexParameterf(target, pname, param);
999#endif
1001}
1002
1004{
1005#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1007#else
1009 d_ptr->f.TexParameterfv(target, pname, params);
1010#endif
1012}
1013
1015{
1016#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1018#else
1020 d_ptr->f.TexParameteri(target, pname, param);
1021#endif
1023}
1024
1026{
1027#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1029#else
1031 d_ptr->f.TexParameteriv(target, pname, params);
1032#endif
1034}
1035
1037{
1038#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1040#else
1042 d_ptr->f.TexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
1043#endif
1045}
1046
1048{
1049#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1051#else
1053 d_ptr->f.Viewport(x, y, width, height);
1054#endif
1056}
1057
1058// GL(ES)2
1059
1061{
1062#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1064#else
1066 d_ptr->f.ActiveTexture(texture);
1067#endif
1069}
1070
1072{
1073#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1075#else
1077 d_ptr->f.AttachShader(program, shader);
1078#endif
1080}
1081
1083{
1084#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1086#else
1088 d_ptr->f.BindAttribLocation(program, index, name);
1089#endif
1091}
1092
1094{
1095#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1097#else
1099 d_ptr->f.BindBuffer(target, buffer);
1100#endif
1102}
1103
1105{
1106 if (framebuffer == 0)
1107 framebuffer = QOpenGLContext::currentContext()->defaultFramebufferObject();
1108#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1110#else
1112 d_ptr->f.BindFramebuffer(target, framebuffer);
1113#endif
1115}
1116
1118{
1119#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1121#else
1123 d_ptr->f.BindRenderbuffer(target, renderbuffer);
1124#endif
1126}
1127
1128inline void QOpenGLFunctions::glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
1129{
1130#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1132#else
1134 d_ptr->f.BlendColor(red, green, blue, alpha);
1135#endif
1137}
1138
1140{
1141#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1143#else
1145 d_ptr->f.BlendEquation(mode);
1146#endif
1148}
1149
1151{
1152#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1154#else
1156 d_ptr->f.BlendEquationSeparate(modeRGB, modeAlpha);
1157#endif
1159}
1160
1162{
1163#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1165#else
1167 d_ptr->f.BlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha);
1168#endif
1170}
1171
1173{
1174#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1176#else
1178 d_ptr->f.BufferData(target, size, data, usage);
1179#endif
1181}
1182
1184{
1185#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1187#else
1189 d_ptr->f.BufferSubData(target, offset, size, data);
1190#endif
1192}
1193
1195{
1196#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1198#else
1200 GLenum result = d_ptr->f.CheckFramebufferStatus(target);
1201#endif
1203 return result;
1204}
1205
1207{
1208#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1210#else
1212 d_ptr->f.ClearDepthf(depth);
1213#endif
1215}
1216
1218{
1219#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1221#else
1223 d_ptr->f.CompileShader(shader);
1224#endif
1226}
1227
1238
1249
1251{
1252#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1254#else
1256 GLuint result = d_ptr->f.CreateProgram();
1257#endif
1259 return result;
1260}
1261
1263{
1264#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1266#else
1268 GLuint result = d_ptr->f.CreateShader(type);
1269#endif
1271 return result;
1272}
1273
1275{
1276#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1278#else
1280 d_ptr->f.DeleteBuffers(n, buffers);
1281#endif
1283}
1284
1286{
1287#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1289#else
1291 d_ptr->f.DeleteFramebuffers(n, framebuffers);
1292#endif
1294}
1295
1297{
1298#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1300#else
1302 d_ptr->f.DeleteProgram(program);
1303#endif
1305}
1306
1308{
1309#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1311#else
1313 d_ptr->f.DeleteRenderbuffers(n, renderbuffers);
1314#endif
1316}
1317
1319{
1320#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1322#else
1324 d_ptr->f.DeleteShader(shader);
1325#endif
1327}
1328
1329inline void QOpenGLFunctions::glDepthRangef(GLclampf zNear, GLclampf zFar)
1330{
1331#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1333#else
1335 d_ptr->f.DepthRangef(zNear, zFar);
1336#endif
1338}
1339
1341{
1342#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1344#else
1346 d_ptr->f.DetachShader(program, shader);
1347#endif
1349}
1350
1352{
1353#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1355#else
1357 d_ptr->f.DisableVertexAttribArray(index);
1358#endif
1360}
1361
1363{
1364#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1366#else
1368 d_ptr->f.EnableVertexAttribArray(index);
1369#endif
1371}
1372
1383
1385{
1386#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1388#else
1390 d_ptr->f.FramebufferTexture2D(target, attachment, textarget, texture, level);
1391#endif
1393}
1394
1396{
1397#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1399#else
1401 d_ptr->f.GenBuffers(n, buffers);
1402#endif
1404}
1405
1407{
1408#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1410#else
1412 d_ptr->f.GenerateMipmap(target);
1413#endif
1415}
1416
1418{
1419#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1421#else
1423 d_ptr->f.GenFramebuffers(n, framebuffers);
1424#endif
1426}
1427
1429{
1430#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1432#else
1434 d_ptr->f.GenRenderbuffers(n, renderbuffers);
1435#endif
1437}
1438
1440{
1441#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1443#else
1445 d_ptr->f.GetActiveAttrib(program, index, bufsize, length, size, type, name);
1446#endif
1448}
1449
1451{
1452#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1454#else
1456 d_ptr->f.GetActiveUniform(program, index, bufsize, length, size, type, name);
1457#endif
1459}
1460
1462{
1463#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1465#else
1467 d_ptr->f.GetAttachedShaders(program, maxcount, count, shaders);
1468#endif
1470}
1471
1473{
1474#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1476#else
1478 GLint result = d_ptr->f.GetAttribLocation(program, name);
1479#endif
1481 return result;
1482}
1483
1485{
1486#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1488#else
1490 d_ptr->f.GetBufferParameteriv(target, pname, params);
1491#endif
1493}
1494
1496{
1497#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1499#else
1501 d_ptr->f.GetFramebufferAttachmentParameteriv(target, attachment, pname, params);
1502#endif
1504}
1505
1507{
1508#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1510#else
1512 d_ptr->f.GetProgramiv(program, pname, params);
1513#endif
1515}
1516
1518{
1519#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1521#else
1523 d_ptr->f.GetProgramInfoLog(program, bufsize, length, infolog);
1524#endif
1526}
1527
1529{
1530#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1532#else
1534 d_ptr->f.GetRenderbufferParameteriv(target, pname, params);
1535#endif
1537}
1538
1540{
1541#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1543#else
1545 d_ptr->f.GetShaderiv(shader, pname, params);
1546#endif
1548}
1549
1551{
1552#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1554#else
1556 d_ptr->f.GetShaderInfoLog(shader, bufsize, length, infolog);
1557#endif
1559}
1560
1562{
1563#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1565#else
1567 d_ptr->f.GetShaderPrecisionFormat(shadertype, precisiontype, range, precision);
1568#endif
1570}
1571
1573{
1574#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1576#else
1578 d_ptr->f.GetShaderSource(shader, bufsize, length, source);
1579#endif
1581}
1582
1584{
1585#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1587#else
1589 d_ptr->f.GetUniformfv(program, location, params);
1590#endif
1592}
1593
1595{
1596#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1598#else
1600 d_ptr->f.GetUniformiv(program, location, params);
1601#endif
1603}
1604
1606{
1607#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1609#else
1611 GLint result = d_ptr->f.GetUniformLocation(program, name);
1612#endif
1614 return result;
1615}
1616
1618{
1619#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1621#else
1623 d_ptr->f.GetVertexAttribfv(index, pname, params);
1624#endif
1626}
1627
1629{
1630#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1632#else
1634 d_ptr->f.GetVertexAttribiv(index, pname, params);
1635#endif
1637}
1638
1640{
1641#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1643#else
1645 d_ptr->f.GetVertexAttribPointerv(index, pname, pointer);
1646#endif
1648}
1649
1651{
1652#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1654#else
1656 GLboolean result = d_ptr->f.IsBuffer(buffer);
1657#endif
1659 return result;
1660}
1661
1663{
1664#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1666#else
1668 GLboolean result = d_ptr->f.IsFramebuffer(framebuffer);
1669#endif
1671 return result;
1672}
1673
1675{
1676#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1678#else
1680 GLboolean result = d_ptr->f.IsProgram(program);
1681#endif
1683 return result;
1684}
1685
1687{
1688#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1690#else
1692 GLboolean result = d_ptr->f.IsRenderbuffer(renderbuffer);
1693#endif
1695 return result;
1696}
1697
1699{
1700#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1702#else
1704 GLboolean result = d_ptr->f.IsShader(shader);
1705#endif
1707 return result;
1708}
1709
1711{
1712#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1714#else
1716 d_ptr->f.LinkProgram(program);
1717#endif
1719}
1720
1722{
1723#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1725#else
1727 d_ptr->f.ReleaseShaderCompiler();
1728#endif
1730}
1731
1733{
1734#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1736#else
1738 d_ptr->f.RenderbufferStorage(target, internalformat, width, height);
1739#endif
1741}
1742
1744{
1745#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1747#else
1749 d_ptr->f.SampleCoverage(value, invert);
1750#endif
1752}
1753
1755{
1756#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1758#else
1760 d_ptr->f.ShaderBinary(n, shaders, binaryformat, binary, length);
1761#endif
1763}
1764
1765inline void QOpenGLFunctions::glShaderSource(GLuint shader, GLsizei count, const char** string, const GLint* length)
1766{
1767#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1769#else
1771 d_ptr->f.ShaderSource(shader, count, string, length);
1772#endif
1774}
1775
1777{
1778#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1780#else
1782 d_ptr->f.StencilFuncSeparate(face, func, ref, mask);
1783#endif
1785}
1786
1788{
1789#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1791#else
1793 d_ptr->f.StencilMaskSeparate(face, mask);
1794#endif
1796}
1797
1799{
1800#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1801 ::glStencilOpSeparate(face, fail, zfail, zpass);
1802#else
1804 d_ptr->f.StencilOpSeparate(face, fail, zfail, zpass);
1805#endif
1807}
1808
1810{
1811#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1813#else
1815 d_ptr->f.Uniform1f(location, x);
1816#endif
1818}
1819
1821{
1822#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1824#else
1826 d_ptr->f.Uniform1fv(location, count, v);
1827#endif
1829}
1830
1832{
1833#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1835#else
1837 d_ptr->f.Uniform1i(location, x);
1838#endif
1840}
1841
1843{
1844#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1846#else
1848 d_ptr->f.Uniform1iv(location, count, v);
1849#endif
1851}
1852
1854{
1855#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1857#else
1859 d_ptr->f.Uniform2f(location, x, y);
1860#endif
1862}
1863
1865{
1866#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1868#else
1870 d_ptr->f.Uniform2fv(location, count, v);
1871#endif
1873}
1874
1876{
1877#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1879#else
1881 d_ptr->f.Uniform2i(location, x, y);
1882#endif
1884}
1885
1887{
1888#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1890#else
1892 d_ptr->f.Uniform2iv(location, count, v);
1893#endif
1895}
1896
1898{
1899#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1901#else
1903 d_ptr->f.Uniform3f(location, x, y, z);
1904#endif
1906}
1907
1909{
1910#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1912#else
1914 d_ptr->f.Uniform3fv(location, count, v);
1915#endif
1917}
1918
1920{
1921#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1923#else
1925 d_ptr->f.Uniform3i(location, x, y, z);
1926#endif
1928}
1929
1931{
1932#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1934#else
1936 d_ptr->f.Uniform3iv(location, count, v);
1937#endif
1939}
1940
1942{
1943#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1944 ::glUniform4f(location, x, y, z, w);
1945#else
1947 d_ptr->f.Uniform4f(location, x, y, z, w);
1948#endif
1950}
1951
1953{
1954#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1956#else
1958 d_ptr->f.Uniform4fv(location, count, v);
1959#endif
1961}
1962
1964{
1965#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1966 ::glUniform4i(location, x, y, z, w);
1967#else
1969 d_ptr->f.Uniform4i(location, x, y, z, w);
1970#endif
1972}
1973
1975{
1976#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1978#else
1980 d_ptr->f.Uniform4iv(location, count, v);
1981#endif
1983}
1984
1986{
1987#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
1989#else
1991 d_ptr->f.UniformMatrix2fv(location, count, transpose, value);
1992#endif
1994}
1995
1997{
1998#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
2000#else
2002 d_ptr->f.UniformMatrix3fv(location, count, transpose, value);
2003#endif
2005}
2006
2008{
2009#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
2011#else
2013 d_ptr->f.UniformMatrix4fv(location, count, transpose, value);
2014#endif
2016}
2017
2019{
2020#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
2022#else
2024 d_ptr->f.UseProgram(program);
2025#endif
2027}
2028
2030{
2031#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
2033#else
2035 d_ptr->f.ValidateProgram(program);
2036#endif
2038}
2039
2041{
2042#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
2043 ::glVertexAttrib1f(indx, x);
2044#else
2046 d_ptr->f.VertexAttrib1f(indx, x);
2047#endif
2049}
2050
2052{
2053#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
2055#else
2057 d_ptr->f.VertexAttrib1fv(indx, values);
2058#endif
2060}
2061
2063{
2064#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
2065 ::glVertexAttrib2f(indx, x, y);
2066#else
2068 d_ptr->f.VertexAttrib2f(indx, x, y);
2069#endif
2071}
2072
2074{
2075#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
2077#else
2079 d_ptr->f.VertexAttrib2fv(indx, values);
2080#endif
2082}
2083
2085{
2086#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
2087 ::glVertexAttrib3f(indx, x, y, z);
2088#else
2090 d_ptr->f.VertexAttrib3f(indx, x, y, z);
2091#endif
2093}
2094
2096{
2097#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
2099#else
2101 d_ptr->f.VertexAttrib3fv(indx, values);
2102#endif
2104}
2105
2107{
2108#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
2109 ::glVertexAttrib4f(indx, x, y, z, w);
2110#else
2112 d_ptr->f.VertexAttrib4f(indx, x, y, z, w);
2113#endif
2115}
2116
2118{
2119#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
2121#else
2123 d_ptr->f.VertexAttrib4fv(indx, values);
2124#endif
2126}
2127
2129{
2130#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
2132#else
2134 d_ptr->f.VertexAttribPointer(indx, size, type, normalized, stride, ptr);
2135#endif
2137}
2138
2139#undef QT_OPENGL_DECLARE_FUNCTIONS
2140#undef QT_OPENGL_COUNT_FUNCTIONS
2141#undef QT_OPENGL_DECLARE
2142
2144
2145#endif // QT_NO_OPENGL
2146
2147#endif
\inmodule QtGui
static QOpenGLContext * currentContext()
Returns the last context which called makeCurrent in the current thread, or \nullptr,...
The QOpenGLFunctions class provides cross-platform access to the OpenGL ES 2.0 API.
void glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha)
Convenience function that calls glBlendEquationSeparate(modeRGB, modeAlpha).
void glStencilFunc(GLenum func, GLint ref, GLuint mask)
Convenience function that calls glStencilFunc(func, ref, mask).
void glBlendFunc(GLenum sfactor, GLenum dfactor)
Convenience function that calls glBlendFunc(sfactor, dfactor).
~QOpenGLFunctions()
Destroys this function resolver.
void glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision)
Convenience function that calls glGetShaderPrecisionFormat(shadertype, precisiontype,...
void glBufferData(GLenum target, qopengl_GLsizeiptr size, const void *data, GLenum usage)
Convenience function that calls glBufferData(target, size, data, usage).
void glUniform3fv(GLint location, GLsizei count, const GLfloat *v)
Convenience function that calls glUniform3fv(location, count, v).
void glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
Convenience function that calls glUniform4f(location, x, y, z, w).
OpenGLFeature
This enum defines OpenGL and OpenGL ES features whose presence may depend on the implementation.
void glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
Convenience function that calls glCopyTexSubImage2D(target, level, xoffset, yoffset,...
void glUniform1f(GLint location, GLfloat x)
Convenience function that calls glUniform1f(location, x).
void glGetProgramiv(GLuint program, GLenum pname, GLint *params)
Convenience function that calls glGetProgramiv(program, pname, params).
void glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
Convenience function that calls glBlendColor(red, green, blue, alpha).
GLboolean glIsRenderbuffer(GLuint renderbuffer)
Convenience function that calls glIsRenderbuffer(renderbuffer).
void glLineWidth(GLfloat width)
Convenience function that calls glLineWidth(width).
void glGetFloatv(GLenum pname, GLfloat *params)
Convenience function that calls glGetFloatv(pname, params).
void glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
Convenience function that calls glUniformMatrix4fv(location, count, transpose, value).
void glStencilMaskSeparate(GLenum face, GLuint mask)
Convenience function that calls glStencilMaskSeparate(face, mask).
void glGetVertexAttribiv(GLuint index, GLenum pname, GLint *params)
Convenience function that calls glGetVertexAttribiv(index, pname, params).
void glDepthRangef(GLclampf zNear, GLclampf zFar)
Convenience function that calls glDepthRange(zNear, zFar) on desktop OpenGL systems and glDepthRangef...
void glDeleteShader(GLuint shader)
Convenience function that calls glDeleteShader(shader).
GLboolean glIsFramebuffer(GLuint framebuffer)
Convenience function that calls glIsFramebuffer(framebuffer).
void glBufferSubData(GLenum target, qopengl_GLintptr offset, qopengl_GLsizeiptr size, const void *data)
Convenience function that calls glBufferSubData(target, offset, size, data).
GLint glGetAttribLocation(GLuint program, const char *name)
Convenience function that calls glGetAttribLocation(program, name).
void glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels)
Convenience function that calls glReadPixels(x, y, width, height, format, type, pixels).
void glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
Convenience function that calls glClearColor(red, green, blue, alpha).
void glUniform3iv(GLint location, GLsizei count, const GLint *v)
Convenience function that calls glUniform3iv(location, count, v).
void glUniform1iv(GLint location, GLsizei count, const GLint *v)
Convenience function that calls glUniform1iv(location, count, v).
void glUniform1i(GLint location, GLint x)
Convenience function that calls glUniform1i(location, x).
void glAttachShader(GLuint program, GLuint shader)
Convenience function that calls glAttachShader(program, shader).
QOpenGLFunctionsPrivate * d_ptr
void glUniform1fv(GLint location, GLsizei count, const GLfloat *v)
Convenience function that calls glUniform1fv(location, count, v).
void glVertexAttrib1fv(GLuint indx, const GLfloat *values)
Convenience function that calls glVertexAttrib1fv(indx, values).
void glPixelStorei(GLenum pname, GLint param)
Convenience function that calls glPixelStorei(pname, param).
void glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei *length, char *source)
Convenience function that calls glGetShaderSource(shader, bufsize, length, source).
void glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z)
Convenience function that calls glUniform3f(location, x, y, z).
void glVertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *ptr)
Convenience function that calls glVertexAttribPointer(indx, size, type, normalized,...
static bool isInitialized(const QOpenGLFunctionsPrivate *d)
void glDeleteFramebuffers(GLsizei n, const GLuint *framebuffers)
Convenience function that calls glDeleteFramebuffers(n, framebuffers).
void glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
Convenience function that calls glCopyTexImage2D(target, level, internalformat, x,...
void glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
Convenience function that calls glBlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha).
void glFrontFace(GLenum mode)
Convenience function that calls glFrontFace(mode).
void glCullFace(GLenum mode)
Convenience function that calls glCullFace(mode).
void glGetBooleanv(GLenum pname, GLboolean *params)
Convenience function that calls glGetBooleanv(pname, params).
void glVertexAttrib2fv(GLuint indx, const GLfloat *values)
Convenience function that calls glVertexAttrib2fv(indx, values).
void glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
Convenience function that calls glViewport(x, y, width, height).
void glBindAttribLocation(GLuint program, GLuint index, const char *name)
Convenience function that calls glBindAttribLocation(program, index, name).
void glGenTextures(GLsizei n, GLuint *textures)
Convenience function that calls glGenTextures(n, textures).
void glDeleteBuffers(GLsizei n, const GLuint *buffers)
Convenience function that calls glDeleteBuffers(n, buffers).
void glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)
Convenience function that calls glDrawElements(mode, count, type, indices).
void glDrawArrays(GLenum mode, GLint first, GLsizei count)
Convenience function that calls glDrawArrays(mode, first, count).
void glGetTexParameteriv(GLenum target, GLenum pname, GLint *params)
Convenience function that calls glGetTexParameteriv(target, pname, params).
void glUniform2fv(GLint location, GLsizei count, const GLfloat *v)
Convenience function that calls glUniform2fv(location, count, v).
void glFinish()
Convenience function that calls glFinish().
void glClearDepthf(GLclampf depth)
Convenience function that calls glClearDepth(depth) on desktop OpenGL systems and glClearDepthf(depth...
void glClear(GLbitfield mask)
Convenience function that calls glClear(mask).
void glLinkProgram(GLuint program)
Convenience function that calls glLinkProgram(program).
GLenum glGetError()
Convenience function that calls glGetError().
const GLubyte * glGetString(GLenum name)
Convenience function that calls glGetString(name).
void glVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y)
Convenience function that calls glVertexAttrib2f(indx, x, y).
void glGetShaderiv(GLuint shader, GLenum pname, GLint *params)
Convenience function that calls glGetShaderiv(shader, pname, params).
void glDeleteRenderbuffers(GLsizei n, const GLuint *renderbuffers)
Convenience function that calls glDeleteRenderbuffers(n, renderbuffers).
void glDeleteProgram(GLuint program)
Convenience function that calls glDeleteProgram(program).
void glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
Convenience function that calls glUniformMatrix2fv(location, count, transpose, value).
void glTexParameteriv(GLenum target, GLenum pname, const GLint *params)
Convenience function that calls glTexParameteriv(target, pname, params).
void glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels)
Convenience function that calls glTexImage2D(target, level, internalformat, width,...
GLboolean glIsBuffer(GLuint buffer)
Convenience function that calls glIsBuffer(buffer).
void glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data)
Convenience function that calls glCompressedTexSubImage2D(target, level, xoffset, yoffset,...
void glUseProgram(GLuint program)
Convenience function that calls glUseProgram(program).
void glDetachShader(GLuint program, GLuint shader)
Convenience function that calls glDetachShader(program, shader).
void glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint *params)
Convenience function that calls glGetRenderbufferParameteriv(target, pname, params).
void glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name)
Convenience function that calls glGetActiveUniform(program, index, bufsize, length,...
void glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)
Convenience function that calls glTexSubImage2D(target, level, xoffset, yoffset, width,...
void glUniform2i(GLint location, GLint x, GLint y)
Convenience function that calls glUniform2i(location, x, y).
void glGenRenderbuffers(GLsizei n, GLuint *renderbuffers)
Convenience function that calls glGenRenderbuffers(n, renderbuffers).
void glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint *params)
Convenience function that calls glGetFramebufferAttachmentParameteriv(target, attachment,...
void glBindBuffer(GLenum target, GLuint buffer)
Convenience function that calls glBindBuffer(target, buffer).
void glBindRenderbuffer(GLenum target, GLuint renderbuffer)
Convenience function that calls glBindRenderbuffer(target, renderbuffer).
void glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei *length, char *infolog)
Convenience function that calls glGetProgramInfoLog(program, bufsize, length, infolog).
void glFlush()
Convenience function that calls glFlush().
void glClearStencil(GLint s)
Convenience function that calls glClearStencil(s).
GLuint glCreateShader(GLenum type)
Convenience function that calls glCreateShader(type).
void glShaderSource(GLuint shader, GLsizei count, const char **string, const GLint *length)
Convenience function that calls glShaderSource(shader, count, string, length).
void glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w)
Convenience function that calls glUniform4i(location, x, y, z, w).
GLint glGetUniformLocation(GLuint program, const char *name)
Convenience function that calls glGetUniformLocation(program, name).
void glDisableVertexAttribArray(GLuint index)
Convenience function that calls glDisableVertexAttribArray(index).
void glTexParameteri(GLenum target, GLenum pname, GLint param)
Convenience function that calls glTexParameteri(target, pname, param).
void glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei *length, char *infolog)
Convenience function that calls glGetShaderInfoLog(shader, bufsize, length, infolog).
void glUniform4iv(GLint location, GLsizei count, const GLint *v)
Convenience function that calls glUniform4iv(location, count, v).
void glGetVertexAttribPointerv(GLuint index, GLenum pname, void **pointer)
Convenience function that calls glGetVertexAttribPointerv(index, pname, pointer).
void glTexParameterfv(GLenum target, GLenum pname, const GLfloat *params)
Convenience function that calls glTexParameterfv(target, pname, params).
void glUniform2f(GLint location, GLfloat x, GLfloat y)
Convenience function that calls glUniform2f(location, x, y).
void glGetUniformfv(GLuint program, GLint location, GLfloat *params)
Convenience function that calls glGetUniformfv(program, location, params).
void glVertexAttrib4fv(GLuint indx, const GLfloat *values)
Convenience function that calls glVertexAttrib4fv(indx, values).
void glGetUniformiv(GLuint program, GLint location, GLint *params)
Convenience function that calls glGetUniformiv(program, location, params).
void glVertexAttrib1f(GLuint indx, GLfloat x)
Convenience function that calls glVertexAttrib1f(indx, x).
void glTexParameterf(GLenum target, GLenum pname, GLfloat param)
Convenience function that calls glTexParameterf(target, pname, param).
void glGetBufferParameteriv(GLenum target, GLenum pname, GLint *params)
Convenience function that calls glGetBufferParameteriv(target, pname, params).
void glEnableVertexAttribArray(GLuint index)
Convenience function that calls glEnableVertexAttribArray(index).
void glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat *params)
Convenience function that calls glGetVertexAttribfv(index, pname, params).
void glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
Convenience function that calls glColorMask(red, green, blue, alpha).
void glScissor(GLint x, GLint y, GLsizei width, GLsizei height)
Convenience function that calls glScissor(x, y, width, height).
void glBindTexture(GLenum target, GLuint texture)
Convenience function that calls glBindTexture(target, texture).
void glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
Convenience function that calls glFramebufferTexture2D(target, attachment, textarget,...
void glHint(GLenum target, GLenum mode)
Convenience function that calls glHint(target, mode).
void glStencilOp(GLenum fail, GLenum zfail, GLenum zpass)
Convenience function that calls glStencilOp(fail, zfail, zpass).
void glDeleteTextures(GLsizei n, const GLuint *textures)
Convenience function that calls glDeleteTextures(n, textures).
void glDepthMask(GLboolean flag)
Convenience function that calls glDepthMask(flag).
void glActiveTexture(GLenum texture)
Convenience function that calls glActiveTexture(texture).
void glBindFramebuffer(GLenum target, GLuint framebuffer)
Convenience function that calls glBindFramebuffer(target, framebuffer).
GLboolean glIsEnabled(GLenum cap)
Convenience function that calls glIsEnabled(cap).
GLboolean glIsShader(GLuint shader)
Convenience function that calls glIsShader(shader).
void glVertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
Convenience function that calls glVertexAttrib4f(indx, x, y, z, w).
void glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name)
Convenience function that calls glGetActiveAttrib(program, index, bufsize, length,...
void glDisable(GLenum cap)
Convenience function that calls glDisable(cap).
void glGenBuffers(GLsizei n, GLuint *buffers)
Convenience function that calls glGenBuffers(n, buffers).
void glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass)
Convenience function that calls glStencilOpSeparate(face, fail, zfail, zpass).
void glUniform4fv(GLint location, GLsizei count, const GLfloat *v)
Convenience function that calls glUniform4fv(location, count, v).
GLuint glCreateProgram()
Convenience function that calls glCreateProgram().
void glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
Convenience function that calls glFramebufferRenderbuffer(target, attachment, renderbuffertarget,...
void glBlendEquation(GLenum mode)
Convenience function that calls glBlendEquation(mode).
void glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
Convenience function that calls glUniformMatrix3fv(location, count, transpose, value).
void glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei *count, GLuint *shaders)
Convenience function that calls glGetAttachedShaders(program, maxcount, count, shaders).
void glShaderBinary(GLint n, const GLuint *shaders, GLenum binaryformat, const void *binary, GLint length)
Convenience function that calls glShaderBinary(n, shaders, binaryformat, binary, length).
void glEnable(GLenum cap)
Convenience function that calls glEnable(cap).
void glUniform2iv(GLint location, GLsizei count, const GLint *v)
Convenience function that calls glUniform2iv(location, count, v).
void glGenFramebuffers(GLsizei n, GLuint *framebuffers)
Convenience function that calls glGenFramebuffers(n, framebuffers).
void glGetTexParameterfv(GLenum target, GLenum pname, GLfloat *params)
Convenience function that calls glGetTexParameterfv(target, pname, params).
void glStencilMask(GLuint mask)
Convenience function that calls glStencilMask(mask).
void glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask)
Convenience function that calls glStencilFuncSeparate(face, func, ref, mask).
void glGetIntegerv(GLenum pname, GLint *params)
Convenience function that calls glGetIntegerv(pname, params).
void glSampleCoverage(GLclampf value, GLboolean invert)
Convenience function that calls glSampleCoverage(value, invert).
void glDepthFunc(GLenum func)
Convenience function that calls glDepthFunc(func).
void glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
Convenience function that calls glRenderbufferStorage(target, internalformat, width,...
void glVertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z)
Convenience function that calls glVertexAttrib3f(indx, x, y, z).
void glVertexAttrib3fv(GLuint indx, const GLfloat *values)
Convenience function that calls glVertexAttrib3fv(indx, values).
GLenum glCheckFramebufferStatus(GLenum target)
Convenience function that calls glCheckFramebufferStatus(target).
GLboolean glIsProgram(GLuint program)
Convenience function that calls glIsProgram(program).
void glValidateProgram(GLuint program)
Convenience function that calls glValidateProgram(program).
void glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data)
Convenience function that calls glCompressedTexImage2D(target, level, internalformat,...
void glUniform3i(GLint location, GLint x, GLint y, GLint z)
Convenience function that calls glUniform3i(location, x, y, z).
void glGenerateMipmap(GLenum target)
Convenience function that calls glGenerateMipmap(target).
GLboolean glIsTexture(GLuint texture)
Convenience function that calls glIsTexture(texture).
void glPolygonOffset(GLfloat factor, GLfloat units)
Convenience function that calls glPolygonOffset(factor, units).
void glReleaseShaderCompiler()
Convenience function that calls glReleaseShaderCompiler().
void glCompileShader(GLuint shader)
Convenience function that calls glCompileShader(shader).
EGLContext ctx
Combined button and popup list for selecting options.
static void * context
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
#define Q_DECLARE_FLAGS(Flags, Enum)
Definition qflags.h:174
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
Definition qflags.h:194
static ControlElement< T > * ptr(QWidget *widget)
QT_BEGIN_NAMESPACE typedef ptrdiff_t qopengl_GLintptr
Definition qopengl.h:265
ptrdiff_t qopengl_GLsizeiptr
Definition qopengl.h:266
char GLchar
Definition qopengl.h:158
GLenum modeRGB
GLint location
GLenum GLenum modeAlpha
GLenum GLsizei GLsizei GLint * values
[15]
GLsizei GLsizei GLenum void * binary
typedef GLint(GL_APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONINDEXEXTPROC)(GLuint program
GLdouble GLdouble GLdouble GLdouble GLdouble GLdouble zFar
GLsizei const GLfloat * v
[13]
GLdouble GLdouble GLdouble GLdouble GLdouble zNear
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat z
GLint GLint GLint GLint GLint x
[0]
GLuint const GLuint * buffers
GLint GLenum GLsizei GLsizei GLsizei depth
typedef GLfloat(GL_APIENTRYP PFNGLGETPATHLENGTHNVPROC)(GLuint path
GLenum mode
GLenum GLuint GLint level
GLfloat GLfloat GLfloat w
[0]
GLint GLsizei GLsizei height
GLenum shadertype
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLuint index
[2]
GLuint const GLuint GLuint const GLuint * textures
GLenum srcRGB
double GLdouble
GLenum GLenum GLenum GLenum dstAlpha
GLenum GLuint GLenum GLsizei length
GLenum GLenum GLsizei count
GLenum pname
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLint GLenum GLsizei GLsizei GLsizei GLint border
GLenum face
GLenum GLenum GLenum srcAlpha
GLsizei range
const void GLsizei GLsizei stride
GLenum GLuint buffer
GLint GLint GLint yoffset
GLint GLsizei width
GLint GLsizei GLboolean transpose
GLenum GLenum dstRGB
typedef GLsizei(GL_APIENTRYP PFNGLGETFRAMEBUFFERPIXELLOCALSTORAGESIZEEXTPROC)(GLuint target)
GLenum type
typedef GLenum(GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSKHRPROC)(void)
GLenum GLenum textarget
GLenum target
GLsizei bufsize
GLenum GLuint texture
GLuint program
GLint GLenum internalformat
GLfloat units
GLint GLint xoffset
typedef GLboolean(GL_APIENTRYP PFNGLISENABLEDIOESPROC)(GLenum target
GLenum const GLint * param
GLenum GLuint GLintptr offset
GLint GLenum GLsizei GLsizei GLsizei GLint GLenum GLenum const void * pixels
GLint ref
GLenum attachment
GLuint name
GLint first
GLint GLint GLint GLint GLint GLint GLint GLbitfield mask
GLfloat n
GLint GLsizei GLsizei GLenum format
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei imageSize
GLsizei GLenum const void * indices
GLint y
GLsizei GLsizei GLchar * source
void ** params
GLdouble s
[6]
Definition qopenglext.h:235
GLbyte GLbyte blue
Definition qopenglext.h:385
GLenum func
Definition qopenglext.h:663
GLuint renderbuffer
GLenum precisiontype
GLuint shader
Definition qopenglext.h:665
typedef GLbitfield(APIENTRYP PFNGLQUERYMATRIXXOESPROC)(GLfixed *mantissa
const GLuint GLenum binaryformat
const GLuint * framebuffers
GLsizei const void * pointer
Definition qopenglext.h:384
GLint GLenum GLboolean normalized
Definition qopenglext.h:752
GLuint framebuffer
GLsizei GLsizei GLuint * shaders
Definition qopenglext.h:677
const GLuint * renderbuffers
GLuint64EXT * result
[6]
GLfloat GLfloat GLfloat alpha
Definition qopenglext.h:418
GLbyte green
Definition qopenglext.h:385
GLenum GLenum renderbuffertarget
GLenum cap
GLenum GLint GLint * precision
GLsizeiptr const void GLenum usage
Definition qopenglext.h:543
GLboolean invert
Definition qopenglext.h:226
#define QT_OPENGL_FUNCTIONS(F)
#define QT_OPENGL_DECLARE(FUNCTIONS)
#define Q_OPENGL_FUNCTIONS_DEBUG
#define Q_ASSERT(cond)
Definition qrandom.cpp:47
#define GLuint
QGraphicsSvgItem * red
QOpenGLFunctionsPrivate(QOpenGLContext *ctx)