Line | Source Code | Coverage |
---|
1 | | - |
2 | | - |
3 | struct QGLFunctionsPrivateEx : public QGLFunctionsPrivate, public QOpenGLSharedResource | - |
4 | { | - |
5 | QGLFunctionsPrivateEx(QOpenGLContext *context) | - |
6 | : QGLFunctionsPrivate(QGLContext::fromOpenGLContext(context)) | - |
7 | , QOpenGLSharedResource(context->shareGroup()) | - |
8 | , m_features(-1) {} | 0 |
9 | | - |
10 | void invalidateResource() | - |
11 | { | - |
12 | m_features = -1; | - |
13 | } | 0 |
14 | | - |
15 | void freeResource(QOpenGLContext *) | - |
16 | { | - |
17 | | - |
18 | } | - |
19 | | - |
20 | int m_features; | - |
21 | }; | - |
22 | | - |
23 | static QOpenGLMultiGroupSharedResource *qt_gl_functions_resource() { static QGlobalStatic<QOpenGLMultiGroupSharedResource > thisGlobalStatic = { { (0) }, false }; if (!thisGlobalStatic.pointer.load() && !thisGlobalStatic.destroyed) { QOpenGLMultiGroupSharedResource *x = new QOpenGLMultiGroupSharedResource; if (!thisGlobalStatic.pointer.testAndSetOrdered(0, x)) delete x; else static QGlobalStaticDeleter<QOpenGLMultiGroupSharedResource > cleanup(thisGlobalStatic); } return thisGlobalStatic.pointer.load(); } never executed: delete x; never executed: return thisGlobalStatic.pointer.load(); never evaluated: !thisGlobalStatic.pointer.testAndSetOrdered(0, x) never evaluated: !thisGlobalStatic.pointer.load() never evaluated: !thisGlobalStatic.destroyed | 0 |
24 | | - |
25 | static QGLFunctionsPrivateEx *qt_gl_functions(const QGLContext *context = 0) | - |
26 | { | - |
27 | if (!context) never evaluated: !context | 0 |
28 | context = QGLContext::currentContext(); never executed: context = QGLContext::currentContext(); | 0 |
29 | qt_noop(); | - |
30 | QGLFunctionsPrivateEx *funcs = | - |
31 | reinterpret_cast<QGLFunctionsPrivateEx *> | - |
32 | (qt_gl_functions_resource()->value<QGLFunctionsPrivateEx>(context->contextHandle())); | - |
33 | return funcs; never executed: return funcs; | 0 |
34 | } | - |
35 | QGLFunctions::QGLFunctions() | - |
36 | : d_ptr(0) | - |
37 | { | - |
38 | } | 0 |
39 | QGLFunctions::QGLFunctions(const QGLContext *context) | - |
40 | : d_ptr(qt_gl_functions(context)) | - |
41 | { | - |
42 | } | 0 |
43 | | - |
44 | | - |
45 | | - |
46 | | - |
47 | | - |
48 | | - |
49 | | - |
50 | static int qt_gl_resolve_features() | - |
51 | { | - |
52 | int features = 0; | - |
53 | QGLFormat::OpenGLVersionFlags versions = QGLFormat::openGLVersionFlags(); | - |
54 | QGLExtensionMatcher extensions; | - |
55 | | - |
56 | | - |
57 | if (extensions.match("GL_ARB_multitexture")) never evaluated: extensions.match("GL_ARB_multitexture") | 0 |
58 | features |= QGLFunctions::Multitexture; never executed: features |= QGLFunctions::Multitexture; | 0 |
59 | if (extensions.match("GL_ARB_shader_objects")) never evaluated: extensions.match("GL_ARB_shader_objects") | 0 |
60 | features |= QGLFunctions::Shaders; never executed: features |= QGLFunctions::Shaders; | 0 |
61 | if (extensions.match("GL_EXT_framebuffer_object") || never evaluated: extensions.match("GL_EXT_framebuffer_object") | 0 |
62 | extensions.match("GL_ARB_framebuffer_object")) never evaluated: extensions.match("GL_ARB_framebuffer_object") | 0 |
63 | features |= QGLFunctions::Framebuffers; never executed: features |= QGLFunctions::Framebuffers; | 0 |
64 | if (extensions.match("GL_EXT_blend_color")) never evaluated: extensions.match("GL_EXT_blend_color") | 0 |
65 | features |= QGLFunctions::BlendColor; never executed: features |= QGLFunctions::BlendColor; | 0 |
66 | if (extensions.match("GL_EXT_blend_equation_separate")) never evaluated: extensions.match("GL_EXT_blend_equation_separate") | 0 |
67 | features |= QGLFunctions::BlendEquationSeparate; never executed: features |= QGLFunctions::BlendEquationSeparate; | 0 |
68 | if (extensions.match("GL_EXT_blend_func_separate")) never evaluated: extensions.match("GL_EXT_blend_func_separate") | 0 |
69 | features |= QGLFunctions::BlendFuncSeparate; never executed: features |= QGLFunctions::BlendFuncSeparate; | 0 |
70 | if (extensions.match("GL_EXT_blend_subtract")) never evaluated: extensions.match("GL_EXT_blend_subtract") | 0 |
71 | features |= QGLFunctions::BlendSubtract; never executed: features |= QGLFunctions::BlendSubtract; | 0 |
72 | if (extensions.match("GL_ARB_texture_compression")) never evaluated: extensions.match("GL_ARB_texture_compression") | 0 |
73 | features |= QGLFunctions::CompressedTextures; never executed: features |= QGLFunctions::CompressedTextures; | 0 |
74 | if (extensions.match("GL_ARB_multisample")) never evaluated: extensions.match("GL_ARB_multisample") | 0 |
75 | features |= QGLFunctions::Multisample; never executed: features |= QGLFunctions::Multisample; | 0 |
76 | if (extensions.match("GL_ARB_texture_non_power_of_two")) never evaluated: extensions.match("GL_ARB_texture_non_power_of_two") | 0 |
77 | features |= QGLFunctions::NPOTTextures; never executed: features |= QGLFunctions::NPOTTextures; | 0 |
78 | | - |
79 | | - |
80 | if (versions & QGLFormat::OpenGL_Version_1_2) { never evaluated: versions & QGLFormat::OpenGL_Version_1_2 | 0 |
81 | features |= QGLFunctions::BlendColor | | - |
82 | QGLFunctions::BlendEquation; | - |
83 | } | 0 |
84 | if (versions & QGLFormat::OpenGL_Version_1_3) { never evaluated: versions & QGLFormat::OpenGL_Version_1_3 | 0 |
85 | features |= QGLFunctions::Multitexture | | - |
86 | QGLFunctions::CompressedTextures | | - |
87 | QGLFunctions::Multisample; | - |
88 | } | 0 |
89 | if (versions & QGLFormat::OpenGL_Version_1_4) never evaluated: versions & QGLFormat::OpenGL_Version_1_4 | 0 |
90 | features |= QGLFunctions::BlendFuncSeparate; never executed: features |= QGLFunctions::BlendFuncSeparate; | 0 |
91 | if (versions & QGLFormat::OpenGL_Version_1_5) never evaluated: versions & QGLFormat::OpenGL_Version_1_5 | 0 |
92 | features |= QGLFunctions::Buffers; never executed: features |= QGLFunctions::Buffers; | 0 |
93 | if (versions & QGLFormat::OpenGL_Version_2_0) { never evaluated: versions & QGLFormat::OpenGL_Version_2_0 | 0 |
94 | features |= QGLFunctions::Shaders | | - |
95 | QGLFunctions::StencilSeparate | | - |
96 | QGLFunctions::BlendEquationSeparate | | - |
97 | QGLFunctions::NPOTTextures; | - |
98 | } | 0 |
99 | return features; never executed: return features; | 0 |
100 | | - |
101 | } | - |
102 | QGLFunctions::OpenGLFeatures QGLFunctions::openGLFeatures() const | - |
103 | { | - |
104 | QGLFunctionsPrivateEx *d = static_cast<QGLFunctionsPrivateEx *>(d_ptr); | - |
105 | if (!d) | 0 |
106 | return 0; never executed: return 0; | 0 |
107 | if (d->m_features == -1) never evaluated: d->m_features == -1 | 0 |
108 | d->m_features = qt_gl_resolve_features(); never executed: d->m_features = qt_gl_resolve_features(); | 0 |
109 | return QGLFunctions::OpenGLFeatures(d->m_features); never executed: return QGLFunctions::OpenGLFeatures(d->m_features); | 0 |
110 | } | - |
111 | bool QGLFunctions::hasOpenGLFeature(QGLFunctions::OpenGLFeature feature) const | - |
112 | { | - |
113 | QGLFunctionsPrivateEx *d = static_cast<QGLFunctionsPrivateEx *>(d_ptr); | - |
114 | if (!d) | 0 |
115 | return false; never executed: return false; | 0 |
116 | if (d->m_features == -1) never evaluated: d->m_features == -1 | 0 |
117 | d->m_features = qt_gl_resolve_features(); never executed: d->m_features = qt_gl_resolve_features(); | 0 |
118 | return (d->m_features & int(feature)) != 0; never executed: return (d->m_features & int(feature)) != 0; | 0 |
119 | } | - |
120 | void QGLFunctions::initializeGLFunctions(const QGLContext *context) | - |
121 | { | - |
122 | d_ptr = qt_gl_functions(context); | - |
123 | } | 0 |
124 | static void qglfResolveActiveTexture(GLenum texture) | - |
125 | { | - |
126 | typedef void ( * type_glActiveTexture)(GLenum texture); | - |
127 | | - |
128 | const QGLContext *context = QGLContext::currentContext(); | - |
129 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
130 | | - |
131 | funcs->activeTexture = (type_glActiveTexture) | - |
132 | context->getProcAddress(QLatin1String("glActiveTexture")); | - |
133 | if (!funcs->activeTexture) { never evaluated: !funcs->activeTexture | 0 |
134 | funcs->activeTexture = (type_glActiveTexture) | - |
135 | context->getProcAddress(QLatin1String("glActiveTextureARB")); | - |
136 | } | 0 |
137 | | - |
138 | if (funcs->activeTexture) never evaluated: funcs->activeTexture | 0 |
139 | funcs->activeTexture(texture); never executed: funcs->activeTexture(texture); | 0 |
140 | else | - |
141 | funcs->activeTexture = qglfResolveActiveTexture; never executed: funcs->activeTexture = qglfResolveActiveTexture; | 0 |
142 | } | - |
143 | | - |
144 | static void qglfResolveAttachShader(GLuint program, GLuint shader) | - |
145 | { | - |
146 | typedef void ( * type_glAttachShader)(GLuint program, GLuint shader); | - |
147 | | - |
148 | const QGLContext *context = QGLContext::currentContext(); | - |
149 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
150 | | - |
151 | funcs->attachShader = (type_glAttachShader) | - |
152 | context->getProcAddress(QLatin1String("glAttachShader")); | - |
153 | if (!funcs->attachShader) { never evaluated: !funcs->attachShader | 0 |
154 | funcs->attachShader = (type_glAttachShader) | - |
155 | context->getProcAddress(QLatin1String("glAttachObjectARB")); | - |
156 | } | 0 |
157 | | - |
158 | if (funcs->attachShader) never evaluated: funcs->attachShader | 0 |
159 | funcs->attachShader(program, shader); never executed: funcs->attachShader(program, shader); | 0 |
160 | else | - |
161 | funcs->attachShader = qglfResolveAttachShader; never executed: funcs->attachShader = qglfResolveAttachShader; | 0 |
162 | } | - |
163 | | - |
164 | static void qglfResolveBindAttribLocation(GLuint program, GLuint index, const char* name) | - |
165 | { | - |
166 | typedef void ( * type_glBindAttribLocation)(GLuint program, GLuint index, const char* name); | - |
167 | | - |
168 | const QGLContext *context = QGLContext::currentContext(); | - |
169 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
170 | | - |
171 | funcs->bindAttribLocation = (type_glBindAttribLocation) | - |
172 | context->getProcAddress(QLatin1String("glBindAttribLocation")); | - |
173 | if (!funcs->bindAttribLocation) { never evaluated: !funcs->bindAttribLocation | 0 |
174 | funcs->bindAttribLocation = (type_glBindAttribLocation) | - |
175 | context->getProcAddress(QLatin1String("glBindAttribLocationARB")); | - |
176 | } | 0 |
177 | | - |
178 | if (funcs->bindAttribLocation) never evaluated: funcs->bindAttribLocation | 0 |
179 | funcs->bindAttribLocation(program, index, name); never executed: funcs->bindAttribLocation(program, index, name); | 0 |
180 | else | - |
181 | funcs->bindAttribLocation = qglfResolveBindAttribLocation; never executed: funcs->bindAttribLocation = qglfResolveBindAttribLocation; | 0 |
182 | } | - |
183 | | - |
184 | static void qglfResolveBindBuffer(GLenum target, GLuint buffer) | - |
185 | { | - |
186 | typedef void ( * type_glBindBuffer)(GLenum target, GLuint buffer); | - |
187 | | - |
188 | const QGLContext *context = QGLContext::currentContext(); | - |
189 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
190 | | - |
191 | funcs->bindBuffer = (type_glBindBuffer) | - |
192 | context->getProcAddress(QLatin1String("glBindBuffer")); | - |
193 | | - |
194 | | - |
195 | | - |
196 | | - |
197 | | - |
198 | | - |
199 | if (!funcs->bindBuffer) { never evaluated: !funcs->bindBuffer | 0 |
200 | funcs->bindBuffer = (type_glBindBuffer) | - |
201 | context->getProcAddress(QLatin1String("glBindBufferEXT")); | - |
202 | } | 0 |
203 | if (!funcs->bindBuffer) { never evaluated: !funcs->bindBuffer | 0 |
204 | funcs->bindBuffer = (type_glBindBuffer) | - |
205 | context->getProcAddress(QLatin1String("glBindBufferARB")); | - |
206 | } | 0 |
207 | | - |
208 | if (funcs->bindBuffer) never evaluated: funcs->bindBuffer | 0 |
209 | funcs->bindBuffer(target, buffer); never executed: funcs->bindBuffer(target, buffer); | 0 |
210 | else | - |
211 | funcs->bindBuffer = qglfResolveBindBuffer; never executed: funcs->bindBuffer = qglfResolveBindBuffer; | 0 |
212 | } | - |
213 | | - |
214 | static void qglfResolveBindFramebuffer(GLenum target, GLuint framebuffer) | - |
215 | { | - |
216 | typedef void ( * type_glBindFramebuffer)(GLenum target, GLuint framebuffer); | - |
217 | | - |
218 | const QGLContext *context = QGLContext::currentContext(); | - |
219 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
220 | | - |
221 | funcs->bindFramebuffer = (type_glBindFramebuffer) | - |
222 | context->getProcAddress(QLatin1String("glBindFramebuffer")); | - |
223 | | - |
224 | | - |
225 | | - |
226 | | - |
227 | | - |
228 | | - |
229 | if (!funcs->bindFramebuffer) { never evaluated: !funcs->bindFramebuffer | 0 |
230 | funcs->bindFramebuffer = (type_glBindFramebuffer) | - |
231 | context->getProcAddress(QLatin1String("glBindFramebufferEXT")); | - |
232 | } | 0 |
233 | if (!funcs->bindFramebuffer) { never evaluated: !funcs->bindFramebuffer | 0 |
234 | funcs->bindFramebuffer = (type_glBindFramebuffer) | - |
235 | context->getProcAddress(QLatin1String("glBindFramebufferARB")); | - |
236 | } | 0 |
237 | | - |
238 | if (funcs->bindFramebuffer) never evaluated: funcs->bindFramebuffer | 0 |
239 | funcs->bindFramebuffer(target, framebuffer); never executed: funcs->bindFramebuffer(target, framebuffer); | 0 |
240 | else | - |
241 | funcs->bindFramebuffer = qglfResolveBindFramebuffer; never executed: funcs->bindFramebuffer = qglfResolveBindFramebuffer; | 0 |
242 | } | - |
243 | | - |
244 | static void qglfResolveBindRenderbuffer(GLenum target, GLuint renderbuffer) | - |
245 | { | - |
246 | typedef void ( * type_glBindRenderbuffer)(GLenum target, GLuint renderbuffer); | - |
247 | | - |
248 | const QGLContext *context = QGLContext::currentContext(); | - |
249 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
250 | | - |
251 | funcs->bindRenderbuffer = (type_glBindRenderbuffer) | - |
252 | context->getProcAddress(QLatin1String("glBindRenderbuffer")); | - |
253 | | - |
254 | | - |
255 | | - |
256 | | - |
257 | | - |
258 | | - |
259 | if (!funcs->bindRenderbuffer) { never evaluated: !funcs->bindRenderbuffer | 0 |
260 | funcs->bindRenderbuffer = (type_glBindRenderbuffer) | - |
261 | context->getProcAddress(QLatin1String("glBindRenderbufferEXT")); | - |
262 | } | 0 |
263 | if (!funcs->bindRenderbuffer) { never evaluated: !funcs->bindRenderbuffer | 0 |
264 | funcs->bindRenderbuffer = (type_glBindRenderbuffer) | - |
265 | context->getProcAddress(QLatin1String("glBindRenderbufferARB")); | - |
266 | } | 0 |
267 | | - |
268 | if (funcs->bindRenderbuffer) never evaluated: funcs->bindRenderbuffer | 0 |
269 | funcs->bindRenderbuffer(target, renderbuffer); never executed: funcs->bindRenderbuffer(target, renderbuffer); | 0 |
270 | else | - |
271 | funcs->bindRenderbuffer = qglfResolveBindRenderbuffer; never executed: funcs->bindRenderbuffer = qglfResolveBindRenderbuffer; | 0 |
272 | } | - |
273 | | - |
274 | static void qglfResolveBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) | - |
275 | { | - |
276 | typedef void ( * type_glBlendColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); | - |
277 | | - |
278 | const QGLContext *context = QGLContext::currentContext(); | - |
279 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
280 | | - |
281 | funcs->blendColor = (type_glBlendColor) | - |
282 | context->getProcAddress(QLatin1String("glBlendColor")); | - |
283 | | - |
284 | | - |
285 | | - |
286 | | - |
287 | | - |
288 | | - |
289 | if (!funcs->blendColor) { never evaluated: !funcs->blendColor | 0 |
290 | funcs->blendColor = (type_glBlendColor) | - |
291 | context->getProcAddress(QLatin1String("glBlendColorEXT")); | - |
292 | } | 0 |
293 | if (!funcs->blendColor) { never evaluated: !funcs->blendColor | 0 |
294 | funcs->blendColor = (type_glBlendColor) | - |
295 | context->getProcAddress(QLatin1String("glBlendColorARB")); | - |
296 | } | 0 |
297 | | - |
298 | if (funcs->blendColor) never evaluated: funcs->blendColor | 0 |
299 | funcs->blendColor(red, green, blue, alpha); never executed: funcs->blendColor(red, green, blue, alpha); | 0 |
300 | else | - |
301 | funcs->blendColor = qglfResolveBlendColor; never executed: funcs->blendColor = qglfResolveBlendColor; | 0 |
302 | } | - |
303 | | - |
304 | static void qglfResolveBlendEquation(GLenum mode) | - |
305 | { | - |
306 | typedef void ( * type_glBlendEquation)(GLenum mode); | - |
307 | | - |
308 | const QGLContext *context = QGLContext::currentContext(); | - |
309 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
310 | | - |
311 | funcs->blendEquation = (type_glBlendEquation) | - |
312 | context->getProcAddress(QLatin1String("glBlendEquation")); | - |
313 | | - |
314 | | - |
315 | | - |
316 | | - |
317 | | - |
318 | | - |
319 | if (!funcs->blendEquation) { never evaluated: !funcs->blendEquation | 0 |
320 | funcs->blendEquation = (type_glBlendEquation) | - |
321 | context->getProcAddress(QLatin1String("glBlendEquationEXT")); | - |
322 | } | 0 |
323 | if (!funcs->blendEquation) { never evaluated: !funcs->blendEquation | 0 |
324 | funcs->blendEquation = (type_glBlendEquation) | - |
325 | context->getProcAddress(QLatin1String("glBlendEquationARB")); | - |
326 | } | 0 |
327 | | - |
328 | if (funcs->blendEquation) never evaluated: funcs->blendEquation | 0 |
329 | funcs->blendEquation(mode); never executed: funcs->blendEquation(mode); | 0 |
330 | else | - |
331 | funcs->blendEquation = qglfResolveBlendEquation; never executed: funcs->blendEquation = qglfResolveBlendEquation; | 0 |
332 | } | - |
333 | | - |
334 | static void qglfResolveBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha) | - |
335 | { | - |
336 | typedef void ( * type_glBlendEquationSeparate)(GLenum modeRGB, GLenum modeAlpha); | - |
337 | | - |
338 | const QGLContext *context = QGLContext::currentContext(); | - |
339 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
340 | | - |
341 | funcs->blendEquationSeparate = (type_glBlendEquationSeparate) | - |
342 | context->getProcAddress(QLatin1String("glBlendEquationSeparate")); | - |
343 | | - |
344 | | - |
345 | | - |
346 | | - |
347 | | - |
348 | | - |
349 | if (!funcs->blendEquationSeparate) { never evaluated: !funcs->blendEquationSeparate | 0 |
350 | funcs->blendEquationSeparate = (type_glBlendEquationSeparate) | - |
351 | context->getProcAddress(QLatin1String("glBlendEquationSeparateEXT")); | - |
352 | } | 0 |
353 | if (!funcs->blendEquationSeparate) { never evaluated: !funcs->blendEquationSeparate | 0 |
354 | funcs->blendEquationSeparate = (type_glBlendEquationSeparate) | - |
355 | context->getProcAddress(QLatin1String("glBlendEquationSeparateARB")); | - |
356 | } | 0 |
357 | | - |
358 | if (funcs->blendEquationSeparate) never evaluated: funcs->blendEquationSeparate | 0 |
359 | funcs->blendEquationSeparate(modeRGB, modeAlpha); never executed: funcs->blendEquationSeparate(modeRGB, modeAlpha); | 0 |
360 | else | - |
361 | funcs->blendEquationSeparate = qglfResolveBlendEquationSeparate; never executed: funcs->blendEquationSeparate = qglfResolveBlendEquationSeparate; | 0 |
362 | } | - |
363 | | - |
364 | static void qglfResolveBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) | - |
365 | { | - |
366 | typedef void ( * type_glBlendFuncSeparate)(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); | - |
367 | | - |
368 | const QGLContext *context = QGLContext::currentContext(); | - |
369 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
370 | | - |
371 | funcs->blendFuncSeparate = (type_glBlendFuncSeparate) | - |
372 | context->getProcAddress(QLatin1String("glBlendFuncSeparate")); | - |
373 | | - |
374 | | - |
375 | | - |
376 | | - |
377 | | - |
378 | | - |
379 | if (!funcs->blendFuncSeparate) { never evaluated: !funcs->blendFuncSeparate | 0 |
380 | funcs->blendFuncSeparate = (type_glBlendFuncSeparate) | - |
381 | context->getProcAddress(QLatin1String("glBlendFuncSeparateEXT")); | - |
382 | } | 0 |
383 | if (!funcs->blendFuncSeparate) { never evaluated: !funcs->blendFuncSeparate | 0 |
384 | funcs->blendFuncSeparate = (type_glBlendFuncSeparate) | - |
385 | context->getProcAddress(QLatin1String("glBlendFuncSeparateARB")); | - |
386 | } | 0 |
387 | | - |
388 | if (funcs->blendFuncSeparate) never evaluated: funcs->blendFuncSeparate | 0 |
389 | funcs->blendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha); never executed: funcs->blendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha); | 0 |
390 | else | - |
391 | funcs->blendFuncSeparate = qglfResolveBlendFuncSeparate; never executed: funcs->blendFuncSeparate = qglfResolveBlendFuncSeparate; | 0 |
392 | } | - |
393 | | - |
394 | static void qglfResolveBufferData(GLenum target, qgl_GLsizeiptr size, const void* data, GLenum usage) | - |
395 | { | - |
396 | typedef void ( * type_glBufferData)(GLenum target, qgl_GLsizeiptr size, const void* data, GLenum usage); | - |
397 | | - |
398 | const QGLContext *context = QGLContext::currentContext(); | - |
399 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
400 | | - |
401 | funcs->bufferData = (type_glBufferData) | - |
402 | context->getProcAddress(QLatin1String("glBufferData")); | - |
403 | | - |
404 | | - |
405 | | - |
406 | | - |
407 | | - |
408 | | - |
409 | if (!funcs->bufferData) { never evaluated: !funcs->bufferData | 0 |
410 | funcs->bufferData = (type_glBufferData) | - |
411 | context->getProcAddress(QLatin1String("glBufferDataEXT")); | - |
412 | } | 0 |
413 | if (!funcs->bufferData) { never evaluated: !funcs->bufferData | 0 |
414 | funcs->bufferData = (type_glBufferData) | - |
415 | context->getProcAddress(QLatin1String("glBufferDataARB")); | - |
416 | } | 0 |
417 | | - |
418 | if (funcs->bufferData) never evaluated: funcs->bufferData | 0 |
419 | funcs->bufferData(target, size, data, usage); never executed: funcs->bufferData(target, size, data, usage); | 0 |
420 | else | - |
421 | funcs->bufferData = qglfResolveBufferData; never executed: funcs->bufferData = qglfResolveBufferData; | 0 |
422 | } | - |
423 | | - |
424 | static void qglfResolveBufferSubData(GLenum target, qgl_GLintptr offset, qgl_GLsizeiptr size, const void* data) | - |
425 | { | - |
426 | typedef void ( * type_glBufferSubData)(GLenum target, qgl_GLintptr offset, qgl_GLsizeiptr size, const void* data); | - |
427 | | - |
428 | const QGLContext *context = QGLContext::currentContext(); | - |
429 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
430 | | - |
431 | funcs->bufferSubData = (type_glBufferSubData) | - |
432 | context->getProcAddress(QLatin1String("glBufferSubData")); | - |
433 | | - |
434 | | - |
435 | | - |
436 | | - |
437 | | - |
438 | | - |
439 | if (!funcs->bufferSubData) { never evaluated: !funcs->bufferSubData | 0 |
440 | funcs->bufferSubData = (type_glBufferSubData) | - |
441 | context->getProcAddress(QLatin1String("glBufferSubDataEXT")); | - |
442 | } | 0 |
443 | if (!funcs->bufferSubData) { never evaluated: !funcs->bufferSubData | 0 |
444 | funcs->bufferSubData = (type_glBufferSubData) | - |
445 | context->getProcAddress(QLatin1String("glBufferSubDataARB")); | - |
446 | } | 0 |
447 | | - |
448 | if (funcs->bufferSubData) never evaluated: funcs->bufferSubData | 0 |
449 | funcs->bufferSubData(target, offset, size, data); never executed: funcs->bufferSubData(target, offset, size, data); | 0 |
450 | else | - |
451 | funcs->bufferSubData = qglfResolveBufferSubData; never executed: funcs->bufferSubData = qglfResolveBufferSubData; | 0 |
452 | } | - |
453 | | - |
454 | static GLenum qglfResolveCheckFramebufferStatus(GLenum target) | - |
455 | { | - |
456 | typedef GLenum ( * type_glCheckFramebufferStatus)(GLenum target); | - |
457 | | - |
458 | const QGLContext *context = QGLContext::currentContext(); | - |
459 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
460 | | - |
461 | funcs->checkFramebufferStatus = (type_glCheckFramebufferStatus) | - |
462 | context->getProcAddress(QLatin1String("glCheckFramebufferStatus")); | - |
463 | | - |
464 | | - |
465 | | - |
466 | | - |
467 | | - |
468 | | - |
469 | if (!funcs->checkFramebufferStatus) { never evaluated: !funcs->checkFramebufferStatus | 0 |
470 | funcs->checkFramebufferStatus = (type_glCheckFramebufferStatus) | - |
471 | context->getProcAddress(QLatin1String("glCheckFramebufferStatusEXT")); | - |
472 | } | 0 |
473 | if (!funcs->checkFramebufferStatus) { never evaluated: !funcs->checkFramebufferStatus | 0 |
474 | funcs->checkFramebufferStatus = (type_glCheckFramebufferStatus) | - |
475 | context->getProcAddress(QLatin1String("glCheckFramebufferStatusARB")); | - |
476 | } | 0 |
477 | | - |
478 | if (funcs->checkFramebufferStatus) never evaluated: funcs->checkFramebufferStatus | 0 |
479 | return funcs->checkFramebufferStatus(target); never executed: return funcs->checkFramebufferStatus(target); | 0 |
480 | funcs->checkFramebufferStatus = qglfResolveCheckFramebufferStatus; | - |
481 | return GLenum(0); never executed: return GLenum(0); | 0 |
482 | } | - |
483 | | - |
484 | static void qglfResolveCompileShader(GLuint shader) | - |
485 | { | - |
486 | typedef void ( * type_glCompileShader)(GLuint shader); | - |
487 | | - |
488 | const QGLContext *context = QGLContext::currentContext(); | - |
489 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
490 | | - |
491 | funcs->compileShader = (type_glCompileShader) | - |
492 | context->getProcAddress(QLatin1String("glCompileShader")); | - |
493 | if (!funcs->compileShader) { never evaluated: !funcs->compileShader | 0 |
494 | funcs->compileShader = (type_glCompileShader) | - |
495 | context->getProcAddress(QLatin1String("glCompileShader")); | - |
496 | } | 0 |
497 | | - |
498 | if (funcs->compileShader) never evaluated: funcs->compileShader | 0 |
499 | funcs->compileShader(shader); never executed: funcs->compileShader(shader); | 0 |
500 | else | - |
501 | funcs->compileShader = qglfResolveCompileShader; never executed: funcs->compileShader = qglfResolveCompileShader; | 0 |
502 | } | - |
503 | | - |
504 | static void qglfResolveCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data) | - |
505 | { | - |
506 | typedef void ( * type_glCompressedTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data); | - |
507 | | - |
508 | const QGLContext *context = QGLContext::currentContext(); | - |
509 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
510 | | - |
511 | funcs->compressedTexImage2D = (type_glCompressedTexImage2D) | - |
512 | context->getProcAddress(QLatin1String("glCompressedTexImage2D")); | - |
513 | | - |
514 | | - |
515 | | - |
516 | | - |
517 | | - |
518 | | - |
519 | if (!funcs->compressedTexImage2D) { never evaluated: !funcs->compressedTexImage2D | 0 |
520 | funcs->compressedTexImage2D = (type_glCompressedTexImage2D) | - |
521 | context->getProcAddress(QLatin1String("glCompressedTexImage2DEXT")); | - |
522 | } | 0 |
523 | if (!funcs->compressedTexImage2D) { never evaluated: !funcs->compressedTexImage2D | 0 |
524 | funcs->compressedTexImage2D = (type_glCompressedTexImage2D) | - |
525 | context->getProcAddress(QLatin1String("glCompressedTexImage2DARB")); | - |
526 | } | 0 |
527 | | - |
528 | if (funcs->compressedTexImage2D) never evaluated: funcs->compressedTexImage2D | 0 |
529 | funcs->compressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data); never executed: funcs->compressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data); | 0 |
530 | else | - |
531 | funcs->compressedTexImage2D = qglfResolveCompressedTexImage2D; never executed: funcs->compressedTexImage2D = qglfResolveCompressedTexImage2D; | 0 |
532 | } | - |
533 | | - |
534 | static void qglfResolveCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data) | - |
535 | { | - |
536 | typedef void ( * type_glCompressedTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data); | - |
537 | | - |
538 | const QGLContext *context = QGLContext::currentContext(); | - |
539 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
540 | | - |
541 | funcs->compressedTexSubImage2D = (type_glCompressedTexSubImage2D) | - |
542 | context->getProcAddress(QLatin1String("glCompressedTexSubImage2D")); | - |
543 | | - |
544 | | - |
545 | | - |
546 | | - |
547 | | - |
548 | | - |
549 | if (!funcs->compressedTexSubImage2D) { never evaluated: !funcs->compressedTexSubImage2D | 0 |
550 | funcs->compressedTexSubImage2D = (type_glCompressedTexSubImage2D) | - |
551 | context->getProcAddress(QLatin1String("glCompressedTexSubImage2DEXT")); | - |
552 | } | 0 |
553 | if (!funcs->compressedTexSubImage2D) { never evaluated: !funcs->compressedTexSubImage2D | 0 |
554 | funcs->compressedTexSubImage2D = (type_glCompressedTexSubImage2D) | - |
555 | context->getProcAddress(QLatin1String("glCompressedTexSubImage2DARB")); | - |
556 | } | 0 |
557 | | - |
558 | if (funcs->compressedTexSubImage2D) never evaluated: funcs->compressedTexSubImage2D | 0 |
559 | funcs->compressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data); never executed: funcs->compressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data); | 0 |
560 | else | - |
561 | funcs->compressedTexSubImage2D = qglfResolveCompressedTexSubImage2D; never executed: funcs->compressedTexSubImage2D = qglfResolveCompressedTexSubImage2D; | 0 |
562 | } | - |
563 | | - |
564 | static GLuint qglfResolveCreateProgram() | - |
565 | { | - |
566 | typedef GLuint ( * type_glCreateProgram)(); | - |
567 | | - |
568 | const QGLContext *context = QGLContext::currentContext(); | - |
569 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
570 | | - |
571 | funcs->createProgram = (type_glCreateProgram) | - |
572 | context->getProcAddress(QLatin1String("glCreateProgram")); | - |
573 | if (!funcs->createProgram) { never evaluated: !funcs->createProgram | 0 |
574 | funcs->createProgram = (type_glCreateProgram) | - |
575 | context->getProcAddress(QLatin1String("glCreateProgramObjectARB")); | - |
576 | } | 0 |
577 | | - |
578 | if (funcs->createProgram) never evaluated: funcs->createProgram | 0 |
579 | return funcs->createProgram(); never executed: return funcs->createProgram(); | 0 |
580 | funcs->createProgram = qglfResolveCreateProgram; | - |
581 | return GLuint(0); never executed: return GLuint(0); | 0 |
582 | } | - |
583 | | - |
584 | static GLuint qglfResolveCreateShader(GLenum type) | - |
585 | { | - |
586 | typedef GLuint ( * type_glCreateShader)(GLenum type); | - |
587 | | - |
588 | const QGLContext *context = QGLContext::currentContext(); | - |
589 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
590 | | - |
591 | funcs->createShader = (type_glCreateShader) | - |
592 | context->getProcAddress(QLatin1String("glCreateShader")); | - |
593 | if (!funcs->createShader) { never evaluated: !funcs->createShader | 0 |
594 | funcs->createShader = (type_glCreateShader) | - |
595 | context->getProcAddress(QLatin1String("glCreateShaderObjectARB")); | - |
596 | } | 0 |
597 | | - |
598 | if (funcs->createShader) never evaluated: funcs->createShader | 0 |
599 | return funcs->createShader(type); never executed: return funcs->createShader(type); | 0 |
600 | funcs->createShader = qglfResolveCreateShader; | - |
601 | return GLuint(0); never executed: return GLuint(0); | 0 |
602 | } | - |
603 | | - |
604 | static void qglfResolveDeleteBuffers(GLsizei n, const GLuint* buffers) | - |
605 | { | - |
606 | typedef void ( * type_glDeleteBuffers)(GLsizei n, const GLuint* buffers); | - |
607 | | - |
608 | const QGLContext *context = QGLContext::currentContext(); | - |
609 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
610 | | - |
611 | funcs->deleteBuffers = (type_glDeleteBuffers) | - |
612 | context->getProcAddress(QLatin1String("glDeleteBuffers")); | - |
613 | | - |
614 | | - |
615 | | - |
616 | | - |
617 | | - |
618 | | - |
619 | if (!funcs->deleteBuffers) { never evaluated: !funcs->deleteBuffers | 0 |
620 | funcs->deleteBuffers = (type_glDeleteBuffers) | - |
621 | context->getProcAddress(QLatin1String("glDeleteBuffersEXT")); | - |
622 | } | 0 |
623 | if (!funcs->deleteBuffers) { never evaluated: !funcs->deleteBuffers | 0 |
624 | funcs->deleteBuffers = (type_glDeleteBuffers) | - |
625 | context->getProcAddress(QLatin1String("glDeleteBuffersARB")); | - |
626 | } | 0 |
627 | | - |
628 | if (funcs->deleteBuffers) never evaluated: funcs->deleteBuffers | 0 |
629 | funcs->deleteBuffers(n, buffers); never executed: funcs->deleteBuffers(n, buffers); | 0 |
630 | else | - |
631 | funcs->deleteBuffers = qglfResolveDeleteBuffers; never executed: funcs->deleteBuffers = qglfResolveDeleteBuffers; | 0 |
632 | } | - |
633 | | - |
634 | static void qglfResolveDeleteFramebuffers(GLsizei n, const GLuint* framebuffers) | - |
635 | { | - |
636 | typedef void ( * type_glDeleteFramebuffers)(GLsizei n, const GLuint* framebuffers); | - |
637 | | - |
638 | const QGLContext *context = QGLContext::currentContext(); | - |
639 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
640 | | - |
641 | funcs->deleteFramebuffers = (type_glDeleteFramebuffers) | - |
642 | context->getProcAddress(QLatin1String("glDeleteFramebuffers")); | - |
643 | | - |
644 | | - |
645 | | - |
646 | | - |
647 | | - |
648 | | - |
649 | if (!funcs->deleteFramebuffers) { never evaluated: !funcs->deleteFramebuffers | 0 |
650 | funcs->deleteFramebuffers = (type_glDeleteFramebuffers) | - |
651 | context->getProcAddress(QLatin1String("glDeleteFramebuffersEXT")); | - |
652 | } | 0 |
653 | if (!funcs->deleteFramebuffers) { never evaluated: !funcs->deleteFramebuffers | 0 |
654 | funcs->deleteFramebuffers = (type_glDeleteFramebuffers) | - |
655 | context->getProcAddress(QLatin1String("glDeleteFramebuffersARB")); | - |
656 | } | 0 |
657 | | - |
658 | if (funcs->deleteFramebuffers) never evaluated: funcs->deleteFramebuffers | 0 |
659 | funcs->deleteFramebuffers(n, framebuffers); never executed: funcs->deleteFramebuffers(n, framebuffers); | 0 |
660 | else | - |
661 | funcs->deleteFramebuffers = qglfResolveDeleteFramebuffers; never executed: funcs->deleteFramebuffers = qglfResolveDeleteFramebuffers; | 0 |
662 | } | - |
663 | | - |
664 | static void qglfResolveDeleteProgram(GLuint program) | - |
665 | { | - |
666 | typedef void ( * type_glDeleteProgram)(GLuint program); | - |
667 | | - |
668 | const QGLContext *context = QGLContext::currentContext(); | - |
669 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
670 | | - |
671 | funcs->deleteProgram = (type_glDeleteProgram) | - |
672 | context->getProcAddress(QLatin1String("glDeleteProgram")); | - |
673 | if (!funcs->deleteProgram) { never evaluated: !funcs->deleteProgram | 0 |
674 | funcs->deleteProgram = (type_glDeleteProgram) | - |
675 | context->getProcAddress(QLatin1String("glDeleteObjectARB")); | - |
676 | } | 0 |
677 | | - |
678 | if (funcs->deleteProgram) never evaluated: funcs->deleteProgram | 0 |
679 | funcs->deleteProgram(program); never executed: funcs->deleteProgram(program); | 0 |
680 | else | - |
681 | funcs->deleteProgram = qglfResolveDeleteProgram; never executed: funcs->deleteProgram = qglfResolveDeleteProgram; | 0 |
682 | } | - |
683 | | - |
684 | static void qglfResolveDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers) | - |
685 | { | - |
686 | typedef void ( * type_glDeleteRenderbuffers)(GLsizei n, const GLuint* renderbuffers); | - |
687 | | - |
688 | const QGLContext *context = QGLContext::currentContext(); | - |
689 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
690 | | - |
691 | funcs->deleteRenderbuffers = (type_glDeleteRenderbuffers) | - |
692 | context->getProcAddress(QLatin1String("glDeleteRenderbuffers")); | - |
693 | | - |
694 | | - |
695 | | - |
696 | | - |
697 | | - |
698 | | - |
699 | if (!funcs->deleteRenderbuffers) { never evaluated: !funcs->deleteRenderbuffers | 0 |
700 | funcs->deleteRenderbuffers = (type_glDeleteRenderbuffers) | - |
701 | context->getProcAddress(QLatin1String("glDeleteRenderbuffersEXT")); | - |
702 | } | 0 |
703 | if (!funcs->deleteRenderbuffers) { never evaluated: !funcs->deleteRenderbuffers | 0 |
704 | funcs->deleteRenderbuffers = (type_glDeleteRenderbuffers) | - |
705 | context->getProcAddress(QLatin1String("glDeleteRenderbuffersARB")); | - |
706 | } | 0 |
707 | | - |
708 | if (funcs->deleteRenderbuffers) never evaluated: funcs->deleteRenderbuffers | 0 |
709 | funcs->deleteRenderbuffers(n, renderbuffers); never executed: funcs->deleteRenderbuffers(n, renderbuffers); | 0 |
710 | else | - |
711 | funcs->deleteRenderbuffers = qglfResolveDeleteRenderbuffers; never executed: funcs->deleteRenderbuffers = qglfResolveDeleteRenderbuffers; | 0 |
712 | } | - |
713 | | - |
714 | static void qglfResolveDeleteShader(GLuint shader) | - |
715 | { | - |
716 | typedef void ( * type_glDeleteShader)(GLuint shader); | - |
717 | | - |
718 | const QGLContext *context = QGLContext::currentContext(); | - |
719 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
720 | | - |
721 | funcs->deleteShader = (type_glDeleteShader) | - |
722 | context->getProcAddress(QLatin1String("glDeleteShader")); | - |
723 | if (!funcs->deleteShader) { never evaluated: !funcs->deleteShader | 0 |
724 | funcs->deleteShader = (type_glDeleteShader) | - |
725 | context->getProcAddress(QLatin1String("glDeleteObjectARB")); | - |
726 | } | 0 |
727 | | - |
728 | if (funcs->deleteShader) never evaluated: funcs->deleteShader | 0 |
729 | funcs->deleteShader(shader); never executed: funcs->deleteShader(shader); | 0 |
730 | else | - |
731 | funcs->deleteShader = qglfResolveDeleteShader; never executed: funcs->deleteShader = qglfResolveDeleteShader; | 0 |
732 | } | - |
733 | | - |
734 | static void qglfResolveDetachShader(GLuint program, GLuint shader) | - |
735 | { | - |
736 | typedef void ( * type_glDetachShader)(GLuint program, GLuint shader); | - |
737 | | - |
738 | const QGLContext *context = QGLContext::currentContext(); | - |
739 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
740 | | - |
741 | funcs->detachShader = (type_glDetachShader) | - |
742 | context->getProcAddress(QLatin1String("glDetachShader")); | - |
743 | if (!funcs->detachShader) { never evaluated: !funcs->detachShader | 0 |
744 | funcs->detachShader = (type_glDetachShader) | - |
745 | context->getProcAddress(QLatin1String("glDetachObjectARB")); | - |
746 | } | 0 |
747 | | - |
748 | if (funcs->detachShader) never evaluated: funcs->detachShader | 0 |
749 | funcs->detachShader(program, shader); never executed: funcs->detachShader(program, shader); | 0 |
750 | else | - |
751 | funcs->detachShader = qglfResolveDetachShader; never executed: funcs->detachShader = qglfResolveDetachShader; | 0 |
752 | } | - |
753 | | - |
754 | static void qglfResolveDisableVertexAttribArray(GLuint index) | - |
755 | { | - |
756 | typedef void ( * type_glDisableVertexAttribArray)(GLuint index); | - |
757 | | - |
758 | const QGLContext *context = QGLContext::currentContext(); | - |
759 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
760 | | - |
761 | funcs->disableVertexAttribArray = (type_glDisableVertexAttribArray) | - |
762 | context->getProcAddress(QLatin1String("glDisableVertexAttribArray")); | - |
763 | if (!funcs->disableVertexAttribArray) { never evaluated: !funcs->disableVertexAttribArray | 0 |
764 | funcs->disableVertexAttribArray = (type_glDisableVertexAttribArray) | - |
765 | context->getProcAddress(QLatin1String("glDisableVertexAttribArrayARB")); | - |
766 | } | 0 |
767 | | - |
768 | if (funcs->disableVertexAttribArray) never evaluated: funcs->disableVertexAttribArray | 0 |
769 | funcs->disableVertexAttribArray(index); never executed: funcs->disableVertexAttribArray(index); | 0 |
770 | else | - |
771 | funcs->disableVertexAttribArray = qglfResolveDisableVertexAttribArray; never executed: funcs->disableVertexAttribArray = qglfResolveDisableVertexAttribArray; | 0 |
772 | } | - |
773 | | - |
774 | static void qglfResolveEnableVertexAttribArray(GLuint index) | - |
775 | { | - |
776 | typedef void ( * type_glEnableVertexAttribArray)(GLuint index); | - |
777 | | - |
778 | const QGLContext *context = QGLContext::currentContext(); | - |
779 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
780 | | - |
781 | funcs->enableVertexAttribArray = (type_glEnableVertexAttribArray) | - |
782 | context->getProcAddress(QLatin1String("glEnableVertexAttribArray")); | - |
783 | if (!funcs->enableVertexAttribArray) { never evaluated: !funcs->enableVertexAttribArray | 0 |
784 | funcs->enableVertexAttribArray = (type_glEnableVertexAttribArray) | - |
785 | context->getProcAddress(QLatin1String("glEnableVertexAttribArrayARB")); | - |
786 | } | 0 |
787 | | - |
788 | if (funcs->enableVertexAttribArray) never evaluated: funcs->enableVertexAttribArray | 0 |
789 | funcs->enableVertexAttribArray(index); never executed: funcs->enableVertexAttribArray(index); | 0 |
790 | else | - |
791 | funcs->enableVertexAttribArray = qglfResolveEnableVertexAttribArray; never executed: funcs->enableVertexAttribArray = qglfResolveEnableVertexAttribArray; | 0 |
792 | } | - |
793 | | - |
794 | static void qglfResolveFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) | - |
795 | { | - |
796 | typedef void ( * type_glFramebufferRenderbuffer)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); | - |
797 | | - |
798 | const QGLContext *context = QGLContext::currentContext(); | - |
799 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
800 | | - |
801 | funcs->framebufferRenderbuffer = (type_glFramebufferRenderbuffer) | - |
802 | context->getProcAddress(QLatin1String("glFramebufferRenderbuffer")); | - |
803 | | - |
804 | | - |
805 | | - |
806 | | - |
807 | | - |
808 | | - |
809 | if (!funcs->framebufferRenderbuffer) { never evaluated: !funcs->framebufferRenderbuffer | 0 |
810 | funcs->framebufferRenderbuffer = (type_glFramebufferRenderbuffer) | - |
811 | context->getProcAddress(QLatin1String("glFramebufferRenderbufferEXT")); | - |
812 | } | 0 |
813 | if (!funcs->framebufferRenderbuffer) { never evaluated: !funcs->framebufferRenderbuffer | 0 |
814 | funcs->framebufferRenderbuffer = (type_glFramebufferRenderbuffer) | - |
815 | context->getProcAddress(QLatin1String("glFramebufferRenderbufferARB")); | - |
816 | } | 0 |
817 | | - |
818 | if (funcs->framebufferRenderbuffer) never evaluated: funcs->framebufferRenderbuffer | 0 |
819 | funcs->framebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer); never executed: funcs->framebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer); | 0 |
820 | else | - |
821 | funcs->framebufferRenderbuffer = qglfResolveFramebufferRenderbuffer; never executed: funcs->framebufferRenderbuffer = qglfResolveFramebufferRenderbuffer; | 0 |
822 | } | - |
823 | | - |
824 | static void qglfResolveFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) | - |
825 | { | - |
826 | typedef void ( * type_glFramebufferTexture2D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); | - |
827 | | - |
828 | const QGLContext *context = QGLContext::currentContext(); | - |
829 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
830 | | - |
831 | funcs->framebufferTexture2D = (type_glFramebufferTexture2D) | - |
832 | context->getProcAddress(QLatin1String("glFramebufferTexture2D")); | - |
833 | | - |
834 | | - |
835 | | - |
836 | | - |
837 | | - |
838 | | - |
839 | if (!funcs->framebufferTexture2D) { never evaluated: !funcs->framebufferTexture2D | 0 |
840 | funcs->framebufferTexture2D = (type_glFramebufferTexture2D) | - |
841 | context->getProcAddress(QLatin1String("glFramebufferTexture2DEXT")); | - |
842 | } | 0 |
843 | if (!funcs->framebufferTexture2D) { never evaluated: !funcs->framebufferTexture2D | 0 |
844 | funcs->framebufferTexture2D = (type_glFramebufferTexture2D) | - |
845 | context->getProcAddress(QLatin1String("glFramebufferTexture2DARB")); | - |
846 | } | 0 |
847 | | - |
848 | if (funcs->framebufferTexture2D) never evaluated: funcs->framebufferTexture2D | 0 |
849 | funcs->framebufferTexture2D(target, attachment, textarget, texture, level); never executed: funcs->framebufferTexture2D(target, attachment, textarget, texture, level); | 0 |
850 | else | - |
851 | funcs->framebufferTexture2D = qglfResolveFramebufferTexture2D; never executed: funcs->framebufferTexture2D = qglfResolveFramebufferTexture2D; | 0 |
852 | } | - |
853 | | - |
854 | static void qglfResolveGenBuffers(GLsizei n, GLuint* buffers) | - |
855 | { | - |
856 | typedef void ( * type_glGenBuffers)(GLsizei n, GLuint* buffers); | - |
857 | | - |
858 | const QGLContext *context = QGLContext::currentContext(); | - |
859 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
860 | | - |
861 | funcs->genBuffers = (type_glGenBuffers) | - |
862 | context->getProcAddress(QLatin1String("glGenBuffers")); | - |
863 | | - |
864 | | - |
865 | | - |
866 | | - |
867 | | - |
868 | | - |
869 | if (!funcs->genBuffers) { never evaluated: !funcs->genBuffers | 0 |
870 | funcs->genBuffers = (type_glGenBuffers) | - |
871 | context->getProcAddress(QLatin1String("glGenBuffersEXT")); | - |
872 | } | 0 |
873 | if (!funcs->genBuffers) { never evaluated: !funcs->genBuffers | 0 |
874 | funcs->genBuffers = (type_glGenBuffers) | - |
875 | context->getProcAddress(QLatin1String("glGenBuffersARB")); | - |
876 | } | 0 |
877 | | - |
878 | if (funcs->genBuffers) never evaluated: funcs->genBuffers | 0 |
879 | funcs->genBuffers(n, buffers); never executed: funcs->genBuffers(n, buffers); | 0 |
880 | else | - |
881 | funcs->genBuffers = qglfResolveGenBuffers; never executed: funcs->genBuffers = qglfResolveGenBuffers; | 0 |
882 | } | - |
883 | | - |
884 | static void qglfResolveGenerateMipmap(GLenum target) | - |
885 | { | - |
886 | typedef void ( * type_glGenerateMipmap)(GLenum target); | - |
887 | | - |
888 | const QGLContext *context = QGLContext::currentContext(); | - |
889 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
890 | | - |
891 | funcs->generateMipmap = (type_glGenerateMipmap) | - |
892 | context->getProcAddress(QLatin1String("glGenerateMipmap")); | - |
893 | | - |
894 | | - |
895 | | - |
896 | | - |
897 | | - |
898 | | - |
899 | if (!funcs->generateMipmap) { never evaluated: !funcs->generateMipmap | 0 |
900 | funcs->generateMipmap = (type_glGenerateMipmap) | - |
901 | context->getProcAddress(QLatin1String("glGenerateMipmapEXT")); | - |
902 | } | 0 |
903 | if (!funcs->generateMipmap) { never evaluated: !funcs->generateMipmap | 0 |
904 | funcs->generateMipmap = (type_glGenerateMipmap) | - |
905 | context->getProcAddress(QLatin1String("glGenerateMipmapARB")); | - |
906 | } | 0 |
907 | | - |
908 | if (funcs->generateMipmap) never evaluated: funcs->generateMipmap | 0 |
909 | funcs->generateMipmap(target); never executed: funcs->generateMipmap(target); | 0 |
910 | else | - |
911 | funcs->generateMipmap = qglfResolveGenerateMipmap; never executed: funcs->generateMipmap = qglfResolveGenerateMipmap; | 0 |
912 | } | - |
913 | | - |
914 | static void qglfResolveGenFramebuffers(GLsizei n, GLuint* framebuffers) | - |
915 | { | - |
916 | typedef void ( * type_glGenFramebuffers)(GLsizei n, GLuint* framebuffers); | - |
917 | | - |
918 | const QGLContext *context = QGLContext::currentContext(); | - |
919 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
920 | | - |
921 | funcs->genFramebuffers = (type_glGenFramebuffers) | - |
922 | context->getProcAddress(QLatin1String("glGenFramebuffers")); | - |
923 | | - |
924 | | - |
925 | | - |
926 | | - |
927 | | - |
928 | | - |
929 | if (!funcs->genFramebuffers) { never evaluated: !funcs->genFramebuffers | 0 |
930 | funcs->genFramebuffers = (type_glGenFramebuffers) | - |
931 | context->getProcAddress(QLatin1String("glGenFramebuffersEXT")); | - |
932 | } | 0 |
933 | if (!funcs->genFramebuffers) { never evaluated: !funcs->genFramebuffers | 0 |
934 | funcs->genFramebuffers = (type_glGenFramebuffers) | - |
935 | context->getProcAddress(QLatin1String("glGenFramebuffersARB")); | - |
936 | } | 0 |
937 | | - |
938 | if (funcs->genFramebuffers) never evaluated: funcs->genFramebuffers | 0 |
939 | funcs->genFramebuffers(n, framebuffers); never executed: funcs->genFramebuffers(n, framebuffers); | 0 |
940 | else | - |
941 | funcs->genFramebuffers = qglfResolveGenFramebuffers; never executed: funcs->genFramebuffers = qglfResolveGenFramebuffers; | 0 |
942 | } | - |
943 | | - |
944 | static void qglfResolveGenRenderbuffers(GLsizei n, GLuint* renderbuffers) | - |
945 | { | - |
946 | typedef void ( * type_glGenRenderbuffers)(GLsizei n, GLuint* renderbuffers); | - |
947 | | - |
948 | const QGLContext *context = QGLContext::currentContext(); | - |
949 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
950 | | - |
951 | funcs->genRenderbuffers = (type_glGenRenderbuffers) | - |
952 | context->getProcAddress(QLatin1String("glGenRenderbuffers")); | - |
953 | | - |
954 | | - |
955 | | - |
956 | | - |
957 | | - |
958 | | - |
959 | if (!funcs->genRenderbuffers) { never evaluated: !funcs->genRenderbuffers | 0 |
960 | funcs->genRenderbuffers = (type_glGenRenderbuffers) | - |
961 | context->getProcAddress(QLatin1String("glGenRenderbuffersEXT")); | - |
962 | } | 0 |
963 | if (!funcs->genRenderbuffers) { never evaluated: !funcs->genRenderbuffers | 0 |
964 | funcs->genRenderbuffers = (type_glGenRenderbuffers) | - |
965 | context->getProcAddress(QLatin1String("glGenRenderbuffersARB")); | - |
966 | } | 0 |
967 | | - |
968 | if (funcs->genRenderbuffers) never evaluated: funcs->genRenderbuffers | 0 |
969 | funcs->genRenderbuffers(n, renderbuffers); never executed: funcs->genRenderbuffers(n, renderbuffers); | 0 |
970 | else | - |
971 | funcs->genRenderbuffers = qglfResolveGenRenderbuffers; never executed: funcs->genRenderbuffers = qglfResolveGenRenderbuffers; | 0 |
972 | } | - |
973 | | - |
974 | static void qglfResolveGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name) | - |
975 | { | - |
976 | typedef void ( * type_glGetActiveAttrib)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name); | - |
977 | | - |
978 | const QGLContext *context = QGLContext::currentContext(); | - |
979 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
980 | | - |
981 | funcs->getActiveAttrib = (type_glGetActiveAttrib) | - |
982 | context->getProcAddress(QLatin1String("glGetActiveAttrib")); | - |
983 | if (!funcs->getActiveAttrib) { never evaluated: !funcs->getActiveAttrib | 0 |
984 | funcs->getActiveAttrib = (type_glGetActiveAttrib) | - |
985 | context->getProcAddress(QLatin1String("glGetActiveAttribARB")); | - |
986 | } | 0 |
987 | | - |
988 | if (funcs->getActiveAttrib) never evaluated: funcs->getActiveAttrib | 0 |
989 | funcs->getActiveAttrib(program, index, bufsize, length, size, type, name); never executed: funcs->getActiveAttrib(program, index, bufsize, length, size, type, name); | 0 |
990 | else | - |
991 | funcs->getActiveAttrib = qglfResolveGetActiveAttrib; never executed: funcs->getActiveAttrib = qglfResolveGetActiveAttrib; | 0 |
992 | } | - |
993 | | - |
994 | static void qglfResolveGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name) | - |
995 | { | - |
996 | typedef void ( * type_glGetActiveUniform)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name); | - |
997 | | - |
998 | const QGLContext *context = QGLContext::currentContext(); | - |
999 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
1000 | | - |
1001 | funcs->getActiveUniform = (type_glGetActiveUniform) | - |
1002 | context->getProcAddress(QLatin1String("glGetActiveUniform")); | - |
1003 | if (!funcs->getActiveUniform) { never evaluated: !funcs->getActiveUniform | 0 |
1004 | funcs->getActiveUniform = (type_glGetActiveUniform) | - |
1005 | context->getProcAddress(QLatin1String("glGetActiveUniformARB")); | - |
1006 | } | 0 |
1007 | | - |
1008 | if (funcs->getActiveUniform) never evaluated: funcs->getActiveUniform | 0 |
1009 | funcs->getActiveUniform(program, index, bufsize, length, size, type, name); never executed: funcs->getActiveUniform(program, index, bufsize, length, size, type, name); | 0 |
1010 | else | - |
1011 | funcs->getActiveUniform = qglfResolveGetActiveUniform; never executed: funcs->getActiveUniform = qglfResolveGetActiveUniform; | 0 |
1012 | } | - |
1013 | | - |
1014 | static void qglfResolveGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders) | - |
1015 | { | - |
1016 | typedef void ( * type_glGetAttachedShaders)(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders); | - |
1017 | | - |
1018 | const QGLContext *context = QGLContext::currentContext(); | - |
1019 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
1020 | | - |
1021 | funcs->getAttachedShaders = (type_glGetAttachedShaders) | - |
1022 | context->getProcAddress(QLatin1String("glGetAttachedShaders")); | - |
1023 | if (!funcs->getAttachedShaders) { never evaluated: !funcs->getAttachedShaders | 0 |
1024 | funcs->getAttachedShaders = (type_glGetAttachedShaders) | - |
1025 | context->getProcAddress(QLatin1String("glGetAttachedObjectsARB")); | - |
1026 | } | 0 |
1027 | | - |
1028 | if (funcs->getAttachedShaders) never evaluated: funcs->getAttachedShaders | 0 |
1029 | funcs->getAttachedShaders(program, maxcount, count, shaders); never executed: funcs->getAttachedShaders(program, maxcount, count, shaders); | 0 |
1030 | else | - |
1031 | funcs->getAttachedShaders = qglfResolveGetAttachedShaders; never executed: funcs->getAttachedShaders = qglfResolveGetAttachedShaders; | 0 |
1032 | } | - |
1033 | | - |
1034 | static int qglfResolveGetAttribLocation(GLuint program, const char* name) | - |
1035 | { | - |
1036 | typedef int ( * type_glGetAttribLocation)(GLuint program, const char* name); | - |
1037 | | - |
1038 | const QGLContext *context = QGLContext::currentContext(); | - |
1039 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
1040 | | - |
1041 | funcs->getAttribLocation = (type_glGetAttribLocation) | - |
1042 | context->getProcAddress(QLatin1String("glGetAttribLocation")); | - |
1043 | if (!funcs->getAttribLocation) { never evaluated: !funcs->getAttribLocation | 0 |
1044 | funcs->getAttribLocation = (type_glGetAttribLocation) | - |
1045 | context->getProcAddress(QLatin1String("glGetAttribLocationARB")); | - |
1046 | } | 0 |
1047 | | - |
1048 | if (funcs->getAttribLocation) never evaluated: funcs->getAttribLocation | 0 |
1049 | return funcs->getAttribLocation(program, name); never executed: return funcs->getAttribLocation(program, name); | 0 |
1050 | funcs->getAttribLocation = qglfResolveGetAttribLocation; | - |
1051 | return int(0); never executed: return int(0); | 0 |
1052 | } | - |
1053 | | - |
1054 | static void qglfResolveGetBufferParameteriv(GLenum target, GLenum pname, GLint* params) | - |
1055 | { | - |
1056 | typedef void ( * type_glGetBufferParameteriv)(GLenum target, GLenum pname, GLint* params); | - |
1057 | | - |
1058 | const QGLContext *context = QGLContext::currentContext(); | - |
1059 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
1060 | | - |
1061 | funcs->getBufferParameteriv = (type_glGetBufferParameteriv) | - |
1062 | context->getProcAddress(QLatin1String("glGetBufferParameteriv")); | - |
1063 | | - |
1064 | | - |
1065 | | - |
1066 | | - |
1067 | | - |
1068 | | - |
1069 | if (!funcs->getBufferParameteriv) { never evaluated: !funcs->getBufferParameteriv | 0 |
1070 | funcs->getBufferParameteriv = (type_glGetBufferParameteriv) | - |
1071 | context->getProcAddress(QLatin1String("glGetBufferParameterivEXT")); | - |
1072 | } | 0 |
1073 | if (!funcs->getBufferParameteriv) { never evaluated: !funcs->getBufferParameteriv | 0 |
1074 | funcs->getBufferParameteriv = (type_glGetBufferParameteriv) | - |
1075 | context->getProcAddress(QLatin1String("glGetBufferParameterivARB")); | - |
1076 | } | 0 |
1077 | | - |
1078 | if (funcs->getBufferParameteriv) never evaluated: funcs->getBufferParameteriv | 0 |
1079 | funcs->getBufferParameteriv(target, pname, params); never executed: funcs->getBufferParameteriv(target, pname, params); | 0 |
1080 | else | - |
1081 | funcs->getBufferParameteriv = qglfResolveGetBufferParameteriv; never executed: funcs->getBufferParameteriv = qglfResolveGetBufferParameteriv; | 0 |
1082 | } | - |
1083 | | - |
1084 | static void qglfResolveGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params) | - |
1085 | { | - |
1086 | typedef void ( * type_glGetFramebufferAttachmentParameteriv)(GLenum target, GLenum attachment, GLenum pname, GLint* params); | - |
1087 | | - |
1088 | const QGLContext *context = QGLContext::currentContext(); | - |
1089 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
1090 | | - |
1091 | funcs->getFramebufferAttachmentParameteriv = (type_glGetFramebufferAttachmentParameteriv) | - |
1092 | context->getProcAddress(QLatin1String("glGetFramebufferAttachmentParameteriv")); | - |
1093 | | - |
1094 | | - |
1095 | | - |
1096 | | - |
1097 | | - |
1098 | | - |
1099 | if (!funcs->getFramebufferAttachmentParameteriv) { never evaluated: !funcs->getFramebufferAttachmentParameteriv | 0 |
1100 | funcs->getFramebufferAttachmentParameteriv = (type_glGetFramebufferAttachmentParameteriv) | - |
1101 | context->getProcAddress(QLatin1String("glGetFramebufferAttachmentParameterivEXT")); | - |
1102 | } | 0 |
1103 | if (!funcs->getFramebufferAttachmentParameteriv) { never evaluated: !funcs->getFramebufferAttachmentParameteriv | 0 |
1104 | funcs->getFramebufferAttachmentParameteriv = (type_glGetFramebufferAttachmentParameteriv) | - |
1105 | context->getProcAddress(QLatin1String("glGetFramebufferAttachmentParameterivARB")); | - |
1106 | } | 0 |
1107 | | - |
1108 | if (funcs->getFramebufferAttachmentParameteriv) never evaluated: funcs->getFramebufferAttachmentParameteriv | 0 |
1109 | funcs->getFramebufferAttachmentParameteriv(target, attachment, pname, params); never executed: funcs->getFramebufferAttachmentParameteriv(target, attachment, pname, params); | 0 |
1110 | else | - |
1111 | funcs->getFramebufferAttachmentParameteriv = qglfResolveGetFramebufferAttachmentParameteriv; never executed: funcs->getFramebufferAttachmentParameteriv = qglfResolveGetFramebufferAttachmentParameteriv; | 0 |
1112 | } | - |
1113 | | - |
1114 | static void qglfResolveGetProgramiv(GLuint program, GLenum pname, GLint* params) | - |
1115 | { | - |
1116 | typedef void ( * type_glGetProgramiv)(GLuint program, GLenum pname, GLint* params); | - |
1117 | | - |
1118 | const QGLContext *context = QGLContext::currentContext(); | - |
1119 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
1120 | | - |
1121 | funcs->getProgramiv = (type_glGetProgramiv) | - |
1122 | context->getProcAddress(QLatin1String("glGetProgramiv")); | - |
1123 | if (!funcs->getProgramiv) { never evaluated: !funcs->getProgramiv | 0 |
1124 | funcs->getProgramiv = (type_glGetProgramiv) | - |
1125 | context->getProcAddress(QLatin1String("glGetObjectParameterivARB")); | - |
1126 | } | 0 |
1127 | | - |
1128 | if (funcs->getProgramiv) never evaluated: funcs->getProgramiv | 0 |
1129 | funcs->getProgramiv(program, pname, params); never executed: funcs->getProgramiv(program, pname, params); | 0 |
1130 | else | - |
1131 | funcs->getProgramiv = qglfResolveGetProgramiv; never executed: funcs->getProgramiv = qglfResolveGetProgramiv; | 0 |
1132 | } | - |
1133 | | - |
1134 | static void qglfResolveGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, char* infolog) | - |
1135 | { | - |
1136 | typedef void ( * type_glGetProgramInfoLog)(GLuint program, GLsizei bufsize, GLsizei* length, char* infolog); | - |
1137 | | - |
1138 | const QGLContext *context = QGLContext::currentContext(); | - |
1139 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
1140 | | - |
1141 | funcs->getProgramInfoLog = (type_glGetProgramInfoLog) | - |
1142 | context->getProcAddress(QLatin1String("glGetProgramInfoLog")); | - |
1143 | if (!funcs->getProgramInfoLog) { never evaluated: !funcs->getProgramInfoLog | 0 |
1144 | funcs->getProgramInfoLog = (type_glGetProgramInfoLog) | - |
1145 | context->getProcAddress(QLatin1String("glGetInfoLogARB")); | - |
1146 | } | 0 |
1147 | | - |
1148 | if (funcs->getProgramInfoLog) never evaluated: funcs->getProgramInfoLog | 0 |
1149 | funcs->getProgramInfoLog(program, bufsize, length, infolog); never executed: funcs->getProgramInfoLog(program, bufsize, length, infolog); | 0 |
1150 | else | - |
1151 | funcs->getProgramInfoLog = qglfResolveGetProgramInfoLog; never executed: funcs->getProgramInfoLog = qglfResolveGetProgramInfoLog; | 0 |
1152 | } | - |
1153 | | - |
1154 | static void qglfResolveGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params) | - |
1155 | { | - |
1156 | typedef void ( * type_glGetRenderbufferParameteriv)(GLenum target, GLenum pname, GLint* params); | - |
1157 | | - |
1158 | const QGLContext *context = QGLContext::currentContext(); | - |
1159 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
1160 | | - |
1161 | funcs->getRenderbufferParameteriv = (type_glGetRenderbufferParameteriv) | - |
1162 | context->getProcAddress(QLatin1String("glGetRenderbufferParameteriv")); | - |
1163 | | - |
1164 | | - |
1165 | | - |
1166 | | - |
1167 | | - |
1168 | | - |
1169 | if (!funcs->getRenderbufferParameteriv) { never evaluated: !funcs->getRenderbufferParameteriv | 0 |
1170 | funcs->getRenderbufferParameteriv = (type_glGetRenderbufferParameteriv) | - |
1171 | context->getProcAddress(QLatin1String("glGetRenderbufferParameterivEXT")); | - |
1172 | } | 0 |
1173 | if (!funcs->getRenderbufferParameteriv) { never evaluated: !funcs->getRenderbufferParameteriv | 0 |
1174 | funcs->getRenderbufferParameteriv = (type_glGetRenderbufferParameteriv) | - |
1175 | context->getProcAddress(QLatin1String("glGetRenderbufferParameterivARB")); | - |
1176 | } | 0 |
1177 | | - |
1178 | if (funcs->getRenderbufferParameteriv) never evaluated: funcs->getRenderbufferParameteriv | 0 |
1179 | funcs->getRenderbufferParameteriv(target, pname, params); never executed: funcs->getRenderbufferParameteriv(target, pname, params); | 0 |
1180 | else | - |
1181 | funcs->getRenderbufferParameteriv = qglfResolveGetRenderbufferParameteriv; never executed: funcs->getRenderbufferParameteriv = qglfResolveGetRenderbufferParameteriv; | 0 |
1182 | } | - |
1183 | | - |
1184 | static void qglfResolveGetShaderiv(GLuint shader, GLenum pname, GLint* params) | - |
1185 | { | - |
1186 | typedef void ( * type_glGetShaderiv)(GLuint shader, GLenum pname, GLint* params); | - |
1187 | | - |
1188 | const QGLContext *context = QGLContext::currentContext(); | - |
1189 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
1190 | | - |
1191 | funcs->getShaderiv = (type_glGetShaderiv) | - |
1192 | context->getProcAddress(QLatin1String("glGetShaderiv")); | - |
1193 | if (!funcs->getShaderiv) { never evaluated: !funcs->getShaderiv | 0 |
1194 | funcs->getShaderiv = (type_glGetShaderiv) | - |
1195 | context->getProcAddress(QLatin1String("glGetObjectParameterivARB")); | - |
1196 | } | 0 |
1197 | | - |
1198 | if (funcs->getShaderiv) never evaluated: funcs->getShaderiv | 0 |
1199 | funcs->getShaderiv(shader, pname, params); never executed: funcs->getShaderiv(shader, pname, params); | 0 |
1200 | else | - |
1201 | funcs->getShaderiv = qglfResolveGetShaderiv; never executed: funcs->getShaderiv = qglfResolveGetShaderiv; | 0 |
1202 | } | - |
1203 | | - |
1204 | static void qglfResolveGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog) | - |
1205 | { | - |
1206 | typedef void ( * type_glGetShaderInfoLog)(GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog); | - |
1207 | | - |
1208 | const QGLContext *context = QGLContext::currentContext(); | - |
1209 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
1210 | | - |
1211 | funcs->getShaderInfoLog = (type_glGetShaderInfoLog) | - |
1212 | context->getProcAddress(QLatin1String("glGetShaderInfoLog")); | - |
1213 | if (!funcs->getShaderInfoLog) { never evaluated: !funcs->getShaderInfoLog | 0 |
1214 | funcs->getShaderInfoLog = (type_glGetShaderInfoLog) | - |
1215 | context->getProcAddress(QLatin1String("glGetInfoLogARB")); | - |
1216 | } | 0 |
1217 | | - |
1218 | if (funcs->getShaderInfoLog) never evaluated: funcs->getShaderInfoLog | 0 |
1219 | funcs->getShaderInfoLog(shader, bufsize, length, infolog); never executed: funcs->getShaderInfoLog(shader, bufsize, length, infolog); | 0 |
1220 | else | - |
1221 | funcs->getShaderInfoLog = qglfResolveGetShaderInfoLog; never executed: funcs->getShaderInfoLog = qglfResolveGetShaderInfoLog; | 0 |
1222 | } | - |
1223 | | - |
1224 | static void qglfSpecialGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) | - |
1225 | { | - |
1226 | (void)shadertype;; | - |
1227 | (void)precisiontype;; | - |
1228 | range[0] = range[1] = precision[0] = 0; | - |
1229 | } | 0 |
1230 | | - |
1231 | static void qglfResolveGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) | - |
1232 | { | - |
1233 | typedef void ( * type_glGetShaderPrecisionFormat)(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision); | - |
1234 | | - |
1235 | const QGLContext *context = QGLContext::currentContext(); | - |
1236 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
1237 | | - |
1238 | funcs->getShaderPrecisionFormat = (type_glGetShaderPrecisionFormat) | - |
1239 | context->getProcAddress(QLatin1String("glGetShaderPrecisionFormat")); | - |
1240 | | - |
1241 | | - |
1242 | | - |
1243 | | - |
1244 | | - |
1245 | | - |
1246 | if (!funcs->getShaderPrecisionFormat) { never evaluated: !funcs->getShaderPrecisionFormat | 0 |
1247 | funcs->getShaderPrecisionFormat = (type_glGetShaderPrecisionFormat) | - |
1248 | context->getProcAddress(QLatin1String("glGetShaderPrecisionFormatEXT")); | - |
1249 | } | 0 |
1250 | if (!funcs->getShaderPrecisionFormat) { never evaluated: !funcs->getShaderPrecisionFormat | 0 |
1251 | funcs->getShaderPrecisionFormat = (type_glGetShaderPrecisionFormat) | - |
1252 | context->getProcAddress(QLatin1String("glGetShaderPrecisionFormatARB")); | - |
1253 | } | 0 |
1254 | | - |
1255 | if (!funcs->getShaderPrecisionFormat) never evaluated: !funcs->getShaderPrecisionFormat | 0 |
1256 | funcs->getShaderPrecisionFormat = qglfSpecialGetShaderPrecisionFormat; never executed: funcs->getShaderPrecisionFormat = qglfSpecialGetShaderPrecisionFormat; | 0 |
1257 | | - |
1258 | funcs->getShaderPrecisionFormat(shadertype, precisiontype, range, precision); | - |
1259 | } | 0 |
1260 | | - |
1261 | static void qglfResolveGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, char* source) | - |
1262 | { | - |
1263 | typedef void ( * type_glGetShaderSource)(GLuint shader, GLsizei bufsize, GLsizei* length, char* source); | - |
1264 | | - |
1265 | const QGLContext *context = QGLContext::currentContext(); | - |
1266 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
1267 | | - |
1268 | funcs->getShaderSource = (type_glGetShaderSource) | - |
1269 | context->getProcAddress(QLatin1String("glGetShaderSource")); | - |
1270 | if (!funcs->getShaderSource) { never evaluated: !funcs->getShaderSource | 0 |
1271 | funcs->getShaderSource = (type_glGetShaderSource) | - |
1272 | context->getProcAddress(QLatin1String("glGetShaderSourceARB")); | - |
1273 | } | 0 |
1274 | | - |
1275 | if (funcs->getShaderSource) never evaluated: funcs->getShaderSource | 0 |
1276 | funcs->getShaderSource(shader, bufsize, length, source); never executed: funcs->getShaderSource(shader, bufsize, length, source); | 0 |
1277 | else | - |
1278 | funcs->getShaderSource = qglfResolveGetShaderSource; never executed: funcs->getShaderSource = qglfResolveGetShaderSource; | 0 |
1279 | } | - |
1280 | | - |
1281 | static void qglfResolveGetUniformfv(GLuint program, GLint location, GLfloat* params) | - |
1282 | { | - |
1283 | typedef void ( * type_glGetUniformfv)(GLuint program, GLint location, GLfloat* params); | - |
1284 | | - |
1285 | const QGLContext *context = QGLContext::currentContext(); | - |
1286 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
1287 | | - |
1288 | funcs->getUniformfv = (type_glGetUniformfv) | - |
1289 | context->getProcAddress(QLatin1String("glGetUniformfv")); | - |
1290 | if (!funcs->getUniformfv) { never evaluated: !funcs->getUniformfv | 0 |
1291 | funcs->getUniformfv = (type_glGetUniformfv) | - |
1292 | context->getProcAddress(QLatin1String("glGetUniformfvARB")); | - |
1293 | } | 0 |
1294 | | - |
1295 | if (funcs->getUniformfv) never evaluated: funcs->getUniformfv | 0 |
1296 | funcs->getUniformfv(program, location, params); never executed: funcs->getUniformfv(program, location, params); | 0 |
1297 | else | - |
1298 | funcs->getUniformfv = qglfResolveGetUniformfv; never executed: funcs->getUniformfv = qglfResolveGetUniformfv; | 0 |
1299 | } | - |
1300 | | - |
1301 | static void qglfResolveGetUniformiv(GLuint program, GLint location, GLint* params) | - |
1302 | { | - |
1303 | typedef void ( * type_glGetUniformiv)(GLuint program, GLint location, GLint* params); | - |
1304 | | - |
1305 | const QGLContext *context = QGLContext::currentContext(); | - |
1306 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
1307 | | - |
1308 | funcs->getUniformiv = (type_glGetUniformiv) | - |
1309 | context->getProcAddress(QLatin1String("glGetUniformiv")); | - |
1310 | if (!funcs->getUniformiv) { never evaluated: !funcs->getUniformiv | 0 |
1311 | funcs->getUniformiv = (type_glGetUniformiv) | - |
1312 | context->getProcAddress(QLatin1String("glGetUniformivARB")); | - |
1313 | } | 0 |
1314 | | - |
1315 | if (funcs->getUniformiv) never evaluated: funcs->getUniformiv | 0 |
1316 | funcs->getUniformiv(program, location, params); never executed: funcs->getUniformiv(program, location, params); | 0 |
1317 | else | - |
1318 | funcs->getUniformiv = qglfResolveGetUniformiv; never executed: funcs->getUniformiv = qglfResolveGetUniformiv; | 0 |
1319 | } | - |
1320 | | - |
1321 | static int qglfResolveGetUniformLocation(GLuint program, const char* name) | - |
1322 | { | - |
1323 | typedef int ( * type_glGetUniformLocation)(GLuint program, const char* name); | - |
1324 | | - |
1325 | const QGLContext *context = QGLContext::currentContext(); | - |
1326 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
1327 | | - |
1328 | funcs->getUniformLocation = (type_glGetUniformLocation) | - |
1329 | context->getProcAddress(QLatin1String("glGetUniformLocation")); | - |
1330 | if (!funcs->getUniformLocation) { never evaluated: !funcs->getUniformLocation | 0 |
1331 | funcs->getUniformLocation = (type_glGetUniformLocation) | - |
1332 | context->getProcAddress(QLatin1String("glGetUniformLocationARB")); | - |
1333 | } | 0 |
1334 | | - |
1335 | if (funcs->getUniformLocation) never evaluated: funcs->getUniformLocation | 0 |
1336 | return funcs->getUniformLocation(program, name); never executed: return funcs->getUniformLocation(program, name); | 0 |
1337 | funcs->getUniformLocation = qglfResolveGetUniformLocation; | - |
1338 | return int(0); never executed: return int(0); | 0 |
1339 | } | - |
1340 | | - |
1341 | static void qglfResolveGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params) | - |
1342 | { | - |
1343 | typedef void ( * type_glGetVertexAttribfv)(GLuint index, GLenum pname, GLfloat* params); | - |
1344 | | - |
1345 | const QGLContext *context = QGLContext::currentContext(); | - |
1346 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
1347 | | - |
1348 | funcs->getVertexAttribfv = (type_glGetVertexAttribfv) | - |
1349 | context->getProcAddress(QLatin1String("glGetVertexAttribfv")); | - |
1350 | if (!funcs->getVertexAttribfv) { never evaluated: !funcs->getVertexAttribfv | 0 |
1351 | funcs->getVertexAttribfv = (type_glGetVertexAttribfv) | - |
1352 | context->getProcAddress(QLatin1String("glGetVertexAttribfvARB")); | - |
1353 | } | 0 |
1354 | | - |
1355 | if (funcs->getVertexAttribfv) never evaluated: funcs->getVertexAttribfv | 0 |
1356 | funcs->getVertexAttribfv(index, pname, params); never executed: funcs->getVertexAttribfv(index, pname, params); | 0 |
1357 | else | - |
1358 | funcs->getVertexAttribfv = qglfResolveGetVertexAttribfv; never executed: funcs->getVertexAttribfv = qglfResolveGetVertexAttribfv; | 0 |
1359 | } | - |
1360 | | - |
1361 | static void qglfResolveGetVertexAttribiv(GLuint index, GLenum pname, GLint* params) | - |
1362 | { | - |
1363 | typedef void ( * type_glGetVertexAttribiv)(GLuint index, GLenum pname, GLint* params); | - |
1364 | | - |
1365 | const QGLContext *context = QGLContext::currentContext(); | - |
1366 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
1367 | | - |
1368 | funcs->getVertexAttribiv = (type_glGetVertexAttribiv) | - |
1369 | context->getProcAddress(QLatin1String("glGetVertexAttribiv")); | - |
1370 | if (!funcs->getVertexAttribiv) { never evaluated: !funcs->getVertexAttribiv | 0 |
1371 | funcs->getVertexAttribiv = (type_glGetVertexAttribiv) | - |
1372 | context->getProcAddress(QLatin1String("glGetVertexAttribivARB")); | - |
1373 | } | 0 |
1374 | | - |
1375 | if (funcs->getVertexAttribiv) never evaluated: funcs->getVertexAttribiv | 0 |
1376 | funcs->getVertexAttribiv(index, pname, params); never executed: funcs->getVertexAttribiv(index, pname, params); | 0 |
1377 | else | - |
1378 | funcs->getVertexAttribiv = qglfResolveGetVertexAttribiv; never executed: funcs->getVertexAttribiv = qglfResolveGetVertexAttribiv; | 0 |
1379 | } | - |
1380 | | - |
1381 | static void qglfResolveGetVertexAttribPointerv(GLuint index, GLenum pname, void** pointer) | - |
1382 | { | - |
1383 | typedef void ( * type_glGetVertexAttribPointerv)(GLuint index, GLenum pname, void** pointer); | - |
1384 | | - |
1385 | const QGLContext *context = QGLContext::currentContext(); | - |
1386 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
1387 | | - |
1388 | funcs->getVertexAttribPointerv = (type_glGetVertexAttribPointerv) | - |
1389 | context->getProcAddress(QLatin1String("glGetVertexAttribPointerv")); | - |
1390 | if (!funcs->getVertexAttribPointerv) { never evaluated: !funcs->getVertexAttribPointerv | 0 |
1391 | funcs->getVertexAttribPointerv = (type_glGetVertexAttribPointerv) | - |
1392 | context->getProcAddress(QLatin1String("glGetVertexAttribPointervARB")); | - |
1393 | } | 0 |
1394 | | - |
1395 | if (funcs->getVertexAttribPointerv) never evaluated: funcs->getVertexAttribPointerv | 0 |
1396 | funcs->getVertexAttribPointerv(index, pname, pointer); never executed: funcs->getVertexAttribPointerv(index, pname, pointer); | 0 |
1397 | else | - |
1398 | funcs->getVertexAttribPointerv = qglfResolveGetVertexAttribPointerv; never executed: funcs->getVertexAttribPointerv = qglfResolveGetVertexAttribPointerv; | 0 |
1399 | } | - |
1400 | | - |
1401 | static GLboolean qglfResolveIsBuffer(GLuint buffer) | - |
1402 | { | - |
1403 | typedef GLboolean ( * type_glIsBuffer)(GLuint buffer); | - |
1404 | | - |
1405 | const QGLContext *context = QGLContext::currentContext(); | - |
1406 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
1407 | | - |
1408 | funcs->isBuffer = (type_glIsBuffer) | - |
1409 | context->getProcAddress(QLatin1String("glIsBuffer")); | - |
1410 | | - |
1411 | | - |
1412 | | - |
1413 | | - |
1414 | | - |
1415 | | - |
1416 | if (!funcs->isBuffer) { never evaluated: !funcs->isBuffer | 0 |
1417 | funcs->isBuffer = (type_glIsBuffer) | - |
1418 | context->getProcAddress(QLatin1String("glIsBufferEXT")); | - |
1419 | } | 0 |
1420 | if (!funcs->isBuffer) { never evaluated: !funcs->isBuffer | 0 |
1421 | funcs->isBuffer = (type_glIsBuffer) | - |
1422 | context->getProcAddress(QLatin1String("glIsBufferARB")); | - |
1423 | } | 0 |
1424 | | - |
1425 | if (funcs->isBuffer) never evaluated: funcs->isBuffer | 0 |
1426 | return funcs->isBuffer(buffer); never executed: return funcs->isBuffer(buffer); | 0 |
1427 | funcs->isBuffer = qglfResolveIsBuffer; | - |
1428 | return GLboolean(0); never executed: return GLboolean(0); | 0 |
1429 | } | - |
1430 | | - |
1431 | static GLboolean qglfResolveIsFramebuffer(GLuint framebuffer) | - |
1432 | { | - |
1433 | typedef GLboolean ( * type_glIsFramebuffer)(GLuint framebuffer); | - |
1434 | | - |
1435 | const QGLContext *context = QGLContext::currentContext(); | - |
1436 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
1437 | | - |
1438 | funcs->isFramebuffer = (type_glIsFramebuffer) | - |
1439 | context->getProcAddress(QLatin1String("glIsFramebuffer")); | - |
1440 | | - |
1441 | | - |
1442 | | - |
1443 | | - |
1444 | | - |
1445 | | - |
1446 | if (!funcs->isFramebuffer) { never evaluated: !funcs->isFramebuffer | 0 |
1447 | funcs->isFramebuffer = (type_glIsFramebuffer) | - |
1448 | context->getProcAddress(QLatin1String("glIsFramebufferEXT")); | - |
1449 | } | 0 |
1450 | if (!funcs->isFramebuffer) { never evaluated: !funcs->isFramebuffer | 0 |
1451 | funcs->isFramebuffer = (type_glIsFramebuffer) | - |
1452 | context->getProcAddress(QLatin1String("glIsFramebufferARB")); | - |
1453 | } | 0 |
1454 | | - |
1455 | if (funcs->isFramebuffer) never evaluated: funcs->isFramebuffer | 0 |
1456 | return funcs->isFramebuffer(framebuffer); never executed: return funcs->isFramebuffer(framebuffer); | 0 |
1457 | funcs->isFramebuffer = qglfResolveIsFramebuffer; | - |
1458 | return GLboolean(0); never executed: return GLboolean(0); | 0 |
1459 | } | - |
1460 | | - |
1461 | static GLboolean qglfSpecialIsProgram(GLuint program) | - |
1462 | { | - |
1463 | return program != 0; never executed: return program != 0; | 0 |
1464 | } | - |
1465 | | - |
1466 | static GLboolean qglfResolveIsProgram(GLuint program) | - |
1467 | { | - |
1468 | typedef GLboolean ( * type_glIsProgram)(GLuint program); | - |
1469 | | - |
1470 | const QGLContext *context = QGLContext::currentContext(); | - |
1471 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
1472 | | - |
1473 | funcs->isProgram = (type_glIsProgram) | - |
1474 | context->getProcAddress(QLatin1String("glIsProgram")); | - |
1475 | if (!funcs->isProgram) { never evaluated: !funcs->isProgram | 0 |
1476 | funcs->isProgram = (type_glIsProgram) | - |
1477 | context->getProcAddress(QLatin1String("glIsProgramARB")); | - |
1478 | } | 0 |
1479 | | - |
1480 | if (!funcs->isProgram) never evaluated: !funcs->isProgram | 0 |
1481 | funcs->isProgram = qglfSpecialIsProgram; never executed: funcs->isProgram = qglfSpecialIsProgram; | 0 |
1482 | | - |
1483 | return funcs->isProgram(program); never executed: return funcs->isProgram(program); | 0 |
1484 | } | - |
1485 | | - |
1486 | static GLboolean qglfResolveIsRenderbuffer(GLuint renderbuffer) | - |
1487 | { | - |
1488 | typedef GLboolean ( * type_glIsRenderbuffer)(GLuint renderbuffer); | - |
1489 | | - |
1490 | const QGLContext *context = QGLContext::currentContext(); | - |
1491 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
1492 | | - |
1493 | funcs->isRenderbuffer = (type_glIsRenderbuffer) | - |
1494 | context->getProcAddress(QLatin1String("glIsRenderbuffer")); | - |
1495 | | - |
1496 | | - |
1497 | | - |
1498 | | - |
1499 | | - |
1500 | | - |
1501 | if (!funcs->isRenderbuffer) { never evaluated: !funcs->isRenderbuffer | 0 |
1502 | funcs->isRenderbuffer = (type_glIsRenderbuffer) | - |
1503 | context->getProcAddress(QLatin1String("glIsRenderbufferEXT")); | - |
1504 | } | 0 |
1505 | if (!funcs->isRenderbuffer) { never evaluated: !funcs->isRenderbuffer | 0 |
1506 | funcs->isRenderbuffer = (type_glIsRenderbuffer) | - |
1507 | context->getProcAddress(QLatin1String("glIsRenderbufferARB")); | - |
1508 | } | 0 |
1509 | | - |
1510 | if (funcs->isRenderbuffer) never evaluated: funcs->isRenderbuffer | 0 |
1511 | return funcs->isRenderbuffer(renderbuffer); never executed: return funcs->isRenderbuffer(renderbuffer); | 0 |
1512 | funcs->isRenderbuffer = qglfResolveIsRenderbuffer; | - |
1513 | return GLboolean(0); never executed: return GLboolean(0); | 0 |
1514 | } | - |
1515 | | - |
1516 | static GLboolean qglfSpecialIsShader(GLuint shader) | - |
1517 | { | - |
1518 | return shader != 0; never executed: return shader != 0; | 0 |
1519 | } | - |
1520 | | - |
1521 | static GLboolean qglfResolveIsShader(GLuint shader) | - |
1522 | { | - |
1523 | typedef GLboolean ( * type_glIsShader)(GLuint shader); | - |
1524 | | - |
1525 | const QGLContext *context = QGLContext::currentContext(); | - |
1526 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
1527 | | - |
1528 | funcs->isShader = (type_glIsShader) | - |
1529 | context->getProcAddress(QLatin1String("glIsShader")); | - |
1530 | if (!funcs->isShader) { never evaluated: !funcs->isShader | 0 |
1531 | funcs->isShader = (type_glIsShader) | - |
1532 | context->getProcAddress(QLatin1String("glIsShaderARB")); | - |
1533 | } | 0 |
1534 | | - |
1535 | if (!funcs->isShader) never evaluated: !funcs->isShader | 0 |
1536 | funcs->isShader = qglfSpecialIsShader; never executed: funcs->isShader = qglfSpecialIsShader; | 0 |
1537 | | - |
1538 | return funcs->isShader(shader); never executed: return funcs->isShader(shader); | 0 |
1539 | } | - |
1540 | | - |
1541 | static void qglfResolveLinkProgram(GLuint program) | - |
1542 | { | - |
1543 | typedef void ( * type_glLinkProgram)(GLuint program); | - |
1544 | | - |
1545 | const QGLContext *context = QGLContext::currentContext(); | - |
1546 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
1547 | | - |
1548 | funcs->linkProgram = (type_glLinkProgram) | - |
1549 | context->getProcAddress(QLatin1String("glLinkProgram")); | - |
1550 | if (!funcs->linkProgram) { never evaluated: !funcs->linkProgram | 0 |
1551 | funcs->linkProgram = (type_glLinkProgram) | - |
1552 | context->getProcAddress(QLatin1String("glLinkProgramARB")); | - |
1553 | } | 0 |
1554 | | - |
1555 | if (funcs->linkProgram) never evaluated: funcs->linkProgram | 0 |
1556 | funcs->linkProgram(program); never executed: funcs->linkProgram(program); | 0 |
1557 | else | - |
1558 | funcs->linkProgram = qglfResolveLinkProgram; never executed: funcs->linkProgram = qglfResolveLinkProgram; | 0 |
1559 | } | - |
1560 | | - |
1561 | static void qglfSpecialReleaseShaderCompiler() | - |
1562 | { | - |
1563 | } | - |
1564 | | - |
1565 | static void qglfResolveReleaseShaderCompiler() | - |
1566 | { | - |
1567 | typedef void ( * type_glReleaseShaderCompiler)(); | - |
1568 | | - |
1569 | const QGLContext *context = QGLContext::currentContext(); | - |
1570 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
1571 | | - |
1572 | funcs->releaseShaderCompiler = (type_glReleaseShaderCompiler) | - |
1573 | context->getProcAddress(QLatin1String("glReleaseShaderCompiler")); | - |
1574 | if (!funcs->releaseShaderCompiler) { never evaluated: !funcs->releaseShaderCompiler | 0 |
1575 | funcs->releaseShaderCompiler = (type_glReleaseShaderCompiler) | - |
1576 | context->getProcAddress(QLatin1String("glReleaseShaderCompilerARB")); | - |
1577 | } | 0 |
1578 | | - |
1579 | if (!funcs->releaseShaderCompiler) never evaluated: !funcs->releaseShaderCompiler | 0 |
1580 | funcs->releaseShaderCompiler = qglfSpecialReleaseShaderCompiler; never executed: funcs->releaseShaderCompiler = qglfSpecialReleaseShaderCompiler; | 0 |
1581 | | - |
1582 | funcs->releaseShaderCompiler(); | - |
1583 | } | 0 |
1584 | | - |
1585 | static void qglfResolveRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) | - |
1586 | { | - |
1587 | typedef void ( * type_glRenderbufferStorage)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height); | - |
1588 | | - |
1589 | const QGLContext *context = QGLContext::currentContext(); | - |
1590 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
1591 | | - |
1592 | funcs->renderbufferStorage = (type_glRenderbufferStorage) | - |
1593 | context->getProcAddress(QLatin1String("glRenderbufferStorage")); | - |
1594 | | - |
1595 | | - |
1596 | | - |
1597 | | - |
1598 | | - |
1599 | | - |
1600 | if (!funcs->renderbufferStorage) { never evaluated: !funcs->renderbufferStorage | 0 |
1601 | funcs->renderbufferStorage = (type_glRenderbufferStorage) | - |
1602 | context->getProcAddress(QLatin1String("glRenderbufferStorageEXT")); | - |
1603 | } | 0 |
1604 | if (!funcs->renderbufferStorage) { never evaluated: !funcs->renderbufferStorage | 0 |
1605 | funcs->renderbufferStorage = (type_glRenderbufferStorage) | - |
1606 | context->getProcAddress(QLatin1String("glRenderbufferStorageARB")); | - |
1607 | } | 0 |
1608 | | - |
1609 | if (funcs->renderbufferStorage) never evaluated: funcs->renderbufferStorage | 0 |
1610 | funcs->renderbufferStorage(target, internalformat, width, height); never executed: funcs->renderbufferStorage(target, internalformat, width, height); | 0 |
1611 | else | - |
1612 | funcs->renderbufferStorage = qglfResolveRenderbufferStorage; never executed: funcs->renderbufferStorage = qglfResolveRenderbufferStorage; | 0 |
1613 | } | - |
1614 | | - |
1615 | static void qglfResolveSampleCoverage(GLclampf value, GLboolean invert) | - |
1616 | { | - |
1617 | typedef void ( * type_glSampleCoverage)(GLclampf value, GLboolean invert); | - |
1618 | | - |
1619 | const QGLContext *context = QGLContext::currentContext(); | - |
1620 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
1621 | | - |
1622 | funcs->sampleCoverage = (type_glSampleCoverage) | - |
1623 | context->getProcAddress(QLatin1String("glSampleCoverage")); | - |
1624 | | - |
1625 | | - |
1626 | | - |
1627 | | - |
1628 | | - |
1629 | | - |
1630 | if (!funcs->sampleCoverage) { never evaluated: !funcs->sampleCoverage | 0 |
1631 | funcs->sampleCoverage = (type_glSampleCoverage) | - |
1632 | context->getProcAddress(QLatin1String("glSampleCoverageEXT")); | - |
1633 | } | 0 |
1634 | if (!funcs->sampleCoverage) { never evaluated: !funcs->sampleCoverage | 0 |
1635 | funcs->sampleCoverage = (type_glSampleCoverage) | - |
1636 | context->getProcAddress(QLatin1String("glSampleCoverageARB")); | - |
1637 | } | 0 |
1638 | | - |
1639 | if (funcs->sampleCoverage) never evaluated: funcs->sampleCoverage | 0 |
1640 | funcs->sampleCoverage(value, invert); never executed: funcs->sampleCoverage(value, invert); | 0 |
1641 | else | - |
1642 | funcs->sampleCoverage = qglfResolveSampleCoverage; never executed: funcs->sampleCoverage = qglfResolveSampleCoverage; | 0 |
1643 | } | - |
1644 | | - |
1645 | static void qglfResolveShaderBinary(GLint n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLint length) | - |
1646 | { | - |
1647 | typedef void ( * type_glShaderBinary)(GLint n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLint length); | - |
1648 | | - |
1649 | const QGLContext *context = QGLContext::currentContext(); | - |
1650 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
1651 | | - |
1652 | funcs->shaderBinary = (type_glShaderBinary) | - |
1653 | context->getProcAddress(QLatin1String("glShaderBinary")); | - |
1654 | if (!funcs->shaderBinary) { never evaluated: !funcs->shaderBinary | 0 |
1655 | funcs->shaderBinary = (type_glShaderBinary) | - |
1656 | context->getProcAddress(QLatin1String("glShaderBinaryARB")); | - |
1657 | } | 0 |
1658 | | - |
1659 | if (funcs->shaderBinary) never evaluated: funcs->shaderBinary | 0 |
1660 | funcs->shaderBinary(n, shaders, binaryformat, binary, length); never executed: funcs->shaderBinary(n, shaders, binaryformat, binary, length); | 0 |
1661 | else | - |
1662 | funcs->shaderBinary = qglfResolveShaderBinary; never executed: funcs->shaderBinary = qglfResolveShaderBinary; | 0 |
1663 | } | - |
1664 | | - |
1665 | static void qglfResolveShaderSource(GLuint shader, GLsizei count, const char** string, const GLint* length) | - |
1666 | { | - |
1667 | typedef void ( * type_glShaderSource)(GLuint shader, GLsizei count, const char** string, const GLint* length); | - |
1668 | | - |
1669 | const QGLContext *context = QGLContext::currentContext(); | - |
1670 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
1671 | | - |
1672 | funcs->shaderSource = (type_glShaderSource) | - |
1673 | context->getProcAddress(QLatin1String("glShaderSource")); | - |
1674 | if (!funcs->shaderSource) { never evaluated: !funcs->shaderSource | 0 |
1675 | funcs->shaderSource = (type_glShaderSource) | - |
1676 | context->getProcAddress(QLatin1String("glShaderSourceARB")); | - |
1677 | } | 0 |
1678 | | - |
1679 | if (funcs->shaderSource) never evaluated: funcs->shaderSource | 0 |
1680 | funcs->shaderSource(shader, count, string, length); never executed: funcs->shaderSource(shader, count, string, length); | 0 |
1681 | else | - |
1682 | funcs->shaderSource = qglfResolveShaderSource; never executed: funcs->shaderSource = qglfResolveShaderSource; | 0 |
1683 | } | - |
1684 | | - |
1685 | static void qglfResolveStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask) | - |
1686 | { | - |
1687 | typedef void ( * type_glStencilFuncSeparate)(GLenum face, GLenum func, GLint ref, GLuint mask); | - |
1688 | | - |
1689 | const QGLContext *context = QGLContext::currentContext(); | - |
1690 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
1691 | | - |
1692 | funcs->stencilFuncSeparate = (type_glStencilFuncSeparate) | - |
1693 | context->getProcAddress(QLatin1String("glStencilFuncSeparate")); | - |
1694 | | - |
1695 | | - |
1696 | | - |
1697 | | - |
1698 | | - |
1699 | | - |
1700 | if (!funcs->stencilFuncSeparate) { never evaluated: !funcs->stencilFuncSeparate | 0 |
1701 | funcs->stencilFuncSeparate = (type_glStencilFuncSeparate) | - |
1702 | context->getProcAddress(QLatin1String("glStencilFuncSeparateEXT")); | - |
1703 | } | 0 |
1704 | if (!funcs->stencilFuncSeparate) { never evaluated: !funcs->stencilFuncSeparate | 0 |
1705 | funcs->stencilFuncSeparate = (type_glStencilFuncSeparate) | - |
1706 | context->getProcAddress(QLatin1String("glStencilFuncSeparateARB")); | - |
1707 | } | 0 |
1708 | | - |
1709 | if (funcs->stencilFuncSeparate) never evaluated: funcs->stencilFuncSeparate | 0 |
1710 | funcs->stencilFuncSeparate(face, func, ref, mask); never executed: funcs->stencilFuncSeparate(face, func, ref, mask); | 0 |
1711 | else | - |
1712 | funcs->stencilFuncSeparate = qglfResolveStencilFuncSeparate; never executed: funcs->stencilFuncSeparate = qglfResolveStencilFuncSeparate; | 0 |
1713 | } | - |
1714 | | - |
1715 | static void qglfResolveStencilMaskSeparate(GLenum face, GLuint mask) | - |
1716 | { | - |
1717 | typedef void ( * type_glStencilMaskSeparate)(GLenum face, GLuint mask); | - |
1718 | | - |
1719 | const QGLContext *context = QGLContext::currentContext(); | - |
1720 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
1721 | | - |
1722 | funcs->stencilMaskSeparate = (type_glStencilMaskSeparate) | - |
1723 | context->getProcAddress(QLatin1String("glStencilMaskSeparate")); | - |
1724 | | - |
1725 | | - |
1726 | | - |
1727 | | - |
1728 | | - |
1729 | | - |
1730 | if (!funcs->stencilMaskSeparate) { never evaluated: !funcs->stencilMaskSeparate | 0 |
1731 | funcs->stencilMaskSeparate = (type_glStencilMaskSeparate) | - |
1732 | context->getProcAddress(QLatin1String("glStencilMaskSeparateEXT")); | - |
1733 | } | 0 |
1734 | if (!funcs->stencilMaskSeparate) { never evaluated: !funcs->stencilMaskSeparate | 0 |
1735 | funcs->stencilMaskSeparate = (type_glStencilMaskSeparate) | - |
1736 | context->getProcAddress(QLatin1String("glStencilMaskSeparateARB")); | - |
1737 | } | 0 |
1738 | | - |
1739 | if (funcs->stencilMaskSeparate) never evaluated: funcs->stencilMaskSeparate | 0 |
1740 | funcs->stencilMaskSeparate(face, mask); never executed: funcs->stencilMaskSeparate(face, mask); | 0 |
1741 | else | - |
1742 | funcs->stencilMaskSeparate = qglfResolveStencilMaskSeparate; never executed: funcs->stencilMaskSeparate = qglfResolveStencilMaskSeparate; | 0 |
1743 | } | - |
1744 | | - |
1745 | static void qglfResolveStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass) | - |
1746 | { | - |
1747 | typedef void ( * type_glStencilOpSeparate)(GLenum face, GLenum fail, GLenum zfail, GLenum zpass); | - |
1748 | | - |
1749 | const QGLContext *context = QGLContext::currentContext(); | - |
1750 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
1751 | | - |
1752 | funcs->stencilOpSeparate = (type_glStencilOpSeparate) | - |
1753 | context->getProcAddress(QLatin1String("glStencilOpSeparate")); | - |
1754 | | - |
1755 | | - |
1756 | | - |
1757 | | - |
1758 | | - |
1759 | | - |
1760 | if (!funcs->stencilOpSeparate) { never evaluated: !funcs->stencilOpSeparate | 0 |
1761 | funcs->stencilOpSeparate = (type_glStencilOpSeparate) | - |
1762 | context->getProcAddress(QLatin1String("glStencilOpSeparateEXT")); | - |
1763 | } | 0 |
1764 | if (!funcs->stencilOpSeparate) { never evaluated: !funcs->stencilOpSeparate | 0 |
1765 | funcs->stencilOpSeparate = (type_glStencilOpSeparate) | - |
1766 | context->getProcAddress(QLatin1String("glStencilOpSeparateARB")); | - |
1767 | } | 0 |
1768 | | - |
1769 | if (funcs->stencilOpSeparate) never evaluated: funcs->stencilOpSeparate | 0 |
1770 | funcs->stencilOpSeparate(face, fail, zfail, zpass); never executed: funcs->stencilOpSeparate(face, fail, zfail, zpass); | 0 |
1771 | else | - |
1772 | funcs->stencilOpSeparate = qglfResolveStencilOpSeparate; never executed: funcs->stencilOpSeparate = qglfResolveStencilOpSeparate; | 0 |
1773 | } | - |
1774 | | - |
1775 | static void qglfResolveUniform1f(GLint location, GLfloat x) | - |
1776 | { | - |
1777 | typedef void ( * type_glUniform1f)(GLint location, GLfloat x); | - |
1778 | | - |
1779 | const QGLContext *context = QGLContext::currentContext(); | - |
1780 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
1781 | | - |
1782 | funcs->uniform1f = (type_glUniform1f) | - |
1783 | context->getProcAddress(QLatin1String("glUniform1f")); | - |
1784 | if (!funcs->uniform1f) { never evaluated: !funcs->uniform1f | 0 |
1785 | funcs->uniform1f = (type_glUniform1f) | - |
1786 | context->getProcAddress(QLatin1String("glUniform1fARB")); | - |
1787 | } | 0 |
1788 | | - |
1789 | if (funcs->uniform1f) never evaluated: funcs->uniform1f | 0 |
1790 | funcs->uniform1f(location, x); never executed: funcs->uniform1f(location, x); | 0 |
1791 | else | - |
1792 | funcs->uniform1f = qglfResolveUniform1f; never executed: funcs->uniform1f = qglfResolveUniform1f; | 0 |
1793 | } | - |
1794 | | - |
1795 | static void qglfResolveUniform1fv(GLint location, GLsizei count, const GLfloat* v) | - |
1796 | { | - |
1797 | typedef void ( * type_glUniform1fv)(GLint location, GLsizei count, const GLfloat* v); | - |
1798 | | - |
1799 | const QGLContext *context = QGLContext::currentContext(); | - |
1800 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
1801 | | - |
1802 | funcs->uniform1fv = (type_glUniform1fv) | - |
1803 | context->getProcAddress(QLatin1String("glUniform1fv")); | - |
1804 | if (!funcs->uniform1fv) { never evaluated: !funcs->uniform1fv | 0 |
1805 | funcs->uniform1fv = (type_glUniform1fv) | - |
1806 | context->getProcAddress(QLatin1String("glUniform1fvARB")); | - |
1807 | } | 0 |
1808 | | - |
1809 | if (funcs->uniform1fv) never evaluated: funcs->uniform1fv | 0 |
1810 | funcs->uniform1fv(location, count, v); never executed: funcs->uniform1fv(location, count, v); | 0 |
1811 | else | - |
1812 | funcs->uniform1fv = qglfResolveUniform1fv; never executed: funcs->uniform1fv = qglfResolveUniform1fv; | 0 |
1813 | } | - |
1814 | | - |
1815 | static void qglfResolveUniform1i(GLint location, GLint x) | - |
1816 | { | - |
1817 | typedef void ( * type_glUniform1i)(GLint location, GLint x); | - |
1818 | | - |
1819 | const QGLContext *context = QGLContext::currentContext(); | - |
1820 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
1821 | | - |
1822 | funcs->uniform1i = (type_glUniform1i) | - |
1823 | context->getProcAddress(QLatin1String("glUniform1i")); | - |
1824 | if (!funcs->uniform1i) { never evaluated: !funcs->uniform1i | 0 |
1825 | funcs->uniform1i = (type_glUniform1i) | - |
1826 | context->getProcAddress(QLatin1String("glUniform1iARB")); | - |
1827 | } | 0 |
1828 | | - |
1829 | if (funcs->uniform1i) never evaluated: funcs->uniform1i | 0 |
1830 | funcs->uniform1i(location, x); never executed: funcs->uniform1i(location, x); | 0 |
1831 | else | - |
1832 | funcs->uniform1i = qglfResolveUniform1i; never executed: funcs->uniform1i = qglfResolveUniform1i; | 0 |
1833 | } | - |
1834 | | - |
1835 | static void qglfResolveUniform1iv(GLint location, GLsizei count, const GLint* v) | - |
1836 | { | - |
1837 | typedef void ( * type_glUniform1iv)(GLint location, GLsizei count, const GLint* v); | - |
1838 | | - |
1839 | const QGLContext *context = QGLContext::currentContext(); | - |
1840 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
1841 | | - |
1842 | funcs->uniform1iv = (type_glUniform1iv) | - |
1843 | context->getProcAddress(QLatin1String("glUniform1iv")); | - |
1844 | if (!funcs->uniform1iv) { never evaluated: !funcs->uniform1iv | 0 |
1845 | funcs->uniform1iv = (type_glUniform1iv) | - |
1846 | context->getProcAddress(QLatin1String("glUniform1ivARB")); | - |
1847 | } | 0 |
1848 | | - |
1849 | if (funcs->uniform1iv) never evaluated: funcs->uniform1iv | 0 |
1850 | funcs->uniform1iv(location, count, v); never executed: funcs->uniform1iv(location, count, v); | 0 |
1851 | else | - |
1852 | funcs->uniform1iv = qglfResolveUniform1iv; never executed: funcs->uniform1iv = qglfResolveUniform1iv; | 0 |
1853 | } | - |
1854 | | - |
1855 | static void qglfResolveUniform2f(GLint location, GLfloat x, GLfloat y) | - |
1856 | { | - |
1857 | typedef void ( * type_glUniform2f)(GLint location, GLfloat x, GLfloat y); | - |
1858 | | - |
1859 | const QGLContext *context = QGLContext::currentContext(); | - |
1860 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
1861 | | - |
1862 | funcs->uniform2f = (type_glUniform2f) | - |
1863 | context->getProcAddress(QLatin1String("glUniform2f")); | - |
1864 | if (!funcs->uniform2f) { never evaluated: !funcs->uniform2f | 0 |
1865 | funcs->uniform2f = (type_glUniform2f) | - |
1866 | context->getProcAddress(QLatin1String("glUniform2fARB")); | - |
1867 | } | 0 |
1868 | | - |
1869 | if (funcs->uniform2f) never evaluated: funcs->uniform2f | 0 |
1870 | funcs->uniform2f(location, x, y); never executed: funcs->uniform2f(location, x, y); | 0 |
1871 | else | - |
1872 | funcs->uniform2f = qglfResolveUniform2f; never executed: funcs->uniform2f = qglfResolveUniform2f; | 0 |
1873 | } | - |
1874 | | - |
1875 | static void qglfResolveUniform2fv(GLint location, GLsizei count, const GLfloat* v) | - |
1876 | { | - |
1877 | typedef void ( * type_glUniform2fv)(GLint location, GLsizei count, const GLfloat* v); | - |
1878 | | - |
1879 | const QGLContext *context = QGLContext::currentContext(); | - |
1880 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
1881 | | - |
1882 | funcs->uniform2fv = (type_glUniform2fv) | - |
1883 | context->getProcAddress(QLatin1String("glUniform2fv")); | - |
1884 | if (!funcs->uniform2fv) { never evaluated: !funcs->uniform2fv | 0 |
1885 | funcs->uniform2fv = (type_glUniform2fv) | - |
1886 | context->getProcAddress(QLatin1String("glUniform2fvARB")); | - |
1887 | } | 0 |
1888 | | - |
1889 | if (funcs->uniform2fv) never evaluated: funcs->uniform2fv | 0 |
1890 | funcs->uniform2fv(location, count, v); never executed: funcs->uniform2fv(location, count, v); | 0 |
1891 | else | - |
1892 | funcs->uniform2fv = qglfResolveUniform2fv; never executed: funcs->uniform2fv = qglfResolveUniform2fv; | 0 |
1893 | } | - |
1894 | | - |
1895 | static void qglfResolveUniform2i(GLint location, GLint x, GLint y) | - |
1896 | { | - |
1897 | typedef void ( * type_glUniform2i)(GLint location, GLint x, GLint y); | - |
1898 | | - |
1899 | const QGLContext *context = QGLContext::currentContext(); | - |
1900 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
1901 | | - |
1902 | funcs->uniform2i = (type_glUniform2i) | - |
1903 | context->getProcAddress(QLatin1String("glUniform2i")); | - |
1904 | if (!funcs->uniform2i) { never evaluated: !funcs->uniform2i | 0 |
1905 | funcs->uniform2i = (type_glUniform2i) | - |
1906 | context->getProcAddress(QLatin1String("glUniform2iARB")); | - |
1907 | } | 0 |
1908 | | - |
1909 | if (funcs->uniform2i) never evaluated: funcs->uniform2i | 0 |
1910 | funcs->uniform2i(location, x, y); never executed: funcs->uniform2i(location, x, y); | 0 |
1911 | else | - |
1912 | funcs->uniform2i = qglfResolveUniform2i; never executed: funcs->uniform2i = qglfResolveUniform2i; | 0 |
1913 | } | - |
1914 | | - |
1915 | static void qglfResolveUniform2iv(GLint location, GLsizei count, const GLint* v) | - |
1916 | { | - |
1917 | typedef void ( * type_glUniform2iv)(GLint location, GLsizei count, const GLint* v); | - |
1918 | | - |
1919 | const QGLContext *context = QGLContext::currentContext(); | - |
1920 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
1921 | | - |
1922 | funcs->uniform2iv = (type_glUniform2iv) | - |
1923 | context->getProcAddress(QLatin1String("glUniform2iv")); | - |
1924 | if (!funcs->uniform2iv) { never evaluated: !funcs->uniform2iv | 0 |
1925 | funcs->uniform2iv = (type_glUniform2iv) | - |
1926 | context->getProcAddress(QLatin1String("glUniform2ivARB")); | - |
1927 | } | 0 |
1928 | | - |
1929 | if (funcs->uniform2iv) never evaluated: funcs->uniform2iv | 0 |
1930 | funcs->uniform2iv(location, count, v); never executed: funcs->uniform2iv(location, count, v); | 0 |
1931 | else | - |
1932 | funcs->uniform2iv = qglfResolveUniform2iv; never executed: funcs->uniform2iv = qglfResolveUniform2iv; | 0 |
1933 | } | - |
1934 | | - |
1935 | static void qglfResolveUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z) | - |
1936 | { | - |
1937 | typedef void ( * type_glUniform3f)(GLint location, GLfloat x, GLfloat y, GLfloat z); | - |
1938 | | - |
1939 | const QGLContext *context = QGLContext::currentContext(); | - |
1940 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
1941 | | - |
1942 | funcs->uniform3f = (type_glUniform3f) | - |
1943 | context->getProcAddress(QLatin1String("glUniform3f")); | - |
1944 | if (!funcs->uniform3f) { never evaluated: !funcs->uniform3f | 0 |
1945 | funcs->uniform3f = (type_glUniform3f) | - |
1946 | context->getProcAddress(QLatin1String("glUniform3fARB")); | - |
1947 | } | 0 |
1948 | | - |
1949 | if (funcs->uniform3f) never evaluated: funcs->uniform3f | 0 |
1950 | funcs->uniform3f(location, x, y, z); never executed: funcs->uniform3f(location, x, y, z); | 0 |
1951 | else | - |
1952 | funcs->uniform3f = qglfResolveUniform3f; never executed: funcs->uniform3f = qglfResolveUniform3f; | 0 |
1953 | } | - |
1954 | | - |
1955 | static void qglfResolveUniform3fv(GLint location, GLsizei count, const GLfloat* v) | - |
1956 | { | - |
1957 | typedef void ( * type_glUniform3fv)(GLint location, GLsizei count, const GLfloat* v); | - |
1958 | | - |
1959 | const QGLContext *context = QGLContext::currentContext(); | - |
1960 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
1961 | | - |
1962 | funcs->uniform3fv = (type_glUniform3fv) | - |
1963 | context->getProcAddress(QLatin1String("glUniform3fv")); | - |
1964 | if (!funcs->uniform3fv) { never evaluated: !funcs->uniform3fv | 0 |
1965 | funcs->uniform3fv = (type_glUniform3fv) | - |
1966 | context->getProcAddress(QLatin1String("glUniform3fvARB")); | - |
1967 | } | 0 |
1968 | | - |
1969 | if (funcs->uniform3fv) never evaluated: funcs->uniform3fv | 0 |
1970 | funcs->uniform3fv(location, count, v); never executed: funcs->uniform3fv(location, count, v); | 0 |
1971 | else | - |
1972 | funcs->uniform3fv = qglfResolveUniform3fv; never executed: funcs->uniform3fv = qglfResolveUniform3fv; | 0 |
1973 | } | - |
1974 | | - |
1975 | static void qglfResolveUniform3i(GLint location, GLint x, GLint y, GLint z) | - |
1976 | { | - |
1977 | typedef void ( * type_glUniform3i)(GLint location, GLint x, GLint y, GLint z); | - |
1978 | | - |
1979 | const QGLContext *context = QGLContext::currentContext(); | - |
1980 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
1981 | | - |
1982 | funcs->uniform3i = (type_glUniform3i) | - |
1983 | context->getProcAddress(QLatin1String("glUniform3i")); | - |
1984 | if (!funcs->uniform3i) { never evaluated: !funcs->uniform3i | 0 |
1985 | funcs->uniform3i = (type_glUniform3i) | - |
1986 | context->getProcAddress(QLatin1String("glUniform3iARB")); | - |
1987 | } | 0 |
1988 | | - |
1989 | if (funcs->uniform3i) never evaluated: funcs->uniform3i | 0 |
1990 | funcs->uniform3i(location, x, y, z); never executed: funcs->uniform3i(location, x, y, z); | 0 |
1991 | else | - |
1992 | funcs->uniform3i = qglfResolveUniform3i; never executed: funcs->uniform3i = qglfResolveUniform3i; | 0 |
1993 | } | - |
1994 | | - |
1995 | static void qglfResolveUniform3iv(GLint location, GLsizei count, const GLint* v) | - |
1996 | { | - |
1997 | typedef void ( * type_glUniform3iv)(GLint location, GLsizei count, const GLint* v); | - |
1998 | | - |
1999 | const QGLContext *context = QGLContext::currentContext(); | - |
2000 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
2001 | | - |
2002 | funcs->uniform3iv = (type_glUniform3iv) | - |
2003 | context->getProcAddress(QLatin1String("glUniform3iv")); | - |
2004 | if (!funcs->uniform3iv) { never evaluated: !funcs->uniform3iv | 0 |
2005 | funcs->uniform3iv = (type_glUniform3iv) | - |
2006 | context->getProcAddress(QLatin1String("glUniform3ivARB")); | - |
2007 | } | 0 |
2008 | | - |
2009 | if (funcs->uniform3iv) never evaluated: funcs->uniform3iv | 0 |
2010 | funcs->uniform3iv(location, count, v); never executed: funcs->uniform3iv(location, count, v); | 0 |
2011 | else | - |
2012 | funcs->uniform3iv = qglfResolveUniform3iv; never executed: funcs->uniform3iv = qglfResolveUniform3iv; | 0 |
2013 | } | - |
2014 | | - |
2015 | static void qglfResolveUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) | - |
2016 | { | - |
2017 | typedef void ( * type_glUniform4f)(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w); | - |
2018 | | - |
2019 | const QGLContext *context = QGLContext::currentContext(); | - |
2020 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
2021 | | - |
2022 | funcs->uniform4f = (type_glUniform4f) | - |
2023 | context->getProcAddress(QLatin1String("glUniform4f")); | - |
2024 | if (!funcs->uniform4f) { never evaluated: !funcs->uniform4f | 0 |
2025 | funcs->uniform4f = (type_glUniform4f) | - |
2026 | context->getProcAddress(QLatin1String("glUniform4fARB")); | - |
2027 | } | 0 |
2028 | | - |
2029 | if (funcs->uniform4f) never evaluated: funcs->uniform4f | 0 |
2030 | funcs->uniform4f(location, x, y, z, w); never executed: funcs->uniform4f(location, x, y, z, w); | 0 |
2031 | else | - |
2032 | funcs->uniform4f = qglfResolveUniform4f; never executed: funcs->uniform4f = qglfResolveUniform4f; | 0 |
2033 | } | - |
2034 | | - |
2035 | static void qglfResolveUniform4fv(GLint location, GLsizei count, const GLfloat* v) | - |
2036 | { | - |
2037 | typedef void ( * type_glUniform4fv)(GLint location, GLsizei count, const GLfloat* v); | - |
2038 | | - |
2039 | const QGLContext *context = QGLContext::currentContext(); | - |
2040 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
2041 | | - |
2042 | funcs->uniform4fv = (type_glUniform4fv) | - |
2043 | context->getProcAddress(QLatin1String("glUniform4fv")); | - |
2044 | if (!funcs->uniform4fv) { never evaluated: !funcs->uniform4fv | 0 |
2045 | funcs->uniform4fv = (type_glUniform4fv) | - |
2046 | context->getProcAddress(QLatin1String("glUniform4fvARB")); | - |
2047 | } | 0 |
2048 | | - |
2049 | if (funcs->uniform4fv) never evaluated: funcs->uniform4fv | 0 |
2050 | funcs->uniform4fv(location, count, v); never executed: funcs->uniform4fv(location, count, v); | 0 |
2051 | else | - |
2052 | funcs->uniform4fv = qglfResolveUniform4fv; never executed: funcs->uniform4fv = qglfResolveUniform4fv; | 0 |
2053 | } | - |
2054 | | - |
2055 | static void qglfResolveUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w) | - |
2056 | { | - |
2057 | typedef void ( * type_glUniform4i)(GLint location, GLint x, GLint y, GLint z, GLint w); | - |
2058 | | - |
2059 | const QGLContext *context = QGLContext::currentContext(); | - |
2060 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
2061 | | - |
2062 | funcs->uniform4i = (type_glUniform4i) | - |
2063 | context->getProcAddress(QLatin1String("glUniform4i")); | - |
2064 | if (!funcs->uniform4i) { never evaluated: !funcs->uniform4i | 0 |
2065 | funcs->uniform4i = (type_glUniform4i) | - |
2066 | context->getProcAddress(QLatin1String("glUniform4iARB")); | - |
2067 | } | 0 |
2068 | | - |
2069 | if (funcs->uniform4i) never evaluated: funcs->uniform4i | 0 |
2070 | funcs->uniform4i(location, x, y, z, w); never executed: funcs->uniform4i(location, x, y, z, w); | 0 |
2071 | else | - |
2072 | funcs->uniform4i = qglfResolveUniform4i; never executed: funcs->uniform4i = qglfResolveUniform4i; | 0 |
2073 | } | - |
2074 | | - |
2075 | static void qglfResolveUniform4iv(GLint location, GLsizei count, const GLint* v) | - |
2076 | { | - |
2077 | typedef void ( * type_glUniform4iv)(GLint location, GLsizei count, const GLint* v); | - |
2078 | | - |
2079 | const QGLContext *context = QGLContext::currentContext(); | - |
2080 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
2081 | | - |
2082 | funcs->uniform4iv = (type_glUniform4iv) | - |
2083 | context->getProcAddress(QLatin1String("glUniform4iv")); | - |
2084 | if (!funcs->uniform4iv) { never evaluated: !funcs->uniform4iv | 0 |
2085 | funcs->uniform4iv = (type_glUniform4iv) | - |
2086 | context->getProcAddress(QLatin1String("glUniform4ivARB")); | - |
2087 | } | 0 |
2088 | | - |
2089 | if (funcs->uniform4iv) never evaluated: funcs->uniform4iv | 0 |
2090 | funcs->uniform4iv(location, count, v); never executed: funcs->uniform4iv(location, count, v); | 0 |
2091 | else | - |
2092 | funcs->uniform4iv = qglfResolveUniform4iv; never executed: funcs->uniform4iv = qglfResolveUniform4iv; | 0 |
2093 | } | - |
2094 | | - |
2095 | static void qglfResolveUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) | - |
2096 | { | - |
2097 | typedef void ( * type_glUniformMatrix2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); | - |
2098 | | - |
2099 | const QGLContext *context = QGLContext::currentContext(); | - |
2100 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
2101 | | - |
2102 | funcs->uniformMatrix2fv = (type_glUniformMatrix2fv) | - |
2103 | context->getProcAddress(QLatin1String("glUniformMatrix2fv")); | - |
2104 | if (!funcs->uniformMatrix2fv) { never evaluated: !funcs->uniformMatrix2fv | 0 |
2105 | funcs->uniformMatrix2fv = (type_glUniformMatrix2fv) | - |
2106 | context->getProcAddress(QLatin1String("glUniformMatrix2fvARB")); | - |
2107 | } | 0 |
2108 | | - |
2109 | if (funcs->uniformMatrix2fv) never evaluated: funcs->uniformMatrix2fv | 0 |
2110 | funcs->uniformMatrix2fv(location, count, transpose, value); never executed: funcs->uniformMatrix2fv(location, count, transpose, value); | 0 |
2111 | else | - |
2112 | funcs->uniformMatrix2fv = qglfResolveUniformMatrix2fv; never executed: funcs->uniformMatrix2fv = qglfResolveUniformMatrix2fv; | 0 |
2113 | } | - |
2114 | | - |
2115 | static void qglfResolveUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) | - |
2116 | { | - |
2117 | typedef void ( * type_glUniformMatrix3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); | - |
2118 | | - |
2119 | const QGLContext *context = QGLContext::currentContext(); | - |
2120 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
2121 | | - |
2122 | funcs->uniformMatrix3fv = (type_glUniformMatrix3fv) | - |
2123 | context->getProcAddress(QLatin1String("glUniformMatrix3fv")); | - |
2124 | if (!funcs->uniformMatrix3fv) { never evaluated: !funcs->uniformMatrix3fv | 0 |
2125 | funcs->uniformMatrix3fv = (type_glUniformMatrix3fv) | - |
2126 | context->getProcAddress(QLatin1String("glUniformMatrix3fvARB")); | - |
2127 | } | 0 |
2128 | | - |
2129 | if (funcs->uniformMatrix3fv) never evaluated: funcs->uniformMatrix3fv | 0 |
2130 | funcs->uniformMatrix3fv(location, count, transpose, value); never executed: funcs->uniformMatrix3fv(location, count, transpose, value); | 0 |
2131 | else | - |
2132 | funcs->uniformMatrix3fv = qglfResolveUniformMatrix3fv; never executed: funcs->uniformMatrix3fv = qglfResolveUniformMatrix3fv; | 0 |
2133 | } | - |
2134 | | - |
2135 | static void qglfResolveUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) | - |
2136 | { | - |
2137 | typedef void ( * type_glUniformMatrix4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); | - |
2138 | | - |
2139 | const QGLContext *context = QGLContext::currentContext(); | - |
2140 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
2141 | | - |
2142 | funcs->uniformMatrix4fv = (type_glUniformMatrix4fv) | - |
2143 | context->getProcAddress(QLatin1String("glUniformMatrix4fv")); | - |
2144 | if (!funcs->uniformMatrix4fv) { never evaluated: !funcs->uniformMatrix4fv | 0 |
2145 | funcs->uniformMatrix4fv = (type_glUniformMatrix4fv) | - |
2146 | context->getProcAddress(QLatin1String("glUniformMatrix4fvARB")); | - |
2147 | } | 0 |
2148 | | - |
2149 | if (funcs->uniformMatrix4fv) never evaluated: funcs->uniformMatrix4fv | 0 |
2150 | funcs->uniformMatrix4fv(location, count, transpose, value); never executed: funcs->uniformMatrix4fv(location, count, transpose, value); | 0 |
2151 | else | - |
2152 | funcs->uniformMatrix4fv = qglfResolveUniformMatrix4fv; never executed: funcs->uniformMatrix4fv = qglfResolveUniformMatrix4fv; | 0 |
2153 | } | - |
2154 | | - |
2155 | static void qglfResolveUseProgram(GLuint program) | - |
2156 | { | - |
2157 | typedef void ( * type_glUseProgram)(GLuint program); | - |
2158 | | - |
2159 | const QGLContext *context = QGLContext::currentContext(); | - |
2160 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
2161 | | - |
2162 | funcs->useProgram = (type_glUseProgram) | - |
2163 | context->getProcAddress(QLatin1String("glUseProgram")); | - |
2164 | if (!funcs->useProgram) { never evaluated: !funcs->useProgram | 0 |
2165 | funcs->useProgram = (type_glUseProgram) | - |
2166 | context->getProcAddress(QLatin1String("glUseProgramObjectARB")); | - |
2167 | } | 0 |
2168 | | - |
2169 | if (funcs->useProgram) never evaluated: funcs->useProgram | 0 |
2170 | funcs->useProgram(program); never executed: funcs->useProgram(program); | 0 |
2171 | else | - |
2172 | funcs->useProgram = qglfResolveUseProgram; never executed: funcs->useProgram = qglfResolveUseProgram; | 0 |
2173 | } | - |
2174 | | - |
2175 | static void qglfResolveValidateProgram(GLuint program) | - |
2176 | { | - |
2177 | typedef void ( * type_glValidateProgram)(GLuint program); | - |
2178 | | - |
2179 | const QGLContext *context = QGLContext::currentContext(); | - |
2180 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
2181 | | - |
2182 | funcs->validateProgram = (type_glValidateProgram) | - |
2183 | context->getProcAddress(QLatin1String("glValidateProgram")); | - |
2184 | if (!funcs->validateProgram) { never evaluated: !funcs->validateProgram | 0 |
2185 | funcs->validateProgram = (type_glValidateProgram) | - |
2186 | context->getProcAddress(QLatin1String("glValidateProgramARB")); | - |
2187 | } | 0 |
2188 | | - |
2189 | if (funcs->validateProgram) never evaluated: funcs->validateProgram | 0 |
2190 | funcs->validateProgram(program); never executed: funcs->validateProgram(program); | 0 |
2191 | else | - |
2192 | funcs->validateProgram = qglfResolveValidateProgram; never executed: funcs->validateProgram = qglfResolveValidateProgram; | 0 |
2193 | } | - |
2194 | | - |
2195 | static void qglfResolveVertexAttrib1f(GLuint indx, GLfloat x) | - |
2196 | { | - |
2197 | typedef void ( * type_glVertexAttrib1f)(GLuint indx, GLfloat x); | - |
2198 | | - |
2199 | const QGLContext *context = QGLContext::currentContext(); | - |
2200 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
2201 | | - |
2202 | funcs->vertexAttrib1f = (type_glVertexAttrib1f) | - |
2203 | context->getProcAddress(QLatin1String("glVertexAttrib1f")); | - |
2204 | if (!funcs->vertexAttrib1f) { never evaluated: !funcs->vertexAttrib1f | 0 |
2205 | funcs->vertexAttrib1f = (type_glVertexAttrib1f) | - |
2206 | context->getProcAddress(QLatin1String("glVertexAttrib1fARB")); | - |
2207 | } | 0 |
2208 | | - |
2209 | if (funcs->vertexAttrib1f) never evaluated: funcs->vertexAttrib1f | 0 |
2210 | funcs->vertexAttrib1f(indx, x); never executed: funcs->vertexAttrib1f(indx, x); | 0 |
2211 | else | - |
2212 | funcs->vertexAttrib1f = qglfResolveVertexAttrib1f; never executed: funcs->vertexAttrib1f = qglfResolveVertexAttrib1f; | 0 |
2213 | } | - |
2214 | | - |
2215 | static void qglfResolveVertexAttrib1fv(GLuint indx, const GLfloat* values) | - |
2216 | { | - |
2217 | typedef void ( * type_glVertexAttrib1fv)(GLuint indx, const GLfloat* values); | - |
2218 | | - |
2219 | const QGLContext *context = QGLContext::currentContext(); | - |
2220 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
2221 | | - |
2222 | funcs->vertexAttrib1fv = (type_glVertexAttrib1fv) | - |
2223 | context->getProcAddress(QLatin1String("glVertexAttrib1fv")); | - |
2224 | if (!funcs->vertexAttrib1fv) { never evaluated: !funcs->vertexAttrib1fv | 0 |
2225 | funcs->vertexAttrib1fv = (type_glVertexAttrib1fv) | - |
2226 | context->getProcAddress(QLatin1String("glVertexAttrib1fvARB")); | - |
2227 | } | 0 |
2228 | | - |
2229 | if (funcs->vertexAttrib1fv) never evaluated: funcs->vertexAttrib1fv | 0 |
2230 | funcs->vertexAttrib1fv(indx, values); never executed: funcs->vertexAttrib1fv(indx, values); | 0 |
2231 | else | - |
2232 | funcs->vertexAttrib1fv = qglfResolveVertexAttrib1fv; never executed: funcs->vertexAttrib1fv = qglfResolveVertexAttrib1fv; | 0 |
2233 | } | - |
2234 | | - |
2235 | static void qglfResolveVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y) | - |
2236 | { | - |
2237 | typedef void ( * type_glVertexAttrib2f)(GLuint indx, GLfloat x, GLfloat y); | - |
2238 | | - |
2239 | const QGLContext *context = QGLContext::currentContext(); | - |
2240 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
2241 | | - |
2242 | funcs->vertexAttrib2f = (type_glVertexAttrib2f) | - |
2243 | context->getProcAddress(QLatin1String("glVertexAttrib2f")); | - |
2244 | if (!funcs->vertexAttrib2f) { never evaluated: !funcs->vertexAttrib2f | 0 |
2245 | funcs->vertexAttrib2f = (type_glVertexAttrib2f) | - |
2246 | context->getProcAddress(QLatin1String("glVertexAttrib2fARB")); | - |
2247 | } | 0 |
2248 | | - |
2249 | if (funcs->vertexAttrib2f) never evaluated: funcs->vertexAttrib2f | 0 |
2250 | funcs->vertexAttrib2f(indx, x, y); never executed: funcs->vertexAttrib2f(indx, x, y); | 0 |
2251 | else | - |
2252 | funcs->vertexAttrib2f = qglfResolveVertexAttrib2f; never executed: funcs->vertexAttrib2f = qglfResolveVertexAttrib2f; | 0 |
2253 | } | - |
2254 | | - |
2255 | static void qglfResolveVertexAttrib2fv(GLuint indx, const GLfloat* values) | - |
2256 | { | - |
2257 | typedef void ( * type_glVertexAttrib2fv)(GLuint indx, const GLfloat* values); | - |
2258 | | - |
2259 | const QGLContext *context = QGLContext::currentContext(); | - |
2260 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
2261 | | - |
2262 | funcs->vertexAttrib2fv = (type_glVertexAttrib2fv) | - |
2263 | context->getProcAddress(QLatin1String("glVertexAttrib2fv")); | - |
2264 | if (!funcs->vertexAttrib2fv) { never evaluated: !funcs->vertexAttrib2fv | 0 |
2265 | funcs->vertexAttrib2fv = (type_glVertexAttrib2fv) | - |
2266 | context->getProcAddress(QLatin1String("glVertexAttrib2fvARB")); | - |
2267 | } | 0 |
2268 | | - |
2269 | if (funcs->vertexAttrib2fv) never evaluated: funcs->vertexAttrib2fv | 0 |
2270 | funcs->vertexAttrib2fv(indx, values); never executed: funcs->vertexAttrib2fv(indx, values); | 0 |
2271 | else | - |
2272 | funcs->vertexAttrib2fv = qglfResolveVertexAttrib2fv; never executed: funcs->vertexAttrib2fv = qglfResolveVertexAttrib2fv; | 0 |
2273 | } | - |
2274 | | - |
2275 | static void qglfResolveVertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z) | - |
2276 | { | - |
2277 | typedef void ( * type_glVertexAttrib3f)(GLuint indx, GLfloat x, GLfloat y, GLfloat z); | - |
2278 | | - |
2279 | const QGLContext *context = QGLContext::currentContext(); | - |
2280 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
2281 | | - |
2282 | funcs->vertexAttrib3f = (type_glVertexAttrib3f) | - |
2283 | context->getProcAddress(QLatin1String("glVertexAttrib3f")); | - |
2284 | if (!funcs->vertexAttrib3f) { never evaluated: !funcs->vertexAttrib3f | 0 |
2285 | funcs->vertexAttrib3f = (type_glVertexAttrib3f) | - |
2286 | context->getProcAddress(QLatin1String("glVertexAttrib3fARB")); | - |
2287 | } | 0 |
2288 | | - |
2289 | if (funcs->vertexAttrib3f) never evaluated: funcs->vertexAttrib3f | 0 |
2290 | funcs->vertexAttrib3f(indx, x, y, z); never executed: funcs->vertexAttrib3f(indx, x, y, z); | 0 |
2291 | else | - |
2292 | funcs->vertexAttrib3f = qglfResolveVertexAttrib3f; never executed: funcs->vertexAttrib3f = qglfResolveVertexAttrib3f; | 0 |
2293 | } | - |
2294 | | - |
2295 | static void qglfResolveVertexAttrib3fv(GLuint indx, const GLfloat* values) | - |
2296 | { | - |
2297 | typedef void ( * type_glVertexAttrib3fv)(GLuint indx, const GLfloat* values); | - |
2298 | | - |
2299 | const QGLContext *context = QGLContext::currentContext(); | - |
2300 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
2301 | | - |
2302 | funcs->vertexAttrib3fv = (type_glVertexAttrib3fv) | - |
2303 | context->getProcAddress(QLatin1String("glVertexAttrib3fv")); | - |
2304 | if (!funcs->vertexAttrib3fv) { never evaluated: !funcs->vertexAttrib3fv | 0 |
2305 | funcs->vertexAttrib3fv = (type_glVertexAttrib3fv) | - |
2306 | context->getProcAddress(QLatin1String("glVertexAttrib3fvARB")); | - |
2307 | } | 0 |
2308 | | - |
2309 | if (funcs->vertexAttrib3fv) never evaluated: funcs->vertexAttrib3fv | 0 |
2310 | funcs->vertexAttrib3fv(indx, values); never executed: funcs->vertexAttrib3fv(indx, values); | 0 |
2311 | else | - |
2312 | funcs->vertexAttrib3fv = qglfResolveVertexAttrib3fv; never executed: funcs->vertexAttrib3fv = qglfResolveVertexAttrib3fv; | 0 |
2313 | } | - |
2314 | | - |
2315 | static void qglfResolveVertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) | - |
2316 | { | - |
2317 | typedef void ( * type_glVertexAttrib4f)(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w); | - |
2318 | | - |
2319 | const QGLContext *context = QGLContext::currentContext(); | - |
2320 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
2321 | | - |
2322 | funcs->vertexAttrib4f = (type_glVertexAttrib4f) | - |
2323 | context->getProcAddress(QLatin1String("glVertexAttrib4f")); | - |
2324 | if (!funcs->vertexAttrib4f) { never evaluated: !funcs->vertexAttrib4f | 0 |
2325 | funcs->vertexAttrib4f = (type_glVertexAttrib4f) | - |
2326 | context->getProcAddress(QLatin1String("glVertexAttrib4fARB")); | - |
2327 | } | 0 |
2328 | | - |
2329 | if (funcs->vertexAttrib4f) never evaluated: funcs->vertexAttrib4f | 0 |
2330 | funcs->vertexAttrib4f(indx, x, y, z, w); never executed: funcs->vertexAttrib4f(indx, x, y, z, w); | 0 |
2331 | else | - |
2332 | funcs->vertexAttrib4f = qglfResolveVertexAttrib4f; never executed: funcs->vertexAttrib4f = qglfResolveVertexAttrib4f; | 0 |
2333 | } | - |
2334 | | - |
2335 | static void qglfResolveVertexAttrib4fv(GLuint indx, const GLfloat* values) | - |
2336 | { | - |
2337 | typedef void ( * type_glVertexAttrib4fv)(GLuint indx, const GLfloat* values); | - |
2338 | | - |
2339 | const QGLContext *context = QGLContext::currentContext(); | - |
2340 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
2341 | | - |
2342 | funcs->vertexAttrib4fv = (type_glVertexAttrib4fv) | - |
2343 | context->getProcAddress(QLatin1String("glVertexAttrib4fv")); | - |
2344 | if (!funcs->vertexAttrib4fv) { never evaluated: !funcs->vertexAttrib4fv | 0 |
2345 | funcs->vertexAttrib4fv = (type_glVertexAttrib4fv) | - |
2346 | context->getProcAddress(QLatin1String("glVertexAttrib4fvARB")); | - |
2347 | } | 0 |
2348 | | - |
2349 | if (funcs->vertexAttrib4fv) never evaluated: funcs->vertexAttrib4fv | 0 |
2350 | funcs->vertexAttrib4fv(indx, values); never executed: funcs->vertexAttrib4fv(indx, values); | 0 |
2351 | else | - |
2352 | funcs->vertexAttrib4fv = qglfResolveVertexAttrib4fv; never executed: funcs->vertexAttrib4fv = qglfResolveVertexAttrib4fv; | 0 |
2353 | } | - |
2354 | | - |
2355 | static void qglfResolveVertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr) | - |
2356 | { | - |
2357 | typedef void ( * type_glVertexAttribPointer)(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr); | - |
2358 | | - |
2359 | const QGLContext *context = QGLContext::currentContext(); | - |
2360 | QGLFunctionsPrivate *funcs = qt_gl_functions(context); | - |
2361 | | - |
2362 | funcs->vertexAttribPointer = (type_glVertexAttribPointer) | - |
2363 | context->getProcAddress(QLatin1String("glVertexAttribPointer")); | - |
2364 | if (!funcs->vertexAttribPointer) { never evaluated: !funcs->vertexAttribPointer | 0 |
2365 | funcs->vertexAttribPointer = (type_glVertexAttribPointer) | - |
2366 | context->getProcAddress(QLatin1String("glVertexAttribPointerARB")); | - |
2367 | } | 0 |
2368 | | - |
2369 | if (funcs->vertexAttribPointer) never evaluated: funcs->vertexAttribPointer | 0 |
2370 | funcs->vertexAttribPointer(indx, size, type, normalized, stride, ptr); never executed: funcs->vertexAttribPointer(indx, size, type, normalized, stride, ptr); | 0 |
2371 | else | - |
2372 | funcs->vertexAttribPointer = qglfResolveVertexAttribPointer; never executed: funcs->vertexAttribPointer = qglfResolveVertexAttribPointer; | 0 |
2373 | } | - |
2374 | | - |
2375 | | - |
2376 | | - |
2377 | QGLFunctionsPrivate::QGLFunctionsPrivate(const QGLContext *) | - |
2378 | { | - |
2379 | | - |
2380 | activeTexture = qglfResolveActiveTexture; | - |
2381 | attachShader = qglfResolveAttachShader; | - |
2382 | bindAttribLocation = qglfResolveBindAttribLocation; | - |
2383 | bindBuffer = qglfResolveBindBuffer; | - |
2384 | bindFramebuffer = qglfResolveBindFramebuffer; | - |
2385 | bindRenderbuffer = qglfResolveBindRenderbuffer; | - |
2386 | blendColor = qglfResolveBlendColor; | - |
2387 | blendEquation = qglfResolveBlendEquation; | - |
2388 | blendEquationSeparate = qglfResolveBlendEquationSeparate; | - |
2389 | blendFuncSeparate = qglfResolveBlendFuncSeparate; | - |
2390 | bufferData = qglfResolveBufferData; | - |
2391 | bufferSubData = qglfResolveBufferSubData; | - |
2392 | checkFramebufferStatus = qglfResolveCheckFramebufferStatus; | - |
2393 | compileShader = qglfResolveCompileShader; | - |
2394 | compressedTexImage2D = qglfResolveCompressedTexImage2D; | - |
2395 | compressedTexSubImage2D = qglfResolveCompressedTexSubImage2D; | - |
2396 | createProgram = qglfResolveCreateProgram; | - |
2397 | createShader = qglfResolveCreateShader; | - |
2398 | deleteBuffers = qglfResolveDeleteBuffers; | - |
2399 | deleteFramebuffers = qglfResolveDeleteFramebuffers; | - |
2400 | deleteProgram = qglfResolveDeleteProgram; | - |
2401 | deleteRenderbuffers = qglfResolveDeleteRenderbuffers; | - |
2402 | deleteShader = qglfResolveDeleteShader; | - |
2403 | detachShader = qglfResolveDetachShader; | - |
2404 | disableVertexAttribArray = qglfResolveDisableVertexAttribArray; | - |
2405 | enableVertexAttribArray = qglfResolveEnableVertexAttribArray; | - |
2406 | framebufferRenderbuffer = qglfResolveFramebufferRenderbuffer; | - |
2407 | framebufferTexture2D = qglfResolveFramebufferTexture2D; | - |
2408 | genBuffers = qglfResolveGenBuffers; | - |
2409 | generateMipmap = qglfResolveGenerateMipmap; | - |
2410 | genFramebuffers = qglfResolveGenFramebuffers; | - |
2411 | genRenderbuffers = qglfResolveGenRenderbuffers; | - |
2412 | getActiveAttrib = qglfResolveGetActiveAttrib; | - |
2413 | getActiveUniform = qglfResolveGetActiveUniform; | - |
2414 | getAttachedShaders = qglfResolveGetAttachedShaders; | - |
2415 | getAttribLocation = qglfResolveGetAttribLocation; | - |
2416 | getBufferParameteriv = qglfResolveGetBufferParameteriv; | - |
2417 | getFramebufferAttachmentParameteriv = qglfResolveGetFramebufferAttachmentParameteriv; | - |
2418 | getProgramiv = qglfResolveGetProgramiv; | - |
2419 | getProgramInfoLog = qglfResolveGetProgramInfoLog; | - |
2420 | getRenderbufferParameteriv = qglfResolveGetRenderbufferParameteriv; | - |
2421 | getShaderiv = qglfResolveGetShaderiv; | - |
2422 | getShaderInfoLog = qglfResolveGetShaderInfoLog; | - |
2423 | getShaderPrecisionFormat = qglfResolveGetShaderPrecisionFormat; | - |
2424 | getShaderSource = qglfResolveGetShaderSource; | - |
2425 | getUniformfv = qglfResolveGetUniformfv; | - |
2426 | getUniformiv = qglfResolveGetUniformiv; | - |
2427 | getUniformLocation = qglfResolveGetUniformLocation; | - |
2428 | getVertexAttribfv = qglfResolveGetVertexAttribfv; | - |
2429 | getVertexAttribiv = qglfResolveGetVertexAttribiv; | - |
2430 | getVertexAttribPointerv = qglfResolveGetVertexAttribPointerv; | - |
2431 | isBuffer = qglfResolveIsBuffer; | - |
2432 | isFramebuffer = qglfResolveIsFramebuffer; | - |
2433 | isProgram = qglfResolveIsProgram; | - |
2434 | isRenderbuffer = qglfResolveIsRenderbuffer; | - |
2435 | isShader = qglfResolveIsShader; | - |
2436 | linkProgram = qglfResolveLinkProgram; | - |
2437 | releaseShaderCompiler = qglfResolveReleaseShaderCompiler; | - |
2438 | renderbufferStorage = qglfResolveRenderbufferStorage; | - |
2439 | sampleCoverage = qglfResolveSampleCoverage; | - |
2440 | shaderBinary = qglfResolveShaderBinary; | - |
2441 | shaderSource = qglfResolveShaderSource; | - |
2442 | stencilFuncSeparate = qglfResolveStencilFuncSeparate; | - |
2443 | stencilMaskSeparate = qglfResolveStencilMaskSeparate; | - |
2444 | stencilOpSeparate = qglfResolveStencilOpSeparate; | - |
2445 | uniform1f = qglfResolveUniform1f; | - |
2446 | uniform1fv = qglfResolveUniform1fv; | - |
2447 | uniform1i = qglfResolveUniform1i; | - |
2448 | uniform1iv = qglfResolveUniform1iv; | - |
2449 | uniform2f = qglfResolveUniform2f; | - |
2450 | uniform2fv = qglfResolveUniform2fv; | - |
2451 | uniform2i = qglfResolveUniform2i; | - |
2452 | uniform2iv = qglfResolveUniform2iv; | - |
2453 | uniform3f = qglfResolveUniform3f; | - |
2454 | uniform3fv = qglfResolveUniform3fv; | - |
2455 | uniform3i = qglfResolveUniform3i; | - |
2456 | uniform3iv = qglfResolveUniform3iv; | - |
2457 | uniform4f = qglfResolveUniform4f; | - |
2458 | uniform4fv = qglfResolveUniform4fv; | - |
2459 | uniform4i = qglfResolveUniform4i; | - |
2460 | uniform4iv = qglfResolveUniform4iv; | - |
2461 | uniformMatrix2fv = qglfResolveUniformMatrix2fv; | - |
2462 | uniformMatrix3fv = qglfResolveUniformMatrix3fv; | - |
2463 | uniformMatrix4fv = qglfResolveUniformMatrix4fv; | - |
2464 | useProgram = qglfResolveUseProgram; | - |
2465 | validateProgram = qglfResolveValidateProgram; | - |
2466 | vertexAttrib1f = qglfResolveVertexAttrib1f; | - |
2467 | vertexAttrib1fv = qglfResolveVertexAttrib1fv; | - |
2468 | vertexAttrib2f = qglfResolveVertexAttrib2f; | - |
2469 | vertexAttrib2fv = qglfResolveVertexAttrib2fv; | - |
2470 | vertexAttrib3f = qglfResolveVertexAttrib3f; | - |
2471 | vertexAttrib3fv = qglfResolveVertexAttrib3fv; | - |
2472 | vertexAttrib4f = qglfResolveVertexAttrib4f; | - |
2473 | vertexAttrib4fv = qglfResolveVertexAttrib4fv; | - |
2474 | vertexAttribPointer = qglfResolveVertexAttribPointer; | - |
2475 | | - |
2476 | } | 0 |
2477 | | - |
2478 | | - |
2479 | | - |
| | |