54QOpenGLFunctions_3_2_Compatibility::~QOpenGLFunctions_3_2_Compatibility()
57 d_1_0_Core->refs.deref();
58 Q_ASSERT(d_1_0_Core->refs.loadRelaxed());
61 d_1_1_Core->refs.deref();
62 Q_ASSERT(d_1_1_Core->refs.loadRelaxed());
65 d_1_2_Core->refs.deref();
66 Q_ASSERT(d_1_2_Core->refs.loadRelaxed());
69 d_1_3_Core->refs.deref();
70 Q_ASSERT(d_1_3_Core->refs.loadRelaxed());
73 d_1_4_Core->refs.deref();
74 Q_ASSERT(d_1_4_Core->refs.loadRelaxed());
77 d_1_5_Core->refs.deref();
78 Q_ASSERT(d_1_5_Core->refs.loadRelaxed());
81 d_2_0_Core->refs.deref();
82 Q_ASSERT(d_2_0_Core->refs.loadRelaxed());
85 d_2_1_Core->refs.deref();
86 Q_ASSERT(d_2_1_Core->refs.loadRelaxed());
89 d_3_0_Core->refs.deref();
90 Q_ASSERT(d_3_0_Core->refs.loadRelaxed());
93 d_3_1_Core->refs.deref();
94 Q_ASSERT(d_3_1_Core->refs.loadRelaxed());
97 d_3_2_Core->refs.deref();
98 Q_ASSERT(d_3_2_Core->refs.loadRelaxed());
100 if (d_1_0_Deprecated) {
101 d_1_0_Deprecated->refs.deref();
102 Q_ASSERT(d_1_0_Deprecated->refs.loadRelaxed());
104 if (d_1_1_Deprecated) {
105 d_1_1_Deprecated->refs.deref();
106 Q_ASSERT(d_1_1_Deprecated->refs.loadRelaxed());
108 if (d_1_2_Deprecated) {
109 d_1_2_Deprecated->refs.deref();
110 Q_ASSERT(d_1_2_Deprecated->refs.loadRelaxed());
112 if (d_1_3_Deprecated) {
113 d_1_3_Deprecated->refs.deref();
114 Q_ASSERT(d_1_3_Deprecated->refs.loadRelaxed());
116 if (d_1_4_Deprecated) {
117 d_1_4_Deprecated->refs.deref();
118 Q_ASSERT(d_1_4_Deprecated->refs.loadRelaxed());
122bool QOpenGLFunctions_3_2_Compatibility::initializeOpenGLFunctions()
124 if ( isInitialized() )
127 QOpenGLContext* context = QOpenGLContext::currentContext();
131 if (((owningContext() && owningContext() == context) || !owningContext())
132 && QOpenGLFunctions_3_2_Compatibility::isContextCompatible(context))
136 QOpenGLVersionFunctionsBackend* d =
nullptr;
137 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
138 d_1_0_Core =
static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
141 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
142 d_1_1_Core =
static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d);
145 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
146 d_1_2_Core =
static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d);
149 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
150 d_1_3_Core =
static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d);
153 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
154 d_1_4_Core =
static_cast<QOpenGLFunctions_1_4_CoreBackend*>(d);
157 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
158 d_1_5_Core =
static_cast<QOpenGLFunctions_1_5_CoreBackend*>(d);
161 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
162 d_2_0_Core =
static_cast<QOpenGLFunctions_2_0_CoreBackend*>(d);
165 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
166 d_2_1_Core =
static_cast<QOpenGLFunctions_2_1_CoreBackend*>(d);
169 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
170 d_3_0_Core =
static_cast<QOpenGLFunctions_3_0_CoreBackend*>(d);
173 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());
174 d_3_1_Core =
static_cast<QOpenGLFunctions_3_1_CoreBackend*>(d);
177 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus());
178 d_3_2_Core =
static_cast<QOpenGLFunctions_3_2_CoreBackend*>(d);
181 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());
182 d_1_0_Deprecated =
static_cast<QOpenGLFunctions_1_0_DeprecatedBackend*>(d);
185 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());
186 d_1_1_Deprecated =
static_cast<QOpenGLFunctions_1_1_DeprecatedBackend*>(d);
189 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus());
190 d_1_2_Deprecated =
static_cast<QOpenGLFunctions_1_2_DeprecatedBackend*>(d);
193 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus());
194 d_1_3_Deprecated =
static_cast<QOpenGLFunctions_1_3_DeprecatedBackend*>(d);
197 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus());
198 d_1_4_Deprecated =
static_cast<QOpenGLFunctions_1_4_DeprecatedBackend*>(d);
201 QAbstractOpenGLFunctions::initializeOpenGLFunctions();
203 return isInitialized();