qopenglfunctions_4_1_compatibility.cpp

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

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