63QOpenGLFunctions_4_5_Compatibility::~QOpenGLFunctions_4_5_Compatibility()
66 d_1_0_Core->refs.deref();
67 Q_ASSERT(d_1_0_Core->refs.loadRelaxed());
70 d_1_1_Core->refs.deref();
71 Q_ASSERT(d_1_1_Core->refs.loadRelaxed());
74 d_1_2_Core->refs.deref();
75 Q_ASSERT(d_1_2_Core->refs.loadRelaxed());
78 d_1_3_Core->refs.deref();
79 Q_ASSERT(d_1_3_Core->refs.loadRelaxed());
82 d_1_4_Core->refs.deref();
83 Q_ASSERT(d_1_4_Core->refs.loadRelaxed());
86 d_1_5_Core->refs.deref();
87 Q_ASSERT(d_1_5_Core->refs.loadRelaxed());
90 d_2_0_Core->refs.deref();
91 Q_ASSERT(d_2_0_Core->refs.loadRelaxed());
94 d_2_1_Core->refs.deref();
95 Q_ASSERT(d_2_1_Core->refs.loadRelaxed());
98 d_3_0_Core->refs.deref();
99 Q_ASSERT(d_3_0_Core->refs.loadRelaxed());
102 d_3_1_Core->refs.deref();
103 Q_ASSERT(d_3_1_Core->refs.loadRelaxed());
106 d_3_2_Core->refs.deref();
107 Q_ASSERT(d_3_2_Core->refs.loadRelaxed());
110 d_3_3_Core->refs.deref();
111 Q_ASSERT(d_3_3_Core->refs.loadRelaxed());
114 d_4_0_Core->refs.deref();
115 Q_ASSERT(d_4_0_Core->refs.loadRelaxed());
118 d_4_1_Core->refs.deref();
119 Q_ASSERT(d_4_1_Core->refs.loadRelaxed());
122 d_4_2_Core->refs.deref();
123 Q_ASSERT(d_4_2_Core->refs.loadRelaxed());
126 d_4_3_Core->refs.deref();
127 Q_ASSERT(d_4_3_Core->refs.loadRelaxed());
130 d_4_4_Core->refs.deref();
131 Q_ASSERT(d_4_4_Core->refs.loadRelaxed());
134 d_4_5_Core->refs.deref();
135 Q_ASSERT(d_4_5_Core->refs.loadRelaxed());
137 if (d_1_0_Deprecated) {
138 d_1_0_Deprecated->refs.deref();
139 Q_ASSERT(d_1_0_Deprecated->refs.loadRelaxed());
141 if (d_1_1_Deprecated) {
142 d_1_1_Deprecated->refs.deref();
143 Q_ASSERT(d_1_1_Deprecated->refs.loadRelaxed());
145 if (d_1_2_Deprecated) {
146 d_1_2_Deprecated->refs.deref();
147 Q_ASSERT(d_1_2_Deprecated->refs.loadRelaxed());
149 if (d_1_3_Deprecated) {
150 d_1_3_Deprecated->refs.deref();
151 Q_ASSERT(d_1_3_Deprecated->refs.loadRelaxed());
153 if (d_1_4_Deprecated) {
154 d_1_4_Deprecated->refs.deref();
155 Q_ASSERT(d_1_4_Deprecated->refs.loadRelaxed());
157 if (d_3_3_Deprecated) {
158 d_3_3_Deprecated->refs.deref();
159 Q_ASSERT(d_3_3_Deprecated->refs.loadRelaxed());
161 if (d_4_5_Deprecated) {
162 d_4_5_Deprecated->refs.deref();
163 Q_ASSERT(d_4_5_Deprecated->refs.loadRelaxed());
167bool QOpenGLFunctions_4_5_Compatibility::initializeOpenGLFunctions()
169 if ( isInitialized() )
172 QOpenGLContext* context = QOpenGLContext::currentContext();
176 if (((owningContext() && owningContext() == context) || !owningContext())
177 && QOpenGLFunctions_4_5_Compatibility::isContextCompatible(context))
181 QOpenGLVersionFunctionsBackend* d =
nullptr;
182 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
183 d_1_0_Core =
static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
186 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
187 d_1_1_Core =
static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d);
190 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
191 d_1_2_Core =
static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d);
194 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
195 d_1_3_Core =
static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d);
198 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
199 d_1_4_Core =
static_cast<QOpenGLFunctions_1_4_CoreBackend*>(d);
202 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
203 d_1_5_Core =
static_cast<QOpenGLFunctions_1_5_CoreBackend*>(d);
206 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
207 d_2_0_Core =
static_cast<QOpenGLFunctions_2_0_CoreBackend*>(d);
210 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
211 d_2_1_Core =
static_cast<QOpenGLFunctions_2_1_CoreBackend*>(d);
214 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
215 d_3_0_Core =
static_cast<QOpenGLFunctions_3_0_CoreBackend*>(d);
218 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());
219 d_3_1_Core =
static_cast<QOpenGLFunctions_3_1_CoreBackend*>(d);
222 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus());
223 d_3_2_Core =
static_cast<QOpenGLFunctions_3_2_CoreBackend*>(d);
226 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus());
227 d_3_3_Core =
static_cast<QOpenGLFunctions_3_3_CoreBackend*>(d);
230 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_0_CoreBackend::versionStatus());
231 d_4_0_Core =
static_cast<QOpenGLFunctions_4_0_CoreBackend*>(d);
234 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_1_CoreBackend::versionStatus());
235 d_4_1_Core =
static_cast<QOpenGLFunctions_4_1_CoreBackend*>(d);
238 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_2_CoreBackend::versionStatus());
239 d_4_2_Core =
static_cast<QOpenGLFunctions_4_2_CoreBackend*>(d);
242 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_3_CoreBackend::versionStatus());
243 d_4_3_Core =
static_cast<QOpenGLFunctions_4_3_CoreBackend*>(d);
246 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_4_CoreBackend::versionStatus());
247 d_4_4_Core =
static_cast<QOpenGLFunctions_4_4_CoreBackend*>(d);
250 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_5_CoreBackend::versionStatus());
251 d_4_5_Core =
static_cast<QOpenGLFunctions_4_5_CoreBackend*>(d);
254 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());
255 d_1_0_Deprecated =
static_cast<QOpenGLFunctions_1_0_DeprecatedBackend*>(d);
258 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());
259 d_1_1_Deprecated =
static_cast<QOpenGLFunctions_1_1_DeprecatedBackend*>(d);
262 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus());
263 d_1_2_Deprecated =
static_cast<QOpenGLFunctions_1_2_DeprecatedBackend*>(d);
266 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus());
267 d_1_3_Deprecated =
static_cast<QOpenGLFunctions_1_3_DeprecatedBackend*>(d);
270 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus());
271 d_1_4_Deprecated =
static_cast<QOpenGLFunctions_1_4_DeprecatedBackend*>(d);
274 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_DeprecatedBackend::versionStatus());
275 d_3_3_Deprecated =
static_cast<QOpenGLFunctions_3_3_DeprecatedBackend*>(d);
278 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_5_DeprecatedBackend::versionStatus());
279 d_4_5_Deprecated =
static_cast<QOpenGLFunctions_4_5_DeprecatedBackend*>(d);
282 QAbstractOpenGLFunctions::initializeOpenGLFunctions();
284 return isInitialized();