61QOpenGLFunctions_4_4_Compatibility::~QOpenGLFunctions_4_4_Compatibility()
64 d_1_0_Core->refs.deref();
65 Q_ASSERT(d_1_0_Core->refs.loadRelaxed());
68 d_1_1_Core->refs.deref();
69 Q_ASSERT(d_1_1_Core->refs.loadRelaxed());
72 d_1_2_Core->refs.deref();
73 Q_ASSERT(d_1_2_Core->refs.loadRelaxed());
76 d_1_3_Core->refs.deref();
77 Q_ASSERT(d_1_3_Core->refs.loadRelaxed());
80 d_1_4_Core->refs.deref();
81 Q_ASSERT(d_1_4_Core->refs.loadRelaxed());
84 d_1_5_Core->refs.deref();
85 Q_ASSERT(d_1_5_Core->refs.loadRelaxed());
88 d_2_0_Core->refs.deref();
89 Q_ASSERT(d_2_0_Core->refs.loadRelaxed());
92 d_2_1_Core->refs.deref();
93 Q_ASSERT(d_2_1_Core->refs.loadRelaxed());
96 d_3_0_Core->refs.deref();
97 Q_ASSERT(d_3_0_Core->refs.loadRelaxed());
100 d_3_1_Core->refs.deref();
101 Q_ASSERT(d_3_1_Core->refs.loadRelaxed());
104 d_3_2_Core->refs.deref();
105 Q_ASSERT(d_3_2_Core->refs.loadRelaxed());
108 d_3_3_Core->refs.deref();
109 Q_ASSERT(d_3_3_Core->refs.loadRelaxed());
112 d_4_0_Core->refs.deref();
113 Q_ASSERT(d_4_0_Core->refs.loadRelaxed());
116 d_4_1_Core->refs.deref();
117 Q_ASSERT(d_4_1_Core->refs.loadRelaxed());
120 d_4_2_Core->refs.deref();
121 Q_ASSERT(d_4_2_Core->refs.loadRelaxed());
124 d_4_3_Core->refs.deref();
125 Q_ASSERT(d_4_3_Core->refs.loadRelaxed());
128 d_4_4_Core->refs.deref();
129 Q_ASSERT(d_4_4_Core->refs.loadRelaxed());
131 if (d_1_0_Deprecated) {
132 d_1_0_Deprecated->refs.deref();
133 Q_ASSERT(d_1_0_Deprecated->refs.loadRelaxed());
135 if (d_1_1_Deprecated) {
136 d_1_1_Deprecated->refs.deref();
137 Q_ASSERT(d_1_1_Deprecated->refs.loadRelaxed());
139 if (d_1_2_Deprecated) {
140 d_1_2_Deprecated->refs.deref();
141 Q_ASSERT(d_1_2_Deprecated->refs.loadRelaxed());
143 if (d_1_3_Deprecated) {
144 d_1_3_Deprecated->refs.deref();
145 Q_ASSERT(d_1_3_Deprecated->refs.loadRelaxed());
147 if (d_1_4_Deprecated) {
148 d_1_4_Deprecated->refs.deref();
149 Q_ASSERT(d_1_4_Deprecated->refs.loadRelaxed());
151 if (d_3_3_Deprecated) {
152 d_3_3_Deprecated->refs.deref();
153 Q_ASSERT(d_3_3_Deprecated->refs.loadRelaxed());
157bool QOpenGLFunctions_4_4_Compatibility::initializeOpenGLFunctions()
159 if ( isInitialized() )
162 QOpenGLContext* context = QOpenGLContext::currentContext();
166 if (((owningContext() && owningContext() == context) || !owningContext())
167 && QOpenGLFunctions_4_4_Compatibility::isContextCompatible(context))
171 QOpenGLVersionFunctionsBackend* d =
nullptr;
172 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
173 d_1_0_Core =
static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
176 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
177 d_1_1_Core =
static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d);
180 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
181 d_1_2_Core =
static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d);
184 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
185 d_1_3_Core =
static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d);
188 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
189 d_1_4_Core =
static_cast<QOpenGLFunctions_1_4_CoreBackend*>(d);
192 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
193 d_1_5_Core =
static_cast<QOpenGLFunctions_1_5_CoreBackend*>(d);
196 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
197 d_2_0_Core =
static_cast<QOpenGLFunctions_2_0_CoreBackend*>(d);
200 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
201 d_2_1_Core =
static_cast<QOpenGLFunctions_2_1_CoreBackend*>(d);
204 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
205 d_3_0_Core =
static_cast<QOpenGLFunctions_3_0_CoreBackend*>(d);
208 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());
209 d_3_1_Core =
static_cast<QOpenGLFunctions_3_1_CoreBackend*>(d);
212 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus());
213 d_3_2_Core =
static_cast<QOpenGLFunctions_3_2_CoreBackend*>(d);
216 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus());
217 d_3_3_Core =
static_cast<QOpenGLFunctions_3_3_CoreBackend*>(d);
220 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_0_CoreBackend::versionStatus());
221 d_4_0_Core =
static_cast<QOpenGLFunctions_4_0_CoreBackend*>(d);
224 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_1_CoreBackend::versionStatus());
225 d_4_1_Core =
static_cast<QOpenGLFunctions_4_1_CoreBackend*>(d);
228 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_2_CoreBackend::versionStatus());
229 d_4_2_Core =
static_cast<QOpenGLFunctions_4_2_CoreBackend*>(d);
232 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_3_CoreBackend::versionStatus());
233 d_4_3_Core =
static_cast<QOpenGLFunctions_4_3_CoreBackend*>(d);
236 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_4_CoreBackend::versionStatus());
237 d_4_4_Core =
static_cast<QOpenGLFunctions_4_4_CoreBackend*>(d);
240 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());
241 d_1_0_Deprecated =
static_cast<QOpenGLFunctions_1_0_DeprecatedBackend*>(d);
244 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());
245 d_1_1_Deprecated =
static_cast<QOpenGLFunctions_1_1_DeprecatedBackend*>(d);
248 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus());
249 d_1_2_Deprecated =
static_cast<QOpenGLFunctions_1_2_DeprecatedBackend*>(d);
252 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus());
253 d_1_3_Deprecated =
static_cast<QOpenGLFunctions_1_3_DeprecatedBackend*>(d);
256 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus());
257 d_1_4_Deprecated =
static_cast<QOpenGLFunctions_1_4_DeprecatedBackend*>(d);
260 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_DeprecatedBackend::versionStatus());
261 d_3_3_Deprecated =
static_cast<QOpenGLFunctions_3_3_DeprecatedBackend*>(d);
264 QAbstractOpenGLFunctions::initializeOpenGLFunctions();
266 return isInitialized();