62QOpenGLFunctions_4_4_Compatibility::~QOpenGLFunctions_4_4_Compatibility()
65 d_1_0_Core->refs.deref();
66 Q_ASSERT(d_1_0_Core->refs.loadRelaxed());
69 d_1_1_Core->refs.deref();
70 Q_ASSERT(d_1_1_Core->refs.loadRelaxed());
73 d_1_2_Core->refs.deref();
74 Q_ASSERT(d_1_2_Core->refs.loadRelaxed());
77 d_1_3_Core->refs.deref();
78 Q_ASSERT(d_1_3_Core->refs.loadRelaxed());
81 d_1_4_Core->refs.deref();
82 Q_ASSERT(d_1_4_Core->refs.loadRelaxed());
85 d_1_5_Core->refs.deref();
86 Q_ASSERT(d_1_5_Core->refs.loadRelaxed());
89 d_2_0_Core->refs.deref();
90 Q_ASSERT(d_2_0_Core->refs.loadRelaxed());
93 d_2_1_Core->refs.deref();
94 Q_ASSERT(d_2_1_Core->refs.loadRelaxed());
97 d_3_0_Core->refs.deref();
98 Q_ASSERT(d_3_0_Core->refs.loadRelaxed());
101 d_3_1_Core->refs.deref();
102 Q_ASSERT(d_3_1_Core->refs.loadRelaxed());
105 d_3_2_Core->refs.deref();
106 Q_ASSERT(d_3_2_Core->refs.loadRelaxed());
109 d_3_3_Core->refs.deref();
110 Q_ASSERT(d_3_3_Core->refs.loadRelaxed());
113 d_4_0_Core->refs.deref();
114 Q_ASSERT(d_4_0_Core->refs.loadRelaxed());
117 d_4_1_Core->refs.deref();
118 Q_ASSERT(d_4_1_Core->refs.loadRelaxed());
121 d_4_2_Core->refs.deref();
122 Q_ASSERT(d_4_2_Core->refs.loadRelaxed());
125 d_4_3_Core->refs.deref();
126 Q_ASSERT(d_4_3_Core->refs.loadRelaxed());
129 d_4_4_Core->refs.deref();
130 Q_ASSERT(d_4_4_Core->refs.loadRelaxed());
132 if (d_1_0_Deprecated) {
133 d_1_0_Deprecated->refs.deref();
134 Q_ASSERT(d_1_0_Deprecated->refs.loadRelaxed());
136 if (d_1_1_Deprecated) {
137 d_1_1_Deprecated->refs.deref();
138 Q_ASSERT(d_1_1_Deprecated->refs.loadRelaxed());
140 if (d_1_2_Deprecated) {
141 d_1_2_Deprecated->refs.deref();
142 Q_ASSERT(d_1_2_Deprecated->refs.loadRelaxed());
144 if (d_1_3_Deprecated) {
145 d_1_3_Deprecated->refs.deref();
146 Q_ASSERT(d_1_3_Deprecated->refs.loadRelaxed());
148 if (d_1_4_Deprecated) {
149 d_1_4_Deprecated->refs.deref();
150 Q_ASSERT(d_1_4_Deprecated->refs.loadRelaxed());
152 if (d_3_3_Deprecated) {
153 d_3_3_Deprecated->refs.deref();
154 Q_ASSERT(d_3_3_Deprecated->refs.loadRelaxed());
158bool QOpenGLFunctions_4_4_Compatibility::initializeOpenGLFunctions()
160 if ( isInitialized() )
163 QOpenGLContext* context = QOpenGLContext::currentContext();
167 if (((owningContext() && owningContext() == context) || !owningContext())
168 && QOpenGLFunctions_4_4_Compatibility::isContextCompatible(context))
172 QOpenGLVersionFunctionsBackend* d =
nullptr;
173 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
174 d_1_0_Core =
static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
177 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
178 d_1_1_Core =
static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d);
181 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
182 d_1_2_Core =
static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d);
185 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
186 d_1_3_Core =
static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d);
189 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
190 d_1_4_Core =
static_cast<QOpenGLFunctions_1_4_CoreBackend*>(d);
193 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
194 d_1_5_Core =
static_cast<QOpenGLFunctions_1_5_CoreBackend*>(d);
197 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
198 d_2_0_Core =
static_cast<QOpenGLFunctions_2_0_CoreBackend*>(d);
201 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
202 d_2_1_Core =
static_cast<QOpenGLFunctions_2_1_CoreBackend*>(d);
205 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
206 d_3_0_Core =
static_cast<QOpenGLFunctions_3_0_CoreBackend*>(d);
209 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());
210 d_3_1_Core =
static_cast<QOpenGLFunctions_3_1_CoreBackend*>(d);
213 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus());
214 d_3_2_Core =
static_cast<QOpenGLFunctions_3_2_CoreBackend*>(d);
217 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus());
218 d_3_3_Core =
static_cast<QOpenGLFunctions_3_3_CoreBackend*>(d);
221 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_0_CoreBackend::versionStatus());
222 d_4_0_Core =
static_cast<QOpenGLFunctions_4_0_CoreBackend*>(d);
225 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_1_CoreBackend::versionStatus());
226 d_4_1_Core =
static_cast<QOpenGLFunctions_4_1_CoreBackend*>(d);
229 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_2_CoreBackend::versionStatus());
230 d_4_2_Core =
static_cast<QOpenGLFunctions_4_2_CoreBackend*>(d);
233 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_3_CoreBackend::versionStatus());
234 d_4_3_Core =
static_cast<QOpenGLFunctions_4_3_CoreBackend*>(d);
237 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_4_CoreBackend::versionStatus());
238 d_4_4_Core =
static_cast<QOpenGLFunctions_4_4_CoreBackend*>(d);
241 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());
242 d_1_0_Deprecated =
static_cast<QOpenGLFunctions_1_0_DeprecatedBackend*>(d);
245 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());
246 d_1_1_Deprecated =
static_cast<QOpenGLFunctions_1_1_DeprecatedBackend*>(d);
249 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus());
250 d_1_2_Deprecated =
static_cast<QOpenGLFunctions_1_2_DeprecatedBackend*>(d);
253 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus());
254 d_1_3_Deprecated =
static_cast<QOpenGLFunctions_1_3_DeprecatedBackend*>(d);
257 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus());
258 d_1_4_Deprecated =
static_cast<QOpenGLFunctions_1_4_DeprecatedBackend*>(d);
261 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_DeprecatedBackend::versionStatus());
262 d_3_3_Deprecated =
static_cast<QOpenGLFunctions_3_3_DeprecatedBackend*>(d);
265 QAbstractOpenGLFunctions::initializeOpenGLFunctions();
267 return isInitialized();