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