opengl/qopengl.cpp

Switch to Source codePreprocessed file
LineSource CodeCoverage
1 -
2 -
3 -
4 -
5 -
6typedef const GLubyte * ( * qt_glGetStringi)(GLenum, GLuint); -
7 -
8 -
9QOpenGLExtensionMatcher::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 {
never executed: }
0
21 -
22 while (glGetError()) {}
never executed: }
never evaluated: glGetError()
0
23 -
24 QOpenGLContext *ctx = QOpenGLContext::currentContext(); -
25 if (ctx) {
never evaluated: ctx
0
26 qt_glGetStringi glGetStringi = (qt_glGetStringi)ctx->getProcAddress("glGetStringi"); -
27 -
28 if (!glGetStringi)
never evaluated: !glGetStringi
0
29 return;
never executed: 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 }
never executed: }
0
38 }
never executed: }
0
39 }
never executed: }
0
40 -
41} -
42 -
43 -
44 -
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial