56QOpenGLFunctions_3_3_Compatibility::~QOpenGLFunctions_3_3_Compatibility()
59 d_1_0_Core->refs.deref();
60 Q_ASSERT(d_1_0_Core->refs.loadRelaxed());
63 d_1_1_Core->refs.deref();
64 Q_ASSERT(d_1_1_Core->refs.loadRelaxed());
67 d_1_2_Core->refs.deref();
68 Q_ASSERT(d_1_2_Core->refs.loadRelaxed());
71 d_1_3_Core->refs.deref();
72 Q_ASSERT(d_1_3_Core->refs.loadRelaxed());
75 d_1_4_Core->refs.deref();
76 Q_ASSERT(d_1_4_Core->refs.loadRelaxed());
79 d_1_5_Core->refs.deref();
80 Q_ASSERT(d_1_5_Core->refs.loadRelaxed());
83 d_2_0_Core->refs.deref();
84 Q_ASSERT(d_2_0_Core->refs.loadRelaxed());
87 d_2_1_Core->refs.deref();
88 Q_ASSERT(d_2_1_Core->refs.loadRelaxed());
91 d_3_0_Core->refs.deref();
92 Q_ASSERT(d_3_0_Core->refs.loadRelaxed());
95 d_3_1_Core->refs.deref();
96 Q_ASSERT(d_3_1_Core->refs.loadRelaxed());
99 d_3_2_Core->refs.deref();
100 Q_ASSERT(d_3_2_Core->refs.loadRelaxed());
103 d_3_3_Core->refs.deref();
104 Q_ASSERT(d_3_3_Core->refs.loadRelaxed());
106 if (d_1_0_Deprecated) {
107 d_1_0_Deprecated->refs.deref();
108 Q_ASSERT(d_1_0_Deprecated->refs.loadRelaxed());
110 if (d_1_1_Deprecated) {
111 d_1_1_Deprecated->refs.deref();
112 Q_ASSERT(d_1_1_Deprecated->refs.loadRelaxed());
114 if (d_1_2_Deprecated) {
115 d_1_2_Deprecated->refs.deref();
116 Q_ASSERT(d_1_2_Deprecated->refs.loadRelaxed());
118 if (d_1_3_Deprecated) {
119 d_1_3_Deprecated->refs.deref();
120 Q_ASSERT(d_1_3_Deprecated->refs.loadRelaxed());
122 if (d_1_4_Deprecated) {
123 d_1_4_Deprecated->refs.deref();
124 Q_ASSERT(d_1_4_Deprecated->refs.loadRelaxed());
126 if (d_3_3_Deprecated) {
127 d_3_3_Deprecated->refs.deref();
128 Q_ASSERT(d_3_3_Deprecated->refs.loadRelaxed());
132bool QOpenGLFunctions_3_3_Compatibility::initializeOpenGLFunctions()
134 if ( isInitialized() )
137 QOpenGLContext* context = QOpenGLContext::currentContext();
141 if (((owningContext() && owningContext() == context) || !owningContext())
142 && QOpenGLFunctions_3_3_Compatibility::isContextCompatible(context))
146 QOpenGLVersionFunctionsBackend* d =
nullptr;
147 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
148 d_1_0_Core =
static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
151 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
152 d_1_1_Core =
static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d);
155 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
156 d_1_2_Core =
static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d);
159 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
160 d_1_3_Core =
static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d);
163 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
164 d_1_4_Core =
static_cast<QOpenGLFunctions_1_4_CoreBackend*>(d);
167 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
168 d_1_5_Core =
static_cast<QOpenGLFunctions_1_5_CoreBackend*>(d);
171 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
172 d_2_0_Core =
static_cast<QOpenGLFunctions_2_0_CoreBackend*>(d);
175 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
176 d_2_1_Core =
static_cast<QOpenGLFunctions_2_1_CoreBackend*>(d);
179 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
180 d_3_0_Core =
static_cast<QOpenGLFunctions_3_0_CoreBackend*>(d);
183 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());
184 d_3_1_Core =
static_cast<QOpenGLFunctions_3_1_CoreBackend*>(d);
187 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus());
188 d_3_2_Core =
static_cast<QOpenGLFunctions_3_2_CoreBackend*>(d);
191 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus());
192 d_3_3_Core =
static_cast<QOpenGLFunctions_3_3_CoreBackend*>(d);
195 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());
196 d_1_0_Deprecated =
static_cast<QOpenGLFunctions_1_0_DeprecatedBackend*>(d);
199 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());
200 d_1_1_Deprecated =
static_cast<QOpenGLFunctions_1_1_DeprecatedBackend*>(d);
203 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus());
204 d_1_2_Deprecated =
static_cast<QOpenGLFunctions_1_2_DeprecatedBackend*>(d);
207 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus());
208 d_1_3_Deprecated =
static_cast<QOpenGLFunctions_1_3_DeprecatedBackend*>(d);
211 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus());
212 d_1_4_Deprecated =
static_cast<QOpenGLFunctions_1_4_DeprecatedBackend*>(d);
215 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_DeprecatedBackend::versionStatus());
216 d_3_3_Deprecated =
static_cast<QOpenGLFunctions_3_3_DeprecatedBackend*>(d);
219 QAbstractOpenGLFunctions::initializeOpenGLFunctions();
221 return isInitialized();