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 | #include "qopenglfunctions_4_3_core.h" | - |
44 | #include "qopenglcontext.h" | - |
45 | | - |
46 | QT_BEGIN_NAMESPACE | - |
47 | | - |
48 | | - |
49 | | - |
50 | | - |
51 | | - |
52 | | - |
53 | | - |
54 | | - |
55 | | - |
56 | | - |
57 | | - |
58 | | - |
59 | | - |
60 | | - |
61 | | - |
62 | QOpenGLFunctions_4_3_Core::QOpenGLFunctions_4_3_Core() | - |
63 | : QAbstractOpenGLFunctions() | - |
64 | , d_1_0_Core(0) | - |
65 | , d_1_1_Core(0) | - |
66 | , d_1_2_Core(0) | - |
67 | , d_1_3_Core(0) | - |
68 | , d_1_4_Core(0) | - |
69 | , d_1_5_Core(0) | - |
70 | , d_2_0_Core(0) | - |
71 | , d_2_1_Core(0) | - |
72 | , d_3_0_Core(0) | - |
73 | , d_3_1_Core(0) | - |
74 | , d_3_2_Core(0) | - |
75 | , d_3_3_Core(0) | - |
76 | , d_4_0_Core(0) | - |
77 | , d_4_1_Core(0) | - |
78 | , d_4_2_Core(0) | - |
79 | , d_4_3_Core(0) | - |
80 | { | - |
81 | } never executed: end of block | 0 |
82 | | - |
83 | QOpenGLFunctions_4_3_Core::~QOpenGLFunctions_4_3_Core() | - |
84 | { | - |
85 | if (d_1_0_Core && !d_1_0_Core->refs.deref()) {TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
86 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Core->context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); | - |
87 | delete d_1_0_Core; | - |
88 | } never executed: end of block | 0 |
89 | if (d_1_1_Core && !d_1_1_Core->refs.deref()) {TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
90 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Core->context, QOpenGLFunctions_1_1_CoreBackend::versionStatus()); | - |
91 | delete d_1_1_Core; | - |
92 | } never executed: end of block | 0 |
93 | if (d_1_2_Core && !d_1_2_Core->refs.deref()) {TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
94 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Core->context, QOpenGLFunctions_1_2_CoreBackend::versionStatus()); | - |
95 | delete d_1_2_Core; | - |
96 | } never executed: end of block | 0 |
97 | if (d_1_3_Core && !d_1_3_Core->refs.deref()) {TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
98 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Core->context, QOpenGLFunctions_1_3_CoreBackend::versionStatus()); | - |
99 | delete d_1_3_Core; | - |
100 | } never executed: end of block | 0 |
101 | if (d_1_4_Core && !d_1_4_Core->refs.deref()) {TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
102 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Core->context, QOpenGLFunctions_1_4_CoreBackend::versionStatus()); | - |
103 | delete d_1_4_Core; | - |
104 | } never executed: end of block | 0 |
105 | if (d_1_5_Core && !d_1_5_Core->refs.deref()) {TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
106 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_5_Core->context, QOpenGLFunctions_1_5_CoreBackend::versionStatus()); | - |
107 | delete d_1_5_Core; | - |
108 | } never executed: end of block | 0 |
109 | if (d_2_0_Core && !d_2_0_Core->refs.deref()) {TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
110 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_0_Core->context, QOpenGLFunctions_2_0_CoreBackend::versionStatus()); | - |
111 | delete d_2_0_Core; | - |
112 | } never executed: end of block | 0 |
113 | if (d_2_1_Core && !d_2_1_Core->refs.deref()) {TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
114 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_1_Core->context, QOpenGLFunctions_2_1_CoreBackend::versionStatus()); | - |
115 | delete d_2_1_Core; | - |
116 | } never executed: end of block | 0 |
117 | if (d_3_0_Core && !d_3_0_Core->refs.deref()) {TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
118 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_0_Core->context, QOpenGLFunctions_3_0_CoreBackend::versionStatus()); | - |
119 | delete d_3_0_Core; | - |
120 | } never executed: end of block | 0 |
121 | if (d_3_1_Core && !d_3_1_Core->refs.deref()) {TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
122 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_1_Core->context, QOpenGLFunctions_3_1_CoreBackend::versionStatus()); | - |
123 | delete d_3_1_Core; | - |
124 | } never executed: end of block | 0 |
125 | if (d_3_2_Core && !d_3_2_Core->refs.deref()) {TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
126 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_2_Core->context, QOpenGLFunctions_3_2_CoreBackend::versionStatus()); | - |
127 | delete d_3_2_Core; | - |
128 | } never executed: end of block | 0 |
129 | if (d_3_3_Core && !d_3_3_Core->refs.deref()) {TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
130 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_3_Core->context, QOpenGLFunctions_3_3_CoreBackend::versionStatus()); | - |
131 | delete d_3_3_Core; | - |
132 | } never executed: end of block | 0 |
133 | if (d_4_0_Core && !d_4_0_Core->refs.deref()) {TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
134 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_0_Core->context, QOpenGLFunctions_4_0_CoreBackend::versionStatus()); | - |
135 | delete d_4_0_Core; | - |
136 | } never executed: end of block | 0 |
137 | if (d_4_1_Core && !d_4_1_Core->refs.deref()) {TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
138 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_1_Core->context, QOpenGLFunctions_4_1_CoreBackend::versionStatus()); | - |
139 | delete d_4_1_Core; | - |
140 | } never executed: end of block | 0 |
141 | if (d_4_2_Core && !d_4_2_Core->refs.deref()) {TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
142 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_2_Core->context, QOpenGLFunctions_4_2_CoreBackend::versionStatus()); | - |
143 | delete d_4_2_Core; | - |
144 | } never executed: end of block | 0 |
145 | if (d_4_3_Core && !d_4_3_Core->refs.deref()) {TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
146 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_3_Core->context, QOpenGLFunctions_4_3_CoreBackend::versionStatus()); | - |
147 | delete d_4_3_Core; | - |
148 | } never executed: end of block | 0 |
149 | } never executed: end of block | 0 |
150 | | - |
151 | bool QOpenGLFunctions_4_3_Core::initializeOpenGLFunctions() | - |
152 | { | - |
153 | if ( isInitialized() )TRUE | never evaluated | FALSE | never evaluated |
| 0 |
154 | return true; never executed: return true; | 0 |
155 | | - |
156 | QOpenGLContext* context = QOpenGLContext::currentContext(); | - |
157 | | - |
158 | | - |
159 | | - |
160 | if (((owningContext() && owningContext() == context) || !owningContext())TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
161 | && QOpenGLFunctions_4_3_Core::isContextCompatible(context))TRUE | never evaluated | FALSE | never evaluated |
| 0 |
162 | { | - |
163 | | - |
164 | | - |
165 | QOpenGLVersionFunctionsBackend* d = 0; | - |
166 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); | - |
167 | if (!d) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
168 | d = new QOpenGLFunctions_1_0_CoreBackend(context); | - |
169 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus(), d); | - |
170 | } never executed: end of block | 0 |
171 | d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d); | - |
172 | d->refs.ref(); | - |
173 | | - |
174 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus()); | - |
175 | if (!d) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
176 | d = new QOpenGLFunctions_1_1_CoreBackend(context); | - |
177 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus(), d); | - |
178 | } never executed: end of block | 0 |
179 | d_1_1_Core = static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d); | - |
180 | d->refs.ref(); | - |
181 | | - |
182 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus()); | - |
183 | if (!d) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
184 | d = new QOpenGLFunctions_1_2_CoreBackend(context); | - |
185 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus(), d); | - |
186 | } never executed: end of block | 0 |
187 | d_1_2_Core = static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d); | - |
188 | d->refs.ref(); | - |
189 | | - |
190 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus()); | - |
191 | if (!d) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
192 | d = new QOpenGLFunctions_1_3_CoreBackend(context); | - |
193 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus(), d); | - |
194 | } never executed: end of block | 0 |
195 | d_1_3_Core = static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d); | - |
196 | d->refs.ref(); | - |
197 | | - |
198 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus()); | - |
199 | if (!d) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
200 | d = new QOpenGLFunctions_1_4_CoreBackend(context); | - |
201 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus(), d); | - |
202 | } never executed: end of block | 0 |
203 | d_1_4_Core = static_cast<QOpenGLFunctions_1_4_CoreBackend*>(d); | - |
204 | d->refs.ref(); | - |
205 | | - |
206 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus()); | - |
207 | if (!d) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
208 | d = new QOpenGLFunctions_1_5_CoreBackend(context); | - |
209 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus(), d); | - |
210 | } never executed: end of block | 0 |
211 | d_1_5_Core = static_cast<QOpenGLFunctions_1_5_CoreBackend*>(d); | - |
212 | d->refs.ref(); | - |
213 | | - |
214 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus()); | - |
215 | if (!d) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
216 | d = new QOpenGLFunctions_2_0_CoreBackend(context); | - |
217 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus(), d); | - |
218 | } never executed: end of block | 0 |
219 | d_2_0_Core = static_cast<QOpenGLFunctions_2_0_CoreBackend*>(d); | - |
220 | d->refs.ref(); | - |
221 | | - |
222 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus()); | - |
223 | if (!d) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
224 | d = new QOpenGLFunctions_2_1_CoreBackend(context); | - |
225 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus(), d); | - |
226 | } never executed: end of block | 0 |
227 | d_2_1_Core = static_cast<QOpenGLFunctions_2_1_CoreBackend*>(d); | - |
228 | d->refs.ref(); | - |
229 | | - |
230 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus()); | - |
231 | if (!d) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
232 | d = new QOpenGLFunctions_3_0_CoreBackend(context); | - |
233 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus(), d); | - |
234 | } never executed: end of block | 0 |
235 | d_3_0_Core = static_cast<QOpenGLFunctions_3_0_CoreBackend*>(d); | - |
236 | d->refs.ref(); | - |
237 | | - |
238 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus()); | - |
239 | if (!d) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
240 | d = new QOpenGLFunctions_3_1_CoreBackend(context); | - |
241 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus(), d); | - |
242 | } never executed: end of block | 0 |
243 | d_3_1_Core = static_cast<QOpenGLFunctions_3_1_CoreBackend*>(d); | - |
244 | d->refs.ref(); | - |
245 | | - |
246 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus()); | - |
247 | if (!d) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
248 | d = new QOpenGLFunctions_3_2_CoreBackend(context); | - |
249 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus(), d); | - |
250 | } never executed: end of block | 0 |
251 | d_3_2_Core = static_cast<QOpenGLFunctions_3_2_CoreBackend*>(d); | - |
252 | d->refs.ref(); | - |
253 | | - |
254 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus()); | - |
255 | if (!d) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
256 | d = new QOpenGLFunctions_3_3_CoreBackend(context); | - |
257 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus(), d); | - |
258 | } never executed: end of block | 0 |
259 | d_3_3_Core = static_cast<QOpenGLFunctions_3_3_CoreBackend*>(d); | - |
260 | d->refs.ref(); | - |
261 | | - |
262 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_0_CoreBackend::versionStatus()); | - |
263 | if (!d) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
264 | d = new QOpenGLFunctions_4_0_CoreBackend(context); | - |
265 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_0_CoreBackend::versionStatus(), d); | - |
266 | } never executed: end of block | 0 |
267 | d_4_0_Core = static_cast<QOpenGLFunctions_4_0_CoreBackend*>(d); | - |
268 | d->refs.ref(); | - |
269 | | - |
270 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_1_CoreBackend::versionStatus()); | - |
271 | if (!d) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
272 | d = new QOpenGLFunctions_4_1_CoreBackend(context); | - |
273 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_1_CoreBackend::versionStatus(), d); | - |
274 | } never executed: end of block | 0 |
275 | d_4_1_Core = static_cast<QOpenGLFunctions_4_1_CoreBackend*>(d); | - |
276 | d->refs.ref(); | - |
277 | | - |
278 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_2_CoreBackend::versionStatus()); | - |
279 | if (!d) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
280 | d = new QOpenGLFunctions_4_2_CoreBackend(context); | - |
281 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_2_CoreBackend::versionStatus(), d); | - |
282 | } never executed: end of block | 0 |
283 | d_4_2_Core = static_cast<QOpenGLFunctions_4_2_CoreBackend*>(d); | - |
284 | d->refs.ref(); | - |
285 | | - |
286 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_3_CoreBackend::versionStatus()); | - |
287 | if (!d) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
288 | d = new QOpenGLFunctions_4_3_CoreBackend(context); | - |
289 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_3_CoreBackend::versionStatus(), d); | - |
290 | } never executed: end of block | 0 |
291 | d_4_3_Core = static_cast<QOpenGLFunctions_4_3_CoreBackend*>(d); | - |
292 | d->refs.ref(); | - |
293 | | - |
294 | QAbstractOpenGLFunctions::initializeOpenGLFunctions(); | - |
295 | } never executed: end of block | 0 |
296 | return isInitialized(); never executed: return isInitialized(); | 0 |
297 | } | - |
298 | | - |
299 | bool QOpenGLFunctions_4_3_Core::isContextCompatible(QOpenGLContext *context) | - |
300 | { | - |
301 | Q_ASSERT(context); | - |
302 | QSurfaceFormat f = context->format(); | - |
303 | const QPair<int, int> v = qMakePair(f.majorVersion(), f.minorVersion()); | - |
304 | if (v < qMakePair(4, 3))TRUE | never evaluated | FALSE | never evaluated |
| 0 |
305 | return false; never executed: return false; | 0 |
306 | | - |
307 | return true; never executed: return true; | 0 |
308 | } | - |
309 | | - |
310 | QOpenGLVersionProfile QOpenGLFunctions_4_3_Core::versionProfile() | - |
311 | { | - |
312 | QOpenGLVersionProfile v; | - |
313 | v.setVersion(4, 3); | - |
314 | v.setProfile(QSurfaceFormat::CoreProfile); | - |
315 | return v; never executed: return v; | 0 |
316 | } | - |
317 | | - |
318 | QT_END_NAMESPACE | - |
| | |