Line | Source Code | Coverage |
---|
1 | | - |
2 | | - |
3 | | - |
4 | | - |
5 | | - |
6 | typedef const GLubyte * ( * qt_glGetStringi)(GLenum, GLuint); | - |
7 | | - |
8 | | - |
9 | QOpenGLExtensionMatcher::QOpenGLExtensionMatcher() | - |
10 | { | - |
11 | const char *extensionStr = reinterpret_cast<const char *>(glGetString(0x1F03)); | - |
12 | | - |
13 | if (extensionStr) { never evaluated: extensionStr | 0 |
14 | QByteArray ba(extensionStr); | - |
15 | QList<QByteArray> extensions = ba.split(' '); | - |
16 | m_extensions = extensions.toSet(); | - |
17 | | - |
18 | | - |
19 | | - |
20 | } else { | 0 |
21 | | - |
22 | while (glGetError()) {} never evaluated: glGetError() | 0 |
23 | | - |
24 | QOpenGLContext *ctx = QOpenGLContext::currentContext(); | - |
25 | if (ctx) { | 0 |
26 | qt_glGetStringi glGetStringi = (qt_glGetStringi)ctx->getProcAddress("glGetStringi"); | - |
27 | | - |
28 | if (!glGetStringi) never evaluated: !glGetStringi | 0 |
29 | return; | 0 |
30 | | - |
31 | GLint numExtensions; | - |
32 | glGetIntegerv(0x821D, &numExtensions); | - |
33 | | - |
34 | for (int i = 0; i < numExtensions; ++i) { never evaluated: i < numExtensions | 0 |
35 | const char *str = reinterpret_cast<const char *>(glGetStringi(0x1F03, i)); | - |
36 | m_extensions.insert(str); | - |
37 | } | 0 |
38 | } | 0 |
39 | } | 0 |
40 | | - |
41 | } | - |
42 | | - |
43 | | - |
44 | | - |
| | |