52QOpenGLFunctions_4_1_Core::~QOpenGLFunctions_4_1_Core()
55 d_1_0_Core->refs.deref();
56 Q_ASSERT(d_1_0_Core->refs.loadRelaxed());
59 d_1_1_Core->refs.deref();
60 Q_ASSERT(d_1_1_Core->refs.loadRelaxed());
63 d_1_2_Core->refs.deref();
64 Q_ASSERT(d_1_2_Core->refs.loadRelaxed());
67 d_1_3_Core->refs.deref();
68 Q_ASSERT(d_1_3_Core->refs.loadRelaxed());
71 d_1_4_Core->refs.deref();
72 Q_ASSERT(d_1_4_Core->refs.loadRelaxed());
75 d_1_5_Core->refs.deref();
76 Q_ASSERT(d_1_5_Core->refs.loadRelaxed());
79 d_2_0_Core->refs.deref();
80 Q_ASSERT(d_2_0_Core->refs.loadRelaxed());
83 d_2_1_Core->refs.deref();
84 Q_ASSERT(d_2_1_Core->refs.loadRelaxed());
87 d_3_0_Core->refs.deref();
88 Q_ASSERT(d_3_0_Core->refs.loadRelaxed());
91 d_3_1_Core->refs.deref();
92 Q_ASSERT(d_3_1_Core->refs.loadRelaxed());
95 d_3_2_Core->refs.deref();
96 Q_ASSERT(d_3_2_Core->refs.loadRelaxed());
99 d_3_3_Core->refs.deref();
100 Q_ASSERT(d_3_3_Core->refs.loadRelaxed());
103 d_4_0_Core->refs.deref();
104 Q_ASSERT(d_4_0_Core->refs.loadRelaxed());
107 d_4_1_Core->refs.deref();
108 Q_ASSERT(d_4_1_Core->refs.loadRelaxed());
112bool QOpenGLFunctions_4_1_Core::initializeOpenGLFunctions()
114 if ( isInitialized() )
117 QOpenGLContext* context = QOpenGLContext::currentContext();
121 if (((owningContext() && owningContext() == context) || !owningContext())
122 && QOpenGLFunctions_4_1_Core::isContextCompatible(context))
126 QOpenGLVersionFunctionsBackend* d =
nullptr;
127 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
128 d_1_0_Core =
static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
131 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
132 d_1_1_Core =
static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d);
135 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
136 d_1_2_Core =
static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d);
139 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
140 d_1_3_Core =
static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d);
143 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
144 d_1_4_Core =
static_cast<QOpenGLFunctions_1_4_CoreBackend*>(d);
147 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
148 d_1_5_Core =
static_cast<QOpenGLFunctions_1_5_CoreBackend*>(d);
151 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
152 d_2_0_Core =
static_cast<QOpenGLFunctions_2_0_CoreBackend*>(d);
155 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
156 d_2_1_Core =
static_cast<QOpenGLFunctions_2_1_CoreBackend*>(d);
159 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
160 d_3_0_Core =
static_cast<QOpenGLFunctions_3_0_CoreBackend*>(d);
163 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());
164 d_3_1_Core =
static_cast<QOpenGLFunctions_3_1_CoreBackend*>(d);
167 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus());
168 d_3_2_Core =
static_cast<QOpenGLFunctions_3_2_CoreBackend*>(d);
171 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus());
172 d_3_3_Core =
static_cast<QOpenGLFunctions_3_3_CoreBackend*>(d);
175 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_0_CoreBackend::versionStatus());
176 d_4_0_Core =
static_cast<QOpenGLFunctions_4_0_CoreBackend*>(d);
179 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_1_CoreBackend::versionStatus());
180 d_4_1_Core =
static_cast<QOpenGLFunctions_4_1_CoreBackend*>(d);
183 QAbstractOpenGLFunctions::initializeOpenGLFunctions();
185 return isInitialized();