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