Qt 4.8
qglextensions.cpp
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/legal
5 **
6 ** This file is part of the QtOpenGL 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 Digia. For licensing terms and
14 ** conditions see http://qt.digia.com/licensing. For further information
15 ** use the contact form at http://qt.digia.com/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 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 **
25 ** In addition, as a special exception, Digia gives you certain additional
26 ** rights. These rights are described in the Digia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 **
29 ** GNU General Public License Usage
30 ** Alternatively, this file may be used under the terms of the GNU
31 ** General Public License version 3.0 as published by the Free Software
32 ** Foundation and appearing in the file LICENSE.GPL included in the
33 ** packaging of this file. Please review the following information to
34 ** ensure the GNU General Public License version 3.0 requirements will be
35 ** met: http://www.gnu.org/copyleft/gpl.html.
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41 
42 #include "qgl_p.h"
43 #include <qglframebufferobject.h>
44 
46 
47 static void *qt_gl_getProcAddress_search
48  (QGLContext *ctx, const char *name1, const char *name2,
49  const char *name3, const char *name4)
50 {
51  void *addr;
52 
53  addr = ctx->getProcAddress(QLatin1String(name1));
54  if (addr)
55  return addr;
56 
57  addr = ctx->getProcAddress(QLatin1String(name2));
58  if (addr)
59  return addr;
60 
61  addr = ctx->getProcAddress(QLatin1String(name3));
62  if (addr)
63  return addr;
64 
65  if (name4)
66  return ctx->getProcAddress(QLatin1String(name4));
67 
68  return 0;
69 }
70 
71 // Search for an extension function starting with the most likely
72 // function suffix first, and then trying the other variations.
73 #if defined(QT_OPENGL_ES)
74 #define qt_gl_getProcAddress(ctx,name) \
75  qt_gl_getProcAddress_search((ctx), name, name "OES", name "EXT", name "ARB")
76 #define qt_gl_getProcAddressEXT(ctx,name) \
77  qt_gl_getProcAddress_search((ctx), name "OES", name, name "EXT", name "ARB")
78 #define qt_gl_getProcAddressARB(ctx,name) \
79  qt_gl_getProcAddress_search((ctx), name "OES", name, name "ARB", name "EXT")
80 #define qt_gl_getProcAddressOES(ctx,name) \
81  qt_gl_getProcAddress_search((ctx), name "OES", name, name "EXT", name "ARB")
82 #else
83 #define qt_gl_getProcAddress(ctx,name) \
84  qt_gl_getProcAddress_search((ctx), name, name "ARB", name "EXT", 0)
85 #define qt_gl_getProcAddressEXT(ctx,name) \
86  qt_gl_getProcAddress_search((ctx), name "EXT", name, name "ARB", 0)
87 #define qt_gl_getProcAddressARB(ctx,name) \
88  qt_gl_getProcAddress_search((ctx), name "ARB", name, name "EXT", 0)
89 #define qt_gl_getProcAddressOES(ctx,name) \
90  qt_gl_getProcAddress_search((ctx), name "OES", name, name "EXT", name "ARB")
91 #endif
92 
94 {
95 #if defined(QT_OPENGL_ES_2)
96  static bool have_resolved = false;
97  if (have_resolved)
98  return true;
99  have_resolved = true;
100 #else
101  if (glIsRenderbuffer != 0)
102  return true;
103 #endif
104 
105  if (ctx == 0) {
106  qWarning("QGLFramebufferObject: Unable to resolve framebuffer object extensions -"
107  " make sure there is a current context when creating the framebuffer object.");
108  return false;
109  }
110 
111 
114  (_glRenderbufferStorageMultisampleEXT) qt_gl_getProcAddressEXT(ctx, "glRenderbufferStorageMultisample");
115 
116 #if !defined(QT_OPENGL_ES_2)
117  glIsRenderbuffer = (_glIsRenderbuffer) qt_gl_getProcAddressEXT(ctx, "glIsRenderbuffer");
118  if (!glIsRenderbuffer)
119  return false; // Not much point searching for anything else.
120  glBindRenderbuffer = (_glBindRenderbuffer) qt_gl_getProcAddressEXT(ctx, "glBindRenderbuffer");
121  glDeleteRenderbuffers = (_glDeleteRenderbuffers) qt_gl_getProcAddressEXT(ctx, "glDeleteRenderbuffers");
122  glGenRenderbuffers = (_glGenRenderbuffers) qt_gl_getProcAddressEXT(ctx, "glGenRenderbuffers");
123  glRenderbufferStorage = (_glRenderbufferStorage) qt_gl_getProcAddressEXT(ctx, "glRenderbufferStorage");
125  (_glGetRenderbufferParameteriv) qt_gl_getProcAddressEXT(ctx, "glGetRenderbufferParameteriv");
126  glIsFramebuffer = (_glIsFramebuffer) qt_gl_getProcAddressEXT(ctx, "glIsFramebuffer");
127  glBindFramebuffer = (_glBindFramebuffer) qt_gl_getProcAddressEXT(ctx, "glBindFramebuffer");
128  glDeleteFramebuffers = (_glDeleteFramebuffers) qt_gl_getProcAddressEXT(ctx, "glDeleteFramebuffers");
129  glGenFramebuffers = (_glGenFramebuffers) qt_gl_getProcAddressEXT(ctx, "glGenFramebuffers");
134  (_glGetFramebufferAttachmentParameteriv) qt_gl_getProcAddressEXT(ctx, "glGetFramebufferAttachmentParameteriv");
135  glGenerateMipmap = (_glGenerateMipmap) qt_gl_getProcAddressEXT(ctx, "glGenerateMipmap");
136 
137  return glIsRenderbuffer != 0;
138 #else
139  return true;
140 #endif
141 }
142 
143 #if !defined(QT_OPENGL_ES_2)
145 {
146  if (glMultiTexCoord4f != 0)
147  return true;
148 
150  glMultiTexCoord4f = (_glMultiTexCoord4f) ctx->getProcAddress(QLatin1String("glMultiTexCoord4f"));
151 
152  glActiveTexture = (_glActiveTexture) ctx->getProcAddress(QLatin1String("glActiveTexture"));
154 }
155 #endif
156 
157 #if !defined(QT_OPENGL_ES_2)
159 {
160  if (glActiveStencilFaceEXT != 0)
161  return true;
162 
165 
166  return glActiveStencilFaceEXT;
167 }
168 #endif
169 
170 
171 #if !defined(QT_OPENGL_ES_2)
173 {
174  if (glProgramStringARB != 0)
175  return true;
176 
177  // ARB_fragment_program
178  glProgramStringARB = (_glProgramStringARB) ctx->getProcAddress(QLatin1String("glProgramStringARB"));
179  glBindProgramARB = (_glBindProgramARB) ctx->getProcAddress(QLatin1String("glBindProgramARB"));
180  glDeleteProgramsARB = (_glDeleteProgramsARB) ctx->getProcAddress(QLatin1String("glDeleteProgramsARB"));
181  glGenProgramsARB = (_glGenProgramsARB) ctx->getProcAddress(QLatin1String("glGenProgramsARB"));
183 
184  return glProgramStringARB
189 }
190 #endif
191 
192 
194 {
195  if (!QGLContextPrivate::extensionFuncs(ctx).qt_bufferFuncsResolved) {
196 #if defined(QGL_RESOLVE_BUFFER_FUNCS)
197  glBindBuffer = (_glBindBuffer) qt_gl_getProcAddressARB(ctx, "glBindBuffer");
198  glDeleteBuffers = (_glDeleteBuffers) qt_gl_getProcAddressARB(ctx, "glDeleteBuffers");
199  glGenBuffers = (_glGenBuffers) qt_gl_getProcAddressARB(ctx, "glGenBuffers");
200  glBufferData = (_glBufferData) qt_gl_getProcAddressARB(ctx, "glBufferData");
201  glBufferSubData = (_glBufferSubData) qt_gl_getProcAddressARB(ctx, "glBufferSubData");
202  glGetBufferSubData = (_glGetBufferSubData) qt_gl_getProcAddressARB(ctx, "glGetBufferSubData");
204 #endif
205 
206 #ifdef QT_OPENGL_ES_2
208  if (extensions.match("GL_OES_mapbuffer")) {
209  glMapBufferARB = (_glMapBufferARB) qt_gl_getProcAddressARB(ctx, "glMapBufferOES");
210  glUnmapBufferARB = (_glUnmapBufferARB) qt_gl_getProcAddressARB(ctx, "glUnmapBufferOES");
211  }
212 #else
215 #endif
216 
218  }
219 
220 #if defined(QGL_RESOLVE_BUFFER_FUNCS)
221  return glBindBuffer
222  && glDeleteBuffers
223  && glGenBuffers
224  && glBufferData
225  && glBufferSubData
227  // glGetBufferSubData() is optional
228 #else
229  return true;
230 #endif
231 }
232 
233 #ifndef QT_NO_EGL
235 {
237  return true;
241 }
242 #endif
243 
245 {
246 
247 #if defined(QT_OPENGL_ES_2)
248  // The GLSL shader functions are always present in OpenGL/ES 2.0.
249  // The only exceptions are glGetProgramBinaryOES and glProgramBinaryOES.
250  if (!QGLContextPrivate::extensionFuncs(ctx).qt_glslResolved) {
251  glGetProgramBinaryOES = (_glGetProgramBinaryOES) ctx->getProcAddress(QLatin1String("glGetProgramBinaryOES"));
252  glProgramBinaryOES = (_glProgramBinaryOES) ctx->getProcAddress(QLatin1String("glProgramBinaryOES"));
253  QGLContextPrivate::extensionFuncs(ctx).qt_glslResolved = true;
254  }
255  return true;
256 #else
257  if (glCreateShader)
258  return true;
259 
260  // Geometry shaders are optional...
265 
266  // Must at least have the FragmentShader extension to continue.
268  return false;
269 
270  glCreateShader = (_glCreateShader) ctx->getProcAddress(QLatin1String("glCreateShader"));
271  if (glCreateShader) {
272  glShaderSource = (_glShaderSource) ctx->getProcAddress(QLatin1String("glShaderSource"));
273  glShaderBinary = (_glShaderBinary) ctx->getProcAddress(QLatin1String("glShaderBinary"));
274  glCompileShader = (_glCompileShader) ctx->getProcAddress(QLatin1String("glCompileShader"));
275  glDeleteShader = (_glDeleteShader) ctx->getProcAddress(QLatin1String("glDeleteShader"));
276  glIsShader = (_glIsShader) ctx->getProcAddress(QLatin1String("glIsShader"));
277 
278  glCreateProgram = (_glCreateProgram) ctx->getProcAddress(QLatin1String("glCreateProgram"));
279  glAttachShader = (_glAttachShader) ctx->getProcAddress(QLatin1String("glAttachShader"));
280  glDetachShader = (_glDetachShader) ctx->getProcAddress(QLatin1String("glDetachShader"));
281  glLinkProgram = (_glLinkProgram) ctx->getProcAddress(QLatin1String("glLinkProgram"));
282  glUseProgram = (_glUseProgram) ctx->getProcAddress(QLatin1String("glUseProgram"));
283  glDeleteProgram = (_glDeleteProgram) ctx->getProcAddress(QLatin1String("glDeleteProgram"));
284  glIsProgram = (_glIsProgram) ctx->getProcAddress(QLatin1String("glIsProgram"));
285 
286  glGetShaderInfoLog = (_glGetShaderInfoLog) ctx->getProcAddress(QLatin1String("glGetShaderInfoLog"));
287  glGetShaderiv = (_glGetShaderiv) ctx->getProcAddress(QLatin1String("glGetShaderiv"));
288  glGetShaderSource = (_glGetShaderSource) ctx->getProcAddress(QLatin1String("glGetShaderSource"));
289  glGetProgramiv = (_glGetProgramiv) ctx->getProcAddress(QLatin1String("glGetProgramiv"));
290  glGetProgramInfoLog = (_glGetProgramInfoLog) ctx->getProcAddress(QLatin1String("glGetProgramInfoLog"));
291 
293  glUniform4fv = (_glUniform4fv) ctx->getProcAddress(QLatin1String("glUniform4fv"));
294  glUniform3fv = (_glUniform3fv) ctx->getProcAddress(QLatin1String("glUniform3fv"));
295  glUniform2fv = (_glUniform2fv) ctx->getProcAddress(QLatin1String("glUniform2fv"));
296  glUniform1fv = (_glUniform1fv) ctx->getProcAddress(QLatin1String("glUniform1fv"));
297  glUniform1i = (_glUniform1i) ctx->getProcAddress(QLatin1String("glUniform1i"));
298  glUniform1iv = (_glUniform1iv) ctx->getProcAddress(QLatin1String("glUniform1iv"));
299  glUniformMatrix2fv = (_glUniformMatrix2fv) ctx->getProcAddress(QLatin1String("glUniformMatrix2fv"));
300  glUniformMatrix3fv = (_glUniformMatrix3fv) ctx->getProcAddress(QLatin1String("glUniformMatrix3fv"));
301  glUniformMatrix4fv = (_glUniformMatrix4fv) ctx->getProcAddress(QLatin1String("glUniformMatrix4fv"));
308 
310  glGetAttribLocation = (_glGetAttribLocation) ctx->getProcAddress(QLatin1String("glGetAttribLocation"));
311  glVertexAttrib1fv = (_glVertexAttrib1fv) ctx->getProcAddress(QLatin1String("glVertexAttrib1fv"));
312  glVertexAttrib2fv = (_glVertexAttrib2fv) ctx->getProcAddress(QLatin1String("glVertexAttrib2fv"));
313  glVertexAttrib3fv = (_glVertexAttrib3fv) ctx->getProcAddress(QLatin1String("glVertexAttrib3fv"));
314  glVertexAttrib4fv = (_glVertexAttrib4fv) ctx->getProcAddress(QLatin1String("glVertexAttrib4fv"));
318 
319  } else {
320  // We may not have the standard shader functions, but we might
321  // have the older ARB functions instead.
322  glCreateShader = (_glCreateShader) ctx->getProcAddress(QLatin1String("glCreateShaderObjectARB"));
323  glShaderSource = (_glShaderSource) ctx->getProcAddress(QLatin1String("glShaderSourceARB"));
324  glShaderBinary = (_glShaderBinary) ctx->getProcAddress(QLatin1String("glShaderBinaryARB"));
325  glCompileShader = (_glCompileShader) ctx->getProcAddress(QLatin1String("glCompileShaderARB"));
326  glDeleteShader = (_glDeleteShader) ctx->getProcAddress(QLatin1String("glDeleteObjectARB"));
327  glIsShader = 0;
328 
329  glCreateProgram = (_glCreateProgram) ctx->getProcAddress(QLatin1String("glCreateProgramObjectARB"));
330  glAttachShader = (_glAttachShader) ctx->getProcAddress(QLatin1String("glAttachObjectARB"));
331  glDetachShader = (_glDetachShader) ctx->getProcAddress(QLatin1String("glDetachObjectARB"));
332  glLinkProgram = (_glLinkProgram) ctx->getProcAddress(QLatin1String("glLinkProgramARB"));
333  glUseProgram = (_glUseProgram) ctx->getProcAddress(QLatin1String("glUseProgramObjectARB"));
334  glDeleteProgram = (_glDeleteProgram) ctx->getProcAddress(QLatin1String("glDeleteObjectARB"));
335  glIsProgram = 0;
336 
338  glGetShaderiv = (_glGetShaderiv) ctx->getProcAddress(QLatin1String("glGetObjectParameterivARB"));
339  glGetShaderSource = (_glGetShaderSource) ctx->getProcAddress(QLatin1String("glGetShaderSourceARB"));
340  glGetProgramiv = (_glGetProgramiv) ctx->getProcAddress(QLatin1String("glGetObjectParameterivARB"));
342 
343  glGetUniformLocation = (_glGetUniformLocation) ctx->getProcAddress(QLatin1String("glGetUniformLocationARB"));
344  glUniform4fv = (_glUniform4fv) ctx->getProcAddress(QLatin1String("glUniform4fvARB"));
345  glUniform3fv = (_glUniform3fv) ctx->getProcAddress(QLatin1String("glUniform3fvARB"));
346  glUniform2fv = (_glUniform2fv) ctx->getProcAddress(QLatin1String("glUniform2fvARB"));
347  glUniform1fv = (_glUniform1fv) ctx->getProcAddress(QLatin1String("glUniform1fvARB"));
348  glUniform1i = (_glUniform1i) ctx->getProcAddress(QLatin1String("glUniform1iARB"));
349  glUniform1iv = (_glUniform1iv) ctx->getProcAddress(QLatin1String("glUniform1ivARB"));
350  glUniformMatrix2fv = (_glUniformMatrix2fv) ctx->getProcAddress(QLatin1String("glUniformMatrix2fvARB"));
351  glUniformMatrix3fv = (_glUniformMatrix3fv) ctx->getProcAddress(QLatin1String("glUniformMatrix3fvARB"));
352  glUniformMatrix4fv = (_glUniformMatrix4fv) ctx->getProcAddress(QLatin1String("glUniformMatrix4fvARB"));
353  glUniformMatrix2x3fv = (_glUniformMatrix2x3fv) ctx->getProcAddress(QLatin1String("glUniformMatrix2x3fvARB"));
354  glUniformMatrix2x4fv = (_glUniformMatrix2x4fv) ctx->getProcAddress(QLatin1String("glUniformMatrix2x4fvARB"));
355  glUniformMatrix3x2fv = (_glUniformMatrix3x2fv) ctx->getProcAddress(QLatin1String("glUniformMatrix3x2fvARB"));
356  glUniformMatrix3x4fv = (_glUniformMatrix3x4fv) ctx->getProcAddress(QLatin1String("glUniformMatrix3x4fvARB"));
357  glUniformMatrix4x2fv = (_glUniformMatrix4x2fv) ctx->getProcAddress(QLatin1String("glUniformMatrix4x2fvARB"));
358  glUniformMatrix4x3fv = (_glUniformMatrix4x3fv) ctx->getProcAddress(QLatin1String("glUniformMatrix4x3fvARB"));
359 
360  glBindAttribLocation = (_glBindAttribLocation) ctx->getProcAddress(QLatin1String("glBindAttribLocationARB"));
361  glGetAttribLocation = (_glGetAttribLocation) ctx->getProcAddress(QLatin1String("glGetAttribLocationARB"));
362  glVertexAttrib1fv = (_glVertexAttrib1fv) ctx->getProcAddress(QLatin1String("glVertexAttrib1fvARB"));
363  glVertexAttrib2fv = (_glVertexAttrib2fv) ctx->getProcAddress(QLatin1String("glVertexAttrib2fvARB"));
364  glVertexAttrib3fv = (_glVertexAttrib3fv) ctx->getProcAddress(QLatin1String("glVertexAttrib3fvARB"));
365  glVertexAttrib4fv = (_glVertexAttrib4fv) ctx->getProcAddress(QLatin1String("glVertexAttrib4fvARB"));
366  glVertexAttribPointer = (_glVertexAttribPointer) ctx->getProcAddress(QLatin1String("glVertexAttribPointerARB"));
367  glDisableVertexAttribArray = (_glDisableVertexAttribArray) ctx->getProcAddress(QLatin1String("glDisableVertexAttribArrayARB"));
368  glEnableVertexAttribArray = (_glEnableVertexAttribArray) ctx->getProcAddress(QLatin1String("glEnableVertexAttribArrayARB"));
369  }
370 
371  // Note: glShaderBinary(), glIsShader(), glIsProgram(), and
372  // glUniformMatrixNxMfv() are optional, but all other functions
373  // are required.
374 
375  return glCreateShader &&
376  glShaderSource &&
377  glCompileShader &&
378  glDeleteProgram &&
379  glCreateProgram &&
380  glAttachShader &&
381  glDetachShader &&
382  glLinkProgram &&
383  glUseProgram &&
384  glDeleteProgram &&
386  glGetShaderiv &&
388  glGetProgramiv &&
391  glUniform1fv &&
392  glUniform2fv &&
393  glUniform3fv &&
394  glUniform4fv &&
395  glUniform1i &&
396  glUniform1iv &&
409 #endif
410 }
411 
412 #if !defined(QT_OPENGL_ES_2)
414 {
415  bool gl2supported = true;
416  if (!qt_resolve_glsl_extensions(ctx))
417  gl2supported = false;
418 
420  gl2supported = false;
421 
423  return gl2supported;
424 
425  glBlendColor = (_glBlendColor) ctx->getProcAddress(QLatin1String("glBlendColor"));
426  glStencilOpSeparate = (_glStencilOpSeparate) ctx->getProcAddress(QLatin1String("glStencilOpSeparate"));
428  gl2supported = false;
429 
430  return gl2supported;
431 }
432 #endif
433 
434 
bool qt_resolve_version_1_3_functions(QGLContext *ctx)
void(APIENTRY * _glActiveStencilFaceEXT)(GLenum)
#define glMultiTexCoord4f
void(APIENTRY * _glUniformMatrix4x2fv)(GLint, GLsizei, GLboolean, const GLfloat *)
void(APIENTRY * _glGetFramebufferAttachmentParameteriv)(GLenum target, GLenum attachment, GLenum pname, GLint *params)
void(APIENTRY * _glUniformMatrix4x3fv)(GLint, GLsizei, GLboolean, const GLfloat *)
#define glDeleteProgramsARB
void(APIENTRY * _glProgramLocalParameter4fvARB)(GLenum, GLuint, const GLfloat *)
#define glCreateProgram
#define glUseProgram
GLvoid *(APIENTRY * _glMapBufferARB)(GLenum, GLenum)
#define glUniform3fv
#define QT_END_NAMESPACE
This macro expands to.
Definition: qglobal.h:90
#define glFramebufferTextureEXT
void(APIENTRY * _glUniformMatrix2x3fv)(GLint, GLsizei, GLboolean, const GLfloat *)
#define glIsFramebuffer
#define glShaderBinary
void(APIENTRY * _glUniformMatrix4fv)(GLint, GLsizei, GLboolean, const GLfloat *)
GLint(APIENTRY * _glGetAttribLocation)(GLuint, const char *)
#define glUniform1iv
#define glStencilOpSeparate
GLuint(APIENTRY * _glCreateShader)(GLenum)
GLenum(APIENTRY * _glCheckFramebufferStatus)(GLenum target)
#define qt_gl_getProcAddressARB(ctx, name)
#define glGetShaderSource
#define glBufferSubData
#define glIsShader
GLboolean(APIENTRY * _glIsFramebuffer)(GLuint framebuffer)
void(APIENTRY * _glDeleteFramebuffers)(GLsizei n, const GLuint *framebuffers)
#define glUniform2fv
void(APIENTRY * _glBindFramebuffer)(GLenum target, GLuint framebuffer)
#define glGetFramebufferAttachmentParameteriv
void(APIENTRY * _glShaderSource)(GLuint, GLsizei, const char **, const GLint *)
#define glFramebufferTextureFaceEXT
#define glGenRenderbuffers
void(APIENTRY * _glMultiTexCoord4f)(GLenum, GLfloat, GLfloat, GLfloat, GLfloat)
void(APIENTRY * _glDeleteProgramsARB)(GLsizei, const GLuint *)
#define glBindAttribLocation
bool qt_resolve_framebufferobject_extensions(QGLContext *ctx)
void(APIENTRY * _glUniform4fv)(GLint, GLsizei, const GLfloat *)
#define glVertexAttribPointer
Definition: glfunctions.h:71
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
#define glVertexAttrib3fv
#define glVertexAttrib2fv
void * getProcAddress(const QString &proc) const
Returns a function pointer to the GL extension function passed in proc.
Definition: qgl_egl.cpp:379
void(APIENTRY * _glUniform3fv)(GLint, GLsizei, const GLfloat *)
void(APIENTRY * _glGetRenderbufferParameteriv)(GLenum target, GLenum pname, GLint *params)
#define glEnableVertexAttribArray
void(APIENTRY * _glAttachShader)(GLuint, GLuint)
#define glVertexAttrib1fv
void(APIENTRY * _glUseProgram)(GLuint)
void(APIENTRY * _glGetProgramBinaryOES)(GLuint, GLsizei, GLsizei *, GLenum *, void *)
#define glBindFramebuffer
void(APIENTRY * _glGetShaderSource)(GLuint, GLsizei, GLsizei *, char *)
Q_GUI_EXPORT QString extensions()
Definition: qegl.cpp:785
#define glRenderbufferStorageMultisampleEXT
void(APIENTRY * _glUniformMatrix2fv)(GLint, GLsizei, GLboolean, const GLfloat *)
#define glUniformMatrix3x2fv
#define glDeleteRenderbuffers
#define glGetAttribLocation
bool qt_resolve_glsl_extensions(QGLContext *ctx)
void(APIENTRY * _glBindAttribLocation)(GLuint, GLuint, const char *)
#define glFramebufferTextureLayerEXT
#define glVertexAttrib4fv
#define glGetBufferParameteriv
#define glShaderSource
void(APIENTRY * _glVertexAttribPointer)(GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *)
#define qt_gl_getProcAddressEXT(ctx, name)
bool qt_resolve_buffer_extensions(QGLContext *ctx)
void(APIENTRY * _glBindBuffer)(GLenum, GLuint)
#define glGenProgramsARB
void(APIENTRY * _glDetachShader)(GLuint, GLuint)
#define glBlitFramebufferEXT
void(APIENTRY * _glEGLImageTargetRenderbufferStorageOES)(GLenum, EGLImageKHR)
#define glUniformMatrix3fv
#define glLinkProgram
void(APIENTRY * _glEGLImageTargetTexture2DOES)(GLenum, EGLImageKHR)
void(APIENTRY * _glGetBufferParameteriv)(GLenum, GLenum, GLint *)
#define glGenBuffers
void(APIENTRY * _glBufferSubData)(GLenum, GLintptrARB, GLsizeiptrARB, const GLvoid *)
void(APIENTRY * _glGenProgramsARB)(GLsizei, GLuint *)
#define QT_BEGIN_NAMESPACE
This macro expands to.
Definition: qglobal.h:89
void(APIENTRY * _glUniform1fv)(GLint, GLsizei, const GLfloat *)
void(APIENTRY * _glUniformMatrix2x4fv)(GLint, GLsizei, GLboolean, const GLfloat *)
void(APIENTRY * _glRenderbufferStorageMultisampleEXT)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height)
void(APIENTRY * _glUniformMatrix3x2fv)(GLint, GLsizei, GLboolean, const GLfloat *)
void(APIENTRY * _glLinkProgram)(GLuint)
The QGLContext class encapsulates an OpenGL rendering context.
Definition: qgl.h:310
void(APIENTRY * _glBindRenderbuffer)(GLenum target, GLuint renderbuffer)
#define glCheckFramebufferStatus
GLboolean(APIENTRY * _glIsShader)(GLuint)
#define glUniformMatrix2x3fv
void(APIENTRY * _glBufferData)(GLenum, GLsizeiptrARB, const GLvoid *, GLenum)
#define glDeleteFramebuffers
#define glMapBufferARB
void(APIENTRY * _glRenderbufferStorage)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
void(APIENTRY * _glGenerateMipmap)(GLenum target)
#define glIsRenderbuffer
void(APIENTRY * _glBlitFramebufferEXT)(int srcX0, int srcY0, int srcX1, int srcY1, int dstX0, int dstY0, int dstX1, int dstY1, GLbitfield mask, GLenum filter)
void(APIENTRY * _glFramebufferTextureFaceEXT)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face)
bool qt_resolve_version_2_0_functions(QGLContext *ctx)
#define glIsProgram
Q_CORE_EXPORT void qWarning(const char *,...)
#define glGenFramebuffers
void(APIENTRY * _glStencilOpSeparate)(GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass)
The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal...
Definition: qstring.h:654
void(APIENTRY * _glFramebufferTextureEXT)(GLenum target, GLenum attachment, GLuint texture, GLint level)
#define glGetBufferSubData
#define glAttachShader
#define glBlendColor
void(APIENTRY * _glBindProgramARB)(GLenum, GLuint)
void(APIENTRY * _glGenRenderbuffers)(GLsizei n, GLuint *renderbuffers)
void(APIENTRY * _glProgramStringARB)(GLenum, GLenum, GLsizei, const GLvoid *)
void(APIENTRY * _glGetBufferSubData)(GLenum, GLintptrARB, GLsizeiptrARB, GLvoid *)
void(APIENTRY * _glFramebufferTextureLayerEXT)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer)
#define glGetShaderInfoLog
#define glUniformMatrix2x4fv
#define glUniformMatrix4x2fv
#define glUniform4fv
#define glGetRenderbufferParameteriv
#define glGetProgramiv
void(APIENTRY * _glProgramParameteriEXT)(GLuint program, GLenum pname, GLint value)
void(APIENTRY * _glGetProgramiv)(GLuint, GLenum, GLint *)
#define glBindRenderbuffer
#define glActiveStencilFaceEXT
#define glDeleteBuffers
#define glProgramLocalParameter4fvARB
#define glActiveTexture
Definition: glfunctions.h:69
void(APIENTRY * _glUniform1iv)(GLint, GLsizei, const GLint *)
void(APIENTRY * _glDeleteProgram)(GLuint)
void(APIENTRY * _glVertexAttrib3fv)(GLuint, const GLfloat *)
GLboolean(APIENTRY * _glIsRenderbuffer)(GLuint renderbuffer)
#define glEGLImageTargetRenderbufferStorageOES
void(APIENTRY * _glShaderBinary)(GLint, const GLuint *, GLenum, const void *, GLint)
void(APIENTRY * _glGetShaderiv)(GLuint, GLenum, GLint *)
void(APIENTRY * _glVertexAttrib4fv)(GLuint, const GLfloat *)
#define glUniform1i
#define glUniformMatrix3x4fv
GLboolean(APIENTRY * _glIsProgram)(GLuint)
#define glDetachShader
void(APIENTRY * _glDeleteShader)(GLuint)
#define glDisableVertexAttribArray
void(APIENTRY * _glGenBuffers)(GLsizei, GLuint *)
#define glUniformMatrix4fv
#define glProgramParameteriEXT
void(APIENTRY * _glUniformMatrix3x4fv)(GLint, GLsizei, GLboolean, const GLfloat *)
#define ctx
Definition: qgl.cpp:6094
void(APIENTRY * _glActiveTexture)(GLenum)
void(APIENTRY * _glCompileShader)(GLuint)
#define glCreateShader
void(APIENTRY * _glGenFramebuffers)(GLsizei n, GLuint *framebuffers)
static QGLFormat defaultFormat()
Definition: qgl.cpp:1518
#define glDeleteProgram
void(APIENTRY * _glDisableVertexAttribArray)(GLuint)
bool qt_resolve_eglimage_gl_extensions(QGLContext *ctx)
void(APIENTRY * _glVertexAttrib2fv)(GLuint, const GLfloat *)
void(APIENTRY * _glProgramBinaryOES)(GLuint, GLenum, const void *, GLint)
bool match(const char *str) const
Definition: qgl_p.h:906
#define glGetUniformLocation
void(APIENTRY * _glGetProgramInfoLog)(GLuint, GLsizei, GLsizei *, char *)
static Extensions glExtensions()
Definition: qgl.cpp:5781
void(APIENTRY * _glDeleteRenderbuffers)(GLsizei n, const GLuint *renderbuffers)
#define glGetShaderiv
#define glFramebufferRenderbuffer
static void * qt_gl_getProcAddress_search(QGLContext *ctx, const char *name1, const char *name2, const char *name3, const char *name4)
#define glCompileShader
void(APIENTRY * _glFramebufferRenderbuffer)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
void(APIENTRY * _glGetShaderInfoLog)(GLuint, GLsizei, GLsizei *, char *)
void(APIENTRY * _glDeleteBuffers)(GLsizei, const GLuint *)
void(APIENTRY * _glBlendColor)(GLclampf, GLclampf, GLclampf, GLclampf)
void(APIENTRY * _glUniform2fv)(GLint, GLsizei, const GLfloat *)
void(APIENTRY * _glEnableVertexAttribArray)(GLuint)
#define glUnmapBufferARB
#define glFramebufferTexture2D
#define glBindBuffer
GLuint(APIENTRY * _glCreateProgram)()
bool qt_resolve_frag_program_extensions(QGLContext *ctx)
void(APIENTRY * _glVertexAttrib1fv)(GLuint, const GLfloat *)
void(APIENTRY * _glFramebufferTexture2D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
void(APIENTRY * _glUniform1i)(GLint, GLint)
#define glUniformMatrix4x3fv
#define glUniformMatrix2fv
void(APIENTRY * _glUniformMatrix3fv)(GLint, GLsizei, GLboolean, const GLfloat *)
#define glGenerateMipmap
Definition: glfunctions.h:70
bool qt_resolve_stencil_face_extension(QGLContext *ctx)
#define glProgramStringARB
static QGLExtensionFuncs & extensionFuncs(const QGLContext *ctx)
Definition: qgl_p.h:467
#define glBindProgramARB
#define glRenderbufferStorage
#define glEGLImageTargetTexture2DOES
#define glUniform1fv
#define glGetProgramInfoLog
GLboolean(APIENTRY * _glUnmapBufferARB)(GLenum)
#define glBufferData
GLuint(APIENTRY * _glGetUniformLocation)(GLuint, const char *)
#define glDeleteShader