Line | Source | Count |
1 | | - |
2 | | - |
3 | QOpenGLFunctions_3_0::QOpenGLFunctions_3_0() | - |
4 | : QAbstractOpenGLFunctions() | - |
5 | , d_1_0_Core(0) | - |
6 | , d_1_1_Core(0) | - |
7 | , d_1_2_Core(0) | - |
8 | , d_1_3_Core(0) | - |
9 | , d_1_4_Core(0) | - |
10 | , d_1_5_Core(0) | - |
11 | , d_2_0_Core(0) | - |
12 | , d_2_1_Core(0) | - |
13 | , d_3_0_Core(0) | - |
14 | , d_1_0_Deprecated(0) | - |
15 | , d_1_1_Deprecated(0) | - |
16 | , d_1_2_Deprecated(0) | - |
17 | , d_1_3_Deprecated(0) | - |
18 | , d_1_4_Deprecated(0) | - |
19 | , m_reserved_2_0_Deprecated(nullptr) | - |
20 | , m_reserved_3_0_Deprecated(nullptr) | - |
21 | { | - |
22 | } never executed: end of block | 0 |
23 | | - |
24 | QOpenGLFunctions_3_0::~QOpenGLFunctions_3_0() | - |
25 | { | - |
26 | if (d_1_0_CoreTRUE | never evaluated | FALSE | never evaluated |
&& !d_1_0_Core->refs.deref()TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
27 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Core->context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); | - |
28 | delete d_1_0_Core; | - |
29 | } never executed: end of block | 0 |
30 | if (d_1_1_CoreTRUE | never evaluated | FALSE | never evaluated |
&& !d_1_1_Core->refs.deref()TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
31 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Core->context, QOpenGLFunctions_1_1_CoreBackend::versionStatus()); | - |
32 | delete d_1_1_Core; | - |
33 | } never executed: end of block | 0 |
34 | if (d_1_2_CoreTRUE | never evaluated | FALSE | never evaluated |
&& !d_1_2_Core->refs.deref()TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
35 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Core->context, QOpenGLFunctions_1_2_CoreBackend::versionStatus()); | - |
36 | delete d_1_2_Core; | - |
37 | } never executed: end of block | 0 |
38 | if (d_1_3_CoreTRUE | never evaluated | FALSE | never evaluated |
&& !d_1_3_Core->refs.deref()TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
39 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Core->context, QOpenGLFunctions_1_3_CoreBackend::versionStatus()); | - |
40 | delete d_1_3_Core; | - |
41 | } never executed: end of block | 0 |
42 | if (d_1_4_CoreTRUE | never evaluated | FALSE | never evaluated |
&& !d_1_4_Core->refs.deref()TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
43 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Core->context, QOpenGLFunctions_1_4_CoreBackend::versionStatus()); | - |
44 | delete d_1_4_Core; | - |
45 | } never executed: end of block | 0 |
46 | if (d_1_5_CoreTRUE | never evaluated | FALSE | never evaluated |
&& !d_1_5_Core->refs.deref()TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
47 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_5_Core->context, QOpenGLFunctions_1_5_CoreBackend::versionStatus()); | - |
48 | delete d_1_5_Core; | - |
49 | } never executed: end of block | 0 |
50 | if (d_2_0_CoreTRUE | never evaluated | FALSE | never evaluated |
&& !d_2_0_Core->refs.deref()TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
51 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_0_Core->context, QOpenGLFunctions_2_0_CoreBackend::versionStatus()); | - |
52 | delete d_2_0_Core; | - |
53 | } never executed: end of block | 0 |
54 | if (d_2_1_CoreTRUE | never evaluated | FALSE | never evaluated |
&& !d_2_1_Core->refs.deref()TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
55 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_1_Core->context, QOpenGLFunctions_2_1_CoreBackend::versionStatus()); | - |
56 | delete d_2_1_Core; | - |
57 | } never executed: end of block | 0 |
58 | if (d_3_0_CoreTRUE | never evaluated | FALSE | never evaluated |
&& !d_3_0_Core->refs.deref()TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
59 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_0_Core->context, QOpenGLFunctions_3_0_CoreBackend::versionStatus()); | - |
60 | delete d_3_0_Core; | - |
61 | } never executed: end of block | 0 |
62 | if (d_1_0_DeprecatedTRUE | never evaluated | FALSE | never evaluated |
&& !d_1_0_Deprecated->refs.deref()TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
63 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Deprecated->context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus()); | - |
64 | delete d_1_0_Deprecated; | - |
65 | } never executed: end of block | 0 |
66 | if (d_1_1_DeprecatedTRUE | never evaluated | FALSE | never evaluated |
&& !d_1_1_Deprecated->refs.deref()TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
67 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Deprecated->context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus()); | - |
68 | delete d_1_1_Deprecated; | - |
69 | } never executed: end of block | 0 |
70 | if (d_1_2_DeprecatedTRUE | never evaluated | FALSE | never evaluated |
&& !d_1_2_Deprecated->refs.deref()TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
71 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Deprecated->context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus()); | - |
72 | delete d_1_2_Deprecated; | - |
73 | } never executed: end of block | 0 |
74 | if (d_1_3_DeprecatedTRUE | never evaluated | FALSE | never evaluated |
&& !d_1_3_Deprecated->refs.deref()TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
75 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Deprecated->context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus()); | - |
76 | delete d_1_3_Deprecated; | - |
77 | } never executed: end of block | 0 |
78 | if (d_1_4_DeprecatedTRUE | never evaluated | FALSE | never evaluated |
&& !d_1_4_Deprecated->refs.deref()TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
79 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Deprecated->context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus()); | - |
80 | delete d_1_4_Deprecated; | - |
81 | } never executed: end of block | 0 |
82 | } never executed: end of block | 0 |
83 | | - |
84 | bool QOpenGLFunctions_3_0::initializeOpenGLFunctions() | - |
85 | { | - |
86 | if ( isInitialized()TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
87 | return never executed: return true; true;never executed: return true; | 0 |
88 | | - |
89 | QOpenGLContext* context = QOpenGLContext::currentContext(); | - |
90 | | - |
91 | | - |
92 | | - |
93 | if (((owningContext()TRUE | never evaluated | FALSE | never evaluated |
&& owningContext() == contextTRUE | never evaluated | FALSE | never evaluated |
) || !owningContext()TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
94 | && QOpenGLFunctions_3_0::isContextCompatible(context)TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
95 | { | - |
96 | | - |
97 | | - |
98 | QOpenGLVersionFunctionsBackend* d = 0; | - |
99 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); | - |
100 | if (!dTRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
101 | d = new QOpenGLFunctions_1_0_CoreBackend(context); | - |
102 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus(), d); | - |
103 | } never executed: end of block | 0 |
104 | d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d); | - |
105 | d->refs.ref(); | - |
106 | | - |
107 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus()); | - |
108 | if (!dTRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
109 | d = new QOpenGLFunctions_1_1_CoreBackend(context); | - |
110 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus(), d); | - |
111 | } never executed: end of block | 0 |
112 | d_1_1_Core = static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d); | - |
113 | d->refs.ref(); | - |
114 | | - |
115 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus()); | - |
116 | if (!dTRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
117 | d = new QOpenGLFunctions_1_2_CoreBackend(context); | - |
118 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus(), d); | - |
119 | } never executed: end of block | 0 |
120 | d_1_2_Core = static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d); | - |
121 | d->refs.ref(); | - |
122 | | - |
123 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus()); | - |
124 | if (!dTRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
125 | d = new QOpenGLFunctions_1_3_CoreBackend(context); | - |
126 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus(), d); | - |
127 | } never executed: end of block | 0 |
128 | d_1_3_Core = static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d); | - |
129 | d->refs.ref(); | - |
130 | | - |
131 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus()); | - |
132 | if (!dTRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
133 | d = new QOpenGLFunctions_1_4_CoreBackend(context); | - |
134 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus(), d); | - |
135 | } never executed: end of block | 0 |
136 | d_1_4_Core = static_cast<QOpenGLFunctions_1_4_CoreBackend*>(d); | - |
137 | d->refs.ref(); | - |
138 | | - |
139 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus()); | - |
140 | if (!dTRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
141 | d = new QOpenGLFunctions_1_5_CoreBackend(context); | - |
142 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus(), d); | - |
143 | } never executed: end of block | 0 |
144 | d_1_5_Core = static_cast<QOpenGLFunctions_1_5_CoreBackend*>(d); | - |
145 | d->refs.ref(); | - |
146 | | - |
147 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus()); | - |
148 | if (!dTRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
149 | d = new QOpenGLFunctions_2_0_CoreBackend(context); | - |
150 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus(), d); | - |
151 | } never executed: end of block | 0 |
152 | d_2_0_Core = static_cast<QOpenGLFunctions_2_0_CoreBackend*>(d); | - |
153 | d->refs.ref(); | - |
154 | | - |
155 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus()); | - |
156 | if (!dTRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
157 | d = new QOpenGLFunctions_2_1_CoreBackend(context); | - |
158 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus(), d); | - |
159 | } never executed: end of block | 0 |
160 | d_2_1_Core = static_cast<QOpenGLFunctions_2_1_CoreBackend*>(d); | - |
161 | d->refs.ref(); | - |
162 | | - |
163 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus()); | - |
164 | if (!dTRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
165 | d = new QOpenGLFunctions_3_0_CoreBackend(context); | - |
166 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus(), d); | - |
167 | } never executed: end of block | 0 |
168 | d_3_0_Core = static_cast<QOpenGLFunctions_3_0_CoreBackend*>(d); | - |
169 | d->refs.ref(); | - |
170 | | - |
171 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus()); | - |
172 | if (!dTRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
173 | d = new QOpenGLFunctions_1_0_DeprecatedBackend(context); | - |
174 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus(), d); | - |
175 | } never executed: end of block | 0 |
176 | d_1_0_Deprecated = static_cast<QOpenGLFunctions_1_0_DeprecatedBackend*>(d); | - |
177 | d->refs.ref(); | - |
178 | | - |
179 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus()); | - |
180 | if (!dTRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
181 | d = new QOpenGLFunctions_1_1_DeprecatedBackend(context); | - |
182 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus(), d); | - |
183 | } never executed: end of block | 0 |
184 | d_1_1_Deprecated = static_cast<QOpenGLFunctions_1_1_DeprecatedBackend*>(d); | - |
185 | d->refs.ref(); | - |
186 | | - |
187 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus()); | - |
188 | if (!dTRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
189 | d = new QOpenGLFunctions_1_2_DeprecatedBackend(context); | - |
190 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus(), d); | - |
191 | } never executed: end of block | 0 |
192 | d_1_2_Deprecated = static_cast<QOpenGLFunctions_1_2_DeprecatedBackend*>(d); | - |
193 | d->refs.ref(); | - |
194 | | - |
195 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus()); | - |
196 | if (!dTRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
197 | d = new QOpenGLFunctions_1_3_DeprecatedBackend(context); | - |
198 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus(), d); | - |
199 | } never executed: end of block | 0 |
200 | d_1_3_Deprecated = static_cast<QOpenGLFunctions_1_3_DeprecatedBackend*>(d); | - |
201 | d->refs.ref(); | - |
202 | | - |
203 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus()); | - |
204 | if (!dTRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
205 | d = new QOpenGLFunctions_1_4_DeprecatedBackend(context); | - |
206 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus(), d); | - |
207 | } never executed: end of block | 0 |
208 | d_1_4_Deprecated = static_cast<QOpenGLFunctions_1_4_DeprecatedBackend*>(d); | - |
209 | d->refs.ref(); | - |
210 | | - |
211 | QAbstractOpenGLFunctions::initializeOpenGLFunctions(); | - |
212 | } never executed: end of block | 0 |
213 | return never executed: return isInitialized(); isInitialized();never executed: return isInitialized(); | 0 |
214 | } | - |
215 | | - |
216 | bool QOpenGLFunctions_3_0::isContextCompatible(QOpenGLContext *context) | - |
217 | { | - |
218 | ((!(context)) ? qt_assert("context",__FILE__,277) : qt_noop()); | - |
219 | QSurfaceFormat f = context->format(); | - |
220 | const QPair<int, int> v = qMakePair(f.majorVersion(), f.minorVersion()); | - |
221 | if (v < qMakePair(3, 0)TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
222 | return never executed: return false; false;never executed: return false; | 0 |
223 | | - |
224 | if (f.profile() == QSurfaceFormat::CoreProfileTRUE | never evaluated | FALSE | never evaluated |
) | 0 |
225 | return never executed: return false; false;never executed: return false; | 0 |
226 | | - |
227 | return never executed: return true; true;never executed: return true; | 0 |
228 | } | - |
229 | | - |
230 | QOpenGLVersionProfile QOpenGLFunctions_3_0::versionProfile() | - |
231 | { | - |
232 | QOpenGLVersionProfile v; | - |
233 | v.setVersion(3, 0); | - |
234 | return never executed: return v; v;never executed: return v; | 0 |
235 | } | - |
236 | | - |
237 | | - |
| | |