51QOpenGLFunctions_4_0_Core::~QOpenGLFunctions_4_0_Core()
54 d_1_0_Core->refs.deref();
55 Q_ASSERT(d_1_0_Core->refs.loadRelaxed());
58 d_1_1_Core->refs.deref();
59 Q_ASSERT(d_1_1_Core->refs.loadRelaxed());
62 d_1_2_Core->refs.deref();
63 Q_ASSERT(d_1_2_Core->refs.loadRelaxed());
66 d_1_3_Core->refs.deref();
67 Q_ASSERT(d_1_3_Core->refs.loadRelaxed());
70 d_1_4_Core->refs.deref();
71 Q_ASSERT(d_1_4_Core->refs.loadRelaxed());
74 d_1_5_Core->refs.deref();
75 Q_ASSERT(d_1_5_Core->refs.loadRelaxed());
78 d_2_0_Core->refs.deref();
79 Q_ASSERT(d_2_0_Core->refs.loadRelaxed());
82 d_2_1_Core->refs.deref();
83 Q_ASSERT(d_2_1_Core->refs.loadRelaxed());
86 d_3_0_Core->refs.deref();
87 Q_ASSERT(d_3_0_Core->refs.loadRelaxed());
90 d_3_1_Core->refs.deref();
91 Q_ASSERT(d_3_1_Core->refs.loadRelaxed());
94 d_3_2_Core->refs.deref();
95 Q_ASSERT(d_3_2_Core->refs.loadRelaxed());
98 d_3_3_Core->refs.deref();
99 Q_ASSERT(d_3_3_Core->refs.loadRelaxed());
102 d_4_0_Core->refs.deref();
103 Q_ASSERT(d_4_0_Core->refs.loadRelaxed());
107bool QOpenGLFunctions_4_0_Core::initializeOpenGLFunctions()
109 if ( isInitialized() )
112 QOpenGLContext* context = QOpenGLContext::currentContext();
116 if (((owningContext() && owningContext() == context) || !owningContext())
117 && QOpenGLFunctions_4_0_Core::isContextCompatible(context))
121 QOpenGLVersionFunctionsBackend* d =
nullptr;
122 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
123 d_1_0_Core =
static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
126 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
127 d_1_1_Core =
static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d);
130 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
131 d_1_2_Core =
static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d);
134 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
135 d_1_3_Core =
static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d);
138 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
139 d_1_4_Core =
static_cast<QOpenGLFunctions_1_4_CoreBackend*>(d);
142 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
143 d_1_5_Core =
static_cast<QOpenGLFunctions_1_5_CoreBackend*>(d);
146 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
147 d_2_0_Core =
static_cast<QOpenGLFunctions_2_0_CoreBackend*>(d);
150 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
151 d_2_1_Core =
static_cast<QOpenGLFunctions_2_1_CoreBackend*>(d);
154 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
155 d_3_0_Core =
static_cast<QOpenGLFunctions_3_0_CoreBackend*>(d);
158 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());
159 d_3_1_Core =
static_cast<QOpenGLFunctions_3_1_CoreBackend*>(d);
162 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus());
163 d_3_2_Core =
static_cast<QOpenGLFunctions_3_2_CoreBackend*>(d);
166 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus());
167 d_3_3_Core =
static_cast<QOpenGLFunctions_3_3_CoreBackend*>(d);
170 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_0_CoreBackend::versionStatus());
171 d_4_0_Core =
static_cast<QOpenGLFunctions_4_0_CoreBackend*>(d);
174 QAbstractOpenGLFunctions::initializeOpenGLFunctions();
176 return isInitialized();