qopenglfunctions_4_3_compatibility.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/gui/opengl/qopenglfunctions_4_3_compatibility.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3QOpenGLFunctions_4_3_Compatibility::QOpenGLFunctions_4_3_Compatibility()-
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_3_1_Core(0)-
15 , d_3_2_Core(0)-
16 , d_3_3_Core(0)-
17 , d_4_0_Core(0)-
18 , d_4_1_Core(0)-
19 , d_4_2_Core(0)-
20 , d_4_3_Core(0)-
21 , d_1_0_Deprecated(0)-
22 , d_1_1_Deprecated(0)-
23 , d_1_2_Deprecated(0)-
24 , d_1_3_Deprecated(0)-
25 , d_1_4_Deprecated(0)-
26 , m_reserved_2_0_Deprecated(nullptr)-
27 , d_3_3_Deprecated(0)-
28{-
29}
never executed: end of block
0
30-
31QOpenGLFunctions_4_3_Compatibility::~QOpenGLFunctions_4_3_Compatibility()-
32{-
33 if (d_1_0_Core
d_1_0_CoreDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
34 d_1_0_Core->refs.deref();
never executed: d_1_0_Core->refs.deref();
0
35 ((!(d_1_0_Core->refs.load())) ? qt_assert("d_1_0_Core->refs.load()",__FILE__,100) : qt_noop());-
36 if (d_1_1_Core
d_1_1_CoreDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
37 d_1_1_Core->refs.deref();
never executed: d_1_1_Core->refs.deref();
0
38 ((!(d_1_1_Core->refs.load())) ? qt_assert("d_1_1_Core->refs.load()",__FILE__,103) : qt_noop());-
39 if (d_1_2_Core
d_1_2_CoreDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
40 d_1_2_Core->refs.deref();
never executed: d_1_2_Core->refs.deref();
0
41 ((!(d_1_2_Core->refs.load())) ? qt_assert("d_1_2_Core->refs.load()",__FILE__,106) : qt_noop());-
42 if (d_1_3_Core
d_1_3_CoreDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
43 d_1_3_Core->refs.deref();
never executed: d_1_3_Core->refs.deref();
0
44 ((!(d_1_3_Core->refs.load())) ? qt_assert("d_1_3_Core->refs.load()",__FILE__,109) : qt_noop());-
45 if (d_1_4_Core
d_1_4_CoreDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
46 d_1_4_Core->refs.deref();
never executed: d_1_4_Core->refs.deref();
0
47 ((!(d_1_4_Core->refs.load())) ? qt_assert("d_1_4_Core->refs.load()",__FILE__,112) : qt_noop());-
48 if (d_1_5_Core
d_1_5_CoreDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
49 d_1_5_Core->refs.deref();
never executed: d_1_5_Core->refs.deref();
0
50 ((!(d_1_5_Core->refs.load())) ? qt_assert("d_1_5_Core->refs.load()",__FILE__,115) : qt_noop());-
51 if (d_2_0_Core
d_2_0_CoreDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
52 d_2_0_Core->refs.deref();
never executed: d_2_0_Core->refs.deref();
0
53 ((!(d_2_0_Core->refs.load())) ? qt_assert("d_2_0_Core->refs.load()",__FILE__,118) : qt_noop());-
54 if (d_2_1_Core
d_2_1_CoreDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
55 d_2_1_Core->refs.deref();
never executed: d_2_1_Core->refs.deref();
0
56 ((!(d_2_1_Core->refs.load())) ? qt_assert("d_2_1_Core->refs.load()",__FILE__,121) : qt_noop());-
57 if (d_3_0_Core
d_3_0_CoreDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
58 d_3_0_Core->refs.deref();
never executed: d_3_0_Core->refs.deref();
0
59 ((!(d_3_0_Core->refs.load())) ? qt_assert("d_3_0_Core->refs.load()",__FILE__,124) : qt_noop());-
60 if (d_3_1_Core
d_3_1_CoreDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
61 d_3_1_Core->refs.deref();
never executed: d_3_1_Core->refs.deref();
0
62 ((!(d_3_1_Core->refs.load())) ? qt_assert("d_3_1_Core->refs.load()",__FILE__,127) : qt_noop());-
63 if (d_3_2_Core
d_3_2_CoreDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
64 d_3_2_Core->refs.deref();
never executed: d_3_2_Core->refs.deref();
0
65 ((!(d_3_2_Core->refs.load())) ? qt_assert("d_3_2_Core->refs.load()",__FILE__,130) : qt_noop());-
66 if (d_3_3_Core
d_3_3_CoreDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
67 d_3_3_Core->refs.deref();
never executed: d_3_3_Core->refs.deref();
0
68 ((!(d_3_3_Core->refs.load())) ? qt_assert("d_3_3_Core->refs.load()",__FILE__,133) : qt_noop());-
69 if (d_4_0_Core
d_4_0_CoreDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
70 d_4_0_Core->refs.deref();
never executed: d_4_0_Core->refs.deref();
0
71 ((!(d_4_0_Core->refs.load())) ? qt_assert("d_4_0_Core->refs.load()",__FILE__,136) : qt_noop());-
72 if (d_4_1_Core
d_4_1_CoreDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
73 d_4_1_Core->refs.deref();
never executed: d_4_1_Core->refs.deref();
0
74 ((!(d_4_1_Core->refs.load())) ? qt_assert("d_4_1_Core->refs.load()",__FILE__,139) : qt_noop());-
75 if (d_4_2_Core
d_4_2_CoreDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
76 d_4_2_Core->refs.deref();
never executed: d_4_2_Core->refs.deref();
0
77 ((!(d_4_2_Core->refs.load())) ? qt_assert("d_4_2_Core->refs.load()",__FILE__,142) : qt_noop());-
78 if (d_4_3_Core
d_4_3_CoreDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
79 d_4_3_Core->refs.deref();
never executed: d_4_3_Core->refs.deref();
0
80 ((!(d_4_3_Core->refs.load())) ? qt_assert("d_4_3_Core->refs.load()",__FILE__,145) : qt_noop());-
81 if (d_1_0_Deprecated
d_1_0_DeprecatedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
82 d_1_0_Deprecated->refs.deref();
never executed: d_1_0_Deprecated->refs.deref();
0
83 ((!(d_1_0_Deprecated->refs.load())) ? qt_assert("d_1_0_Deprecated->refs.load()",__FILE__,148) : qt_noop());-
84 if (d_1_1_Deprecated
d_1_1_DeprecatedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
85 d_1_1_Deprecated->refs.deref();
never executed: d_1_1_Deprecated->refs.deref();
0
86 ((!(d_1_1_Deprecated->refs.load())) ? qt_assert("d_1_1_Deprecated->refs.load()",__FILE__,151) : qt_noop());-
87 if (d_1_2_Deprecated
d_1_2_DeprecatedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
88 d_1_2_Deprecated->refs.deref();
never executed: d_1_2_Deprecated->refs.deref();
0
89 ((!(d_1_2_Deprecated->refs.load())) ? qt_assert("d_1_2_Deprecated->refs.load()",__FILE__,154) : qt_noop());-
90 if (d_1_3_Deprecated
d_1_3_DeprecatedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
91 d_1_3_Deprecated->refs.deref();
never executed: d_1_3_Deprecated->refs.deref();
0
92 ((!(d_1_3_Deprecated->refs.load())) ? qt_assert("d_1_3_Deprecated->refs.load()",__FILE__,157) : qt_noop());-
93 if (d_1_4_Deprecated
d_1_4_DeprecatedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
94 d_1_4_Deprecated->refs.deref();
never executed: d_1_4_Deprecated->refs.deref();
0
95 ((!(d_1_4_Deprecated->refs.load())) ? qt_assert("d_1_4_Deprecated->refs.load()",__FILE__,160) : qt_noop());-
96 if (d_3_3_Deprecated
d_3_3_DeprecatedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
97 d_3_3_Deprecated->refs.deref();
never executed: d_3_3_Deprecated->refs.deref();
0
98 ((!(d_3_3_Deprecated->refs.load())) ? qt_assert("d_3_3_Deprecated->refs.load()",__FILE__,163) : qt_noop());-
99}
never executed: end of block
0
100-
101bool QOpenGLFunctions_4_3_Compatibility::initializeOpenGLFunctions()-
102{-
103 if ( isInitialized()
isInitialized()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
104 return
never executed: return true;
true;
never executed: return true;
0
105-
106 QOpenGLContext* context = QOpenGLContext::currentContext();-
107-
108-
109-
110 if (((owningContext()
owningContext()Description
TRUEnever evaluated
FALSEnever evaluated
&& owningContext() == context
owningContext() == contextDescription
TRUEnever evaluated
FALSEnever evaluated
) || !owningContext()
!owningContext()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
111 && QOpenGLFunctions_4_3_Compatibility::isContextCompatible(context)
QOpenGLFunctio...tible(context)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
112 {-
113-
114-
115 QOpenGLVersionFunctionsBackend* d = 0;-
116 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());-
117 d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);-
118 d->refs.ref();-
119-
120 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());-
121 d_1_1_Core = static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d);-
122 d->refs.ref();-
123-
124 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());-
125 d_1_2_Core = static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d);-
126 d->refs.ref();-
127-
128 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());-
129 d_1_3_Core = static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d);-
130 d->refs.ref();-
131-
132 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());-
133 d_1_4_Core = static_cast<QOpenGLFunctions_1_4_CoreBackend*>(d);-
134 d->refs.ref();-
135-
136 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());-
137 d_1_5_Core = static_cast<QOpenGLFunctions_1_5_CoreBackend*>(d);-
138 d->refs.ref();-
139-
140 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());-
141 d_2_0_Core = static_cast<QOpenGLFunctions_2_0_CoreBackend*>(d);-
142 d->refs.ref();-
143-
144 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());-
145 d_2_1_Core = static_cast<QOpenGLFunctions_2_1_CoreBackend*>(d);-
146 d->refs.ref();-
147-
148 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());-
149 d_3_0_Core = static_cast<QOpenGLFunctions_3_0_CoreBackend*>(d);-
150 d->refs.ref();-
151-
152 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());-
153 d_3_1_Core = static_cast<QOpenGLFunctions_3_1_CoreBackend*>(d);-
154 d->refs.ref();-
155-
156 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus());-
157 d_3_2_Core = static_cast<QOpenGLFunctions_3_2_CoreBackend*>(d);-
158 d->refs.ref();-
159-
160 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus());-
161 d_3_3_Core = static_cast<QOpenGLFunctions_3_3_CoreBackend*>(d);-
162 d->refs.ref();-
163-
164 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_0_CoreBackend::versionStatus());-
165 d_4_0_Core = static_cast<QOpenGLFunctions_4_0_CoreBackend*>(d);-
166 d->refs.ref();-
167-
168 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_1_CoreBackend::versionStatus());-
169 d_4_1_Core = static_cast<QOpenGLFunctions_4_1_CoreBackend*>(d);-
170 d->refs.ref();-
171-
172 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_2_CoreBackend::versionStatus());-
173 d_4_2_Core = static_cast<QOpenGLFunctions_4_2_CoreBackend*>(d);-
174 d->refs.ref();-
175-
176 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_3_CoreBackend::versionStatus());-
177 d_4_3_Core = static_cast<QOpenGLFunctions_4_3_CoreBackend*>(d);-
178 d->refs.ref();-
179-
180 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());-
181 d_1_0_Deprecated = static_cast<QOpenGLFunctions_1_0_DeprecatedBackend*>(d);-
182 d->refs.ref();-
183-
184 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());-
185 d_1_1_Deprecated = static_cast<QOpenGLFunctions_1_1_DeprecatedBackend*>(d);-
186 d->refs.ref();-
187-
188 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus());-
189 d_1_2_Deprecated = static_cast<QOpenGLFunctions_1_2_DeprecatedBackend*>(d);-
190 d->refs.ref();-
191-
192 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus());-
193 d_1_3_Deprecated = static_cast<QOpenGLFunctions_1_3_DeprecatedBackend*>(d);-
194 d->refs.ref();-
195-
196 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus());-
197 d_1_4_Deprecated = static_cast<QOpenGLFunctions_1_4_DeprecatedBackend*>(d);-
198 d->refs.ref();-
199-
200 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_DeprecatedBackend::versionStatus());-
201 d_3_3_Deprecated = static_cast<QOpenGLFunctions_3_3_DeprecatedBackend*>(d);-
202 d->refs.ref();-
203-
204 QAbstractOpenGLFunctions::initializeOpenGLFunctions();-
205 }
never executed: end of block
0
206 return
never executed: return isInitialized();
isInitialized();
never executed: return isInitialized();
0
207}-
208-
209bool QOpenGLFunctions_4_3_Compatibility::isContextCompatible(QOpenGLContext *context)-
210{-
211 ((!(context)) ? qt_assert("context",__FILE__,276) : qt_noop());-
212 QSurfaceFormat f = context->format();-
213 const QPair<int, int> v = qMakePair(f.majorVersion(), f.minorVersion());-
214 if (v < qMakePair(4, 3)
v < qMakePair(4, 3)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
215 return
never executed: return false;
false;
never executed: return false;
0
216-
217 if (f.profile() == QSurfaceFormat::CoreProfile
f.profile() ==...t::CoreProfileDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
218 return
never executed: return false;
false;
never executed: return false;
0
219-
220 return
never executed: return true;
true;
never executed: return true;
0
221}-
222-
223QOpenGLVersionProfile QOpenGLFunctions_4_3_Compatibility::versionProfile()-
224{-
225 QOpenGLVersionProfile v;-
226 v.setVersion(4, 3);-
227 v.setProfile(QSurfaceFormat::CompatibilityProfile);-
228 return
never executed: return v;
v;
never executed: return v;
0
229}-
230-
231-
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial 4.3.0-BETA-master-30-08-2018-4cb69e9