Line | Source | Count |
1 | | - |
2 | | - |
3 | | - |
4 | | - |
5 | | - |
6 | | - |
7 | | - |
8 | | - |
9 | | - |
10 | | - |
11 | | - |
12 | | - |
13 | | - |
14 | | - |
15 | | - |
16 | | - |
17 | | - |
18 | | - |
19 | | - |
20 | | - |
21 | | - |
22 | | - |
23 | | - |
24 | | - |
25 | | - |
26 | | - |
27 | | - |
28 | | - |
29 | | - |
30 | | - |
31 | | - |
32 | | - |
33 | | - |
34 | | - |
35 | | - |
36 | | - |
37 | | - |
38 | | - |
39 | | - |
40 | | - |
41 | | - |
42 | | - |
43 | | - |
44 | | - |
45 | | - |
46 | | - |
47 | | - |
48 | | - |
49 | #include "qopenglversionfunctionsfactory_p.h" | - |
50 | | - |
51 | #if !defined(QT_OPENGL_ES_2) | - |
52 | #include "qopenglfunctions_4_5_core.h" | - |
53 | #include "qopenglfunctions_4_5_compatibility.h" | - |
54 | #include "qopenglfunctions_4_4_core.h" | - |
55 | #include "qopenglfunctions_4_4_compatibility.h" | - |
56 | #include "qopenglfunctions_4_3_core.h" | - |
57 | #include "qopenglfunctions_4_3_compatibility.h" | - |
58 | #include "qopenglfunctions_4_2_core.h" | - |
59 | #include "qopenglfunctions_4_2_compatibility.h" | - |
60 | #include "qopenglfunctions_4_1_core.h" | - |
61 | #include "qopenglfunctions_4_1_compatibility.h" | - |
62 | #include "qopenglfunctions_4_0_core.h" | - |
63 | #include "qopenglfunctions_4_0_compatibility.h" | - |
64 | #include "qopenglfunctions_3_3_core.h" | - |
65 | #include "qopenglfunctions_3_3_compatibility.h" | - |
66 | #include "qopenglfunctions_3_2_core.h" | - |
67 | #include "qopenglfunctions_3_2_compatibility.h" | - |
68 | #include "qopenglfunctions_3_1.h" | - |
69 | #include "qopenglfunctions_3_0.h" | - |
70 | #include "qopenglfunctions_2_1.h" | - |
71 | #include "qopenglfunctions_2_0.h" | - |
72 | #include "qopenglfunctions_1_5.h" | - |
73 | #include "qopenglfunctions_1_4.h" | - |
74 | #include "qopenglfunctions_1_3.h" | - |
75 | #include "qopenglfunctions_1_2.h" | - |
76 | #include "qopenglfunctions_1_1.h" | - |
77 | #include "qopenglfunctions_1_0.h" | - |
78 | #else | - |
79 | #include "qopenglfunctions_es2.h" | - |
80 | #endif | - |
81 | | - |
82 | QT_BEGIN_NAMESPACE | - |
83 | | - |
84 | QAbstractOpenGLFunctions *QOpenGLVersionFunctionsFactory::create(const QOpenGLVersionProfile &versionProfile) | - |
85 | { | - |
86 | #if !defined(QT_OPENGL_ES_2) | - |
87 | const int major = versionProfile.version().first; | - |
88 | const int minor = versionProfile.version().second; | - |
89 | | - |
90 | if (versionProfile.hasProfiles()) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
91 | switch (versionProfile.profile()) { | - |
92 | case QSurfaceFormat::CoreProfile: never executed: case QSurfaceFormat::CoreProfile: | 0 |
93 | if (major == 4 && minor == 5)TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
94 | return new QOpenGLFunctions_4_5_Core; never executed: return new QOpenGLFunctions_4_5_Core; | 0 |
95 | else if (major == 4 && minor == 4)TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
96 | return new QOpenGLFunctions_4_4_Core; never executed: return new QOpenGLFunctions_4_4_Core; | 0 |
97 | else if (major == 4 && minor == 3)TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
98 | return new QOpenGLFunctions_4_3_Core; never executed: return new QOpenGLFunctions_4_3_Core; | 0 |
99 | else if (major == 4 && minor == 2)TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
100 | return new QOpenGLFunctions_4_2_Core; never executed: return new QOpenGLFunctions_4_2_Core; | 0 |
101 | else if (major == 4 && minor == 1)TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
102 | return new QOpenGLFunctions_4_1_Core; never executed: return new QOpenGLFunctions_4_1_Core; | 0 |
103 | else if (major == 4 && minor == 0)TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
104 | return new QOpenGLFunctions_4_0_Core; never executed: return new QOpenGLFunctions_4_0_Core; | 0 |
105 | else if (major == 3 && minor == 3)TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
106 | return new QOpenGLFunctions_3_3_Core; never executed: return new QOpenGLFunctions_3_3_Core; | 0 |
107 | else if (major == 3 && minor == 2)TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
108 | return new QOpenGLFunctions_3_2_Core; never executed: return new QOpenGLFunctions_3_2_Core; | 0 |
109 | break; never executed: break; | 0 |
110 | | - |
111 | case QSurfaceFormat::CompatibilityProfile: never executed: case QSurfaceFormat::CompatibilityProfile: | 0 |
112 | if (major == 4 && minor == 5)TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
113 | return new QOpenGLFunctions_4_5_Compatibility; never executed: return new QOpenGLFunctions_4_5_Compatibility; | 0 |
114 | else if (major == 4 && minor == 4)TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
115 | return new QOpenGLFunctions_4_4_Compatibility; never executed: return new QOpenGLFunctions_4_4_Compatibility; | 0 |
116 | else if (major == 4 && minor == 3)TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
117 | return new QOpenGLFunctions_4_3_Compatibility; never executed: return new QOpenGLFunctions_4_3_Compatibility; | 0 |
118 | else if (major == 4 && minor == 2)TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
119 | return new QOpenGLFunctions_4_2_Compatibility; never executed: return new QOpenGLFunctions_4_2_Compatibility; | 0 |
120 | else if (major == 4 && minor == 1)TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
121 | return new QOpenGLFunctions_4_1_Compatibility; never executed: return new QOpenGLFunctions_4_1_Compatibility; | 0 |
122 | else if (major == 4 && minor == 0)TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
123 | return new QOpenGLFunctions_4_0_Compatibility; never executed: return new QOpenGLFunctions_4_0_Compatibility; | 0 |
124 | else if (major == 3 && minor == 3)TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
125 | return new QOpenGLFunctions_3_3_Compatibility; never executed: return new QOpenGLFunctions_3_3_Compatibility; | 0 |
126 | else if (major == 3 && minor == 2)TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
127 | return new QOpenGLFunctions_3_2_Compatibility; never executed: return new QOpenGLFunctions_3_2_Compatibility; | 0 |
128 | break; never executed: break; | 0 |
129 | | - |
130 | case QSurfaceFormat::NoProfile: never executed: case QSurfaceFormat::NoProfile: | 0 |
131 | default: never executed: default: | 0 |
132 | break; never executed: break; | 0 |
133 | }; | - |
134 | } else { | - |
135 | if (major == 3 && minor == 1)TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
136 | return new QOpenGLFunctions_3_1; never executed: return new QOpenGLFunctions_3_1; | 0 |
137 | else if (major == 3 && minor == 0)TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
138 | return new QOpenGLFunctions_3_0; never executed: return new QOpenGLFunctions_3_0; | 0 |
139 | else if (major == 2 && minor == 1)TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
140 | return new QOpenGLFunctions_2_1; never executed: return new QOpenGLFunctions_2_1; | 0 |
141 | else if (major == 2 && minor == 0)TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
142 | return new QOpenGLFunctions_2_0; never executed: return new QOpenGLFunctions_2_0; | 0 |
143 | else if (major == 1 && minor == 5)TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
144 | return new QOpenGLFunctions_1_5; never executed: return new QOpenGLFunctions_1_5; | 0 |
145 | else if (major == 1 && minor == 4)TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
146 | return new QOpenGLFunctions_1_4; never executed: return new QOpenGLFunctions_1_4; | 0 |
147 | else if (major == 1 && minor == 3)TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
148 | return new QOpenGLFunctions_1_3; never executed: return new QOpenGLFunctions_1_3; | 0 |
149 | else if (major == 1 && minor == 2)TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
150 | return new QOpenGLFunctions_1_2; never executed: return new QOpenGLFunctions_1_2; | 0 |
151 | else if (major == 1 && minor == 1)TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
152 | return new QOpenGLFunctions_1_1; never executed: return new QOpenGLFunctions_1_1; | 0 |
153 | else if (major == 1 && minor == 0)TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
154 | return new QOpenGLFunctions_1_0; never executed: return new QOpenGLFunctions_1_0; | 0 |
155 | } never executed: end of block | 0 |
156 | return 0; never executed: return 0; | 0 |
157 | #else | - |
158 | Q_UNUSED(versionProfile); | - |
159 | return new QOpenGLFunctions_ES2; | - |
160 | #endif | - |
161 | } | - |
162 | | - |
163 | QT_END_NAMESPACE | - |
| | |