60QOpenGLFunctions_4_3_Compatibility::~QOpenGLFunctions_4_3_Compatibility()
63 d_1_0_Core->refs.deref();
64 Q_ASSERT(d_1_0_Core->refs.loadRelaxed());
67 d_1_1_Core->refs.deref();
68 Q_ASSERT(d_1_1_Core->refs.loadRelaxed());
71 d_1_2_Core->refs.deref();
72 Q_ASSERT(d_1_2_Core->refs.loadRelaxed());
75 d_1_3_Core->refs.deref();
76 Q_ASSERT(d_1_3_Core->refs.loadRelaxed());
79 d_1_4_Core->refs.deref();
80 Q_ASSERT(d_1_4_Core->refs.loadRelaxed());
83 d_1_5_Core->refs.deref();
84 Q_ASSERT(d_1_5_Core->refs.loadRelaxed());
87 d_2_0_Core->refs.deref();
88 Q_ASSERT(d_2_0_Core->refs.loadRelaxed());
91 d_2_1_Core->refs.deref();
92 Q_ASSERT(d_2_1_Core->refs.loadRelaxed());
95 d_3_0_Core->refs.deref();
96 Q_ASSERT(d_3_0_Core->refs.loadRelaxed());
99 d_3_1_Core->refs.deref();
100 Q_ASSERT(d_3_1_Core->refs.loadRelaxed());
103 d_3_2_Core->refs.deref();
104 Q_ASSERT(d_3_2_Core->refs.loadRelaxed());
107 d_3_3_Core->refs.deref();
108 Q_ASSERT(d_3_3_Core->refs.loadRelaxed());
111 d_4_0_Core->refs.deref();
112 Q_ASSERT(d_4_0_Core->refs.loadRelaxed());
115 d_4_1_Core->refs.deref();
116 Q_ASSERT(d_4_1_Core->refs.loadRelaxed());
119 d_4_2_Core->refs.deref();
120 Q_ASSERT(d_4_2_Core->refs.loadRelaxed());
123 d_4_3_Core->refs.deref();
124 Q_ASSERT(d_4_3_Core->refs.loadRelaxed());
126 if (d_1_0_Deprecated) {
127 d_1_0_Deprecated->refs.deref();
128 Q_ASSERT(d_1_0_Deprecated->refs.loadRelaxed());
130 if (d_1_1_Deprecated) {
131 d_1_1_Deprecated->refs.deref();
132 Q_ASSERT(d_1_1_Deprecated->refs.loadRelaxed());
134 if (d_1_2_Deprecated) {
135 d_1_2_Deprecated->refs.deref();
136 Q_ASSERT(d_1_2_Deprecated->refs.loadRelaxed());
138 if (d_1_3_Deprecated) {
139 d_1_3_Deprecated->refs.deref();
140 Q_ASSERT(d_1_3_Deprecated->refs.loadRelaxed());
142 if (d_1_4_Deprecated) {
143 d_1_4_Deprecated->refs.deref();
144 Q_ASSERT(d_1_4_Deprecated->refs.loadRelaxed());
146 if (d_3_3_Deprecated) {
147 d_3_3_Deprecated->refs.deref();
148 Q_ASSERT(d_3_3_Deprecated->refs.loadRelaxed());
152bool QOpenGLFunctions_4_3_Compatibility::initializeOpenGLFunctions()
154 if ( isInitialized() )
157 QOpenGLContext* context = QOpenGLContext::currentContext();
161 if (((owningContext() && owningContext() == context) || !owningContext())
162 && QOpenGLFunctions_4_3_Compatibility::isContextCompatible(context))
166 QOpenGLVersionFunctionsBackend* d =
nullptr;
167 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
168 d_1_0_Core =
static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
171 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
172 d_1_1_Core =
static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d);
175 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
176 d_1_2_Core =
static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d);
179 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
180 d_1_3_Core =
static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d);
183 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
184 d_1_4_Core =
static_cast<QOpenGLFunctions_1_4_CoreBackend*>(d);
187 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
188 d_1_5_Core =
static_cast<QOpenGLFunctions_1_5_CoreBackend*>(d);
191 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
192 d_2_0_Core =
static_cast<QOpenGLFunctions_2_0_CoreBackend*>(d);
195 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
196 d_2_1_Core =
static_cast<QOpenGLFunctions_2_1_CoreBackend*>(d);
199 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
200 d_3_0_Core =
static_cast<QOpenGLFunctions_3_0_CoreBackend*>(d);
203 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());
204 d_3_1_Core =
static_cast<QOpenGLFunctions_3_1_CoreBackend*>(d);
207 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus());
208 d_3_2_Core =
static_cast<QOpenGLFunctions_3_2_CoreBackend*>(d);
211 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus());
212 d_3_3_Core =
static_cast<QOpenGLFunctions_3_3_CoreBackend*>(d);
215 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_0_CoreBackend::versionStatus());
216 d_4_0_Core =
static_cast<QOpenGLFunctions_4_0_CoreBackend*>(d);
219 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_1_CoreBackend::versionStatus());
220 d_4_1_Core =
static_cast<QOpenGLFunctions_4_1_CoreBackend*>(d);
223 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_2_CoreBackend::versionStatus());
224 d_4_2_Core =
static_cast<QOpenGLFunctions_4_2_CoreBackend*>(d);
227 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_3_CoreBackend::versionStatus());
228 d_4_3_Core =
static_cast<QOpenGLFunctions_4_3_CoreBackend*>(d);
231 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());
232 d_1_0_Deprecated =
static_cast<QOpenGLFunctions_1_0_DeprecatedBackend*>(d);
235 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());
236 d_1_1_Deprecated =
static_cast<QOpenGLFunctions_1_1_DeprecatedBackend*>(d);
239 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus());
240 d_1_2_Deprecated =
static_cast<QOpenGLFunctions_1_2_DeprecatedBackend*>(d);
243 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus());
244 d_1_3_Deprecated =
static_cast<QOpenGLFunctions_1_3_DeprecatedBackend*>(d);
247 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus());
248 d_1_4_Deprecated =
static_cast<QOpenGLFunctions_1_4_DeprecatedBackend*>(d);
251 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_DeprecatedBackend::versionStatus());
252 d_3_3_Deprecated =
static_cast<QOpenGLFunctions_3_3_DeprecatedBackend*>(d);
255 QAbstractOpenGLFunctions::initializeOpenGLFunctions();
257 return isInitialized();