50QOpenGLFunctions_3_3_Core::~QOpenGLFunctions_3_3_Core()
53 d_1_0_Core->refs.deref();
54 Q_ASSERT(d_1_0_Core->refs.loadRelaxed());
57 d_1_1_Core->refs.deref();
58 Q_ASSERT(d_1_1_Core->refs.loadRelaxed());
61 d_1_2_Core->refs.deref();
62 Q_ASSERT(d_1_2_Core->refs.loadRelaxed());
65 d_1_3_Core->refs.deref();
66 Q_ASSERT(d_1_3_Core->refs.loadRelaxed());
69 d_1_4_Core->refs.deref();
70 Q_ASSERT(d_1_4_Core->refs.loadRelaxed());
73 d_1_5_Core->refs.deref();
74 Q_ASSERT(d_1_5_Core->refs.loadRelaxed());
77 d_2_0_Core->refs.deref();
78 Q_ASSERT(d_2_0_Core->refs.loadRelaxed());
81 d_2_1_Core->refs.deref();
82 Q_ASSERT(d_2_1_Core->refs.loadRelaxed());
85 d_3_0_Core->refs.deref();
86 Q_ASSERT(d_3_0_Core->refs.loadRelaxed());
89 d_3_1_Core->refs.deref();
90 Q_ASSERT(d_3_1_Core->refs.loadRelaxed());
93 d_3_2_Core->refs.deref();
94 Q_ASSERT(d_3_2_Core->refs.loadRelaxed());
97 d_3_3_Core->refs.deref();
98 Q_ASSERT(d_3_3_Core->refs.loadRelaxed());
102bool QOpenGLFunctions_3_3_Core::initializeOpenGLFunctions()
104 if ( isInitialized() )
107 QOpenGLContext* context = QOpenGLContext::currentContext();
111 if (((owningContext() && owningContext() == context) || !owningContext())
112 && QOpenGLFunctions_3_3_Core::isContextCompatible(context))
116 QOpenGLVersionFunctionsBackend* d =
nullptr;
117 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
118 d_1_0_Core =
static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
121 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
122 d_1_1_Core =
static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d);
125 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
126 d_1_2_Core =
static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d);
129 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
130 d_1_3_Core =
static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d);
133 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
134 d_1_4_Core =
static_cast<QOpenGLFunctions_1_4_CoreBackend*>(d);
137 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
138 d_1_5_Core =
static_cast<QOpenGLFunctions_1_5_CoreBackend*>(d);
141 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
142 d_2_0_Core =
static_cast<QOpenGLFunctions_2_0_CoreBackend*>(d);
145 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
146 d_2_1_Core =
static_cast<QOpenGLFunctions_2_1_CoreBackend*>(d);
149 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
150 d_3_0_Core =
static_cast<QOpenGLFunctions_3_0_CoreBackend*>(d);
153 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());
154 d_3_1_Core =
static_cast<QOpenGLFunctions_3_1_CoreBackend*>(d);
157 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus());
158 d_3_2_Core =
static_cast<QOpenGLFunctions_3_2_CoreBackend*>(d);
161 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus());
162 d_3_3_Core =
static_cast<QOpenGLFunctions_3_3_CoreBackend*>(d);
165 QAbstractOpenGLFunctions::initializeOpenGLFunctions();
167 return isInitialized();