48QOpenGLFunctions_1_4::~QOpenGLFunctions_1_4()
51 d_1_0_Core->refs.deref();
52 Q_ASSERT(d_1_0_Core->refs.loadRelaxed());
55 d_1_1_Core->refs.deref();
56 Q_ASSERT(d_1_1_Core->refs.loadRelaxed());
59 d_1_2_Core->refs.deref();
60 Q_ASSERT(d_1_2_Core->refs.loadRelaxed());
63 d_1_3_Core->refs.deref();
64 Q_ASSERT(d_1_3_Core->refs.loadRelaxed());
67 d_1_4_Core->refs.deref();
68 Q_ASSERT(d_1_4_Core->refs.loadRelaxed());
70 if (d_1_0_Deprecated) {
71 d_1_0_Deprecated->refs.deref();
72 Q_ASSERT(d_1_0_Deprecated->refs.loadRelaxed());
74 if (d_1_1_Deprecated) {
75 d_1_1_Deprecated->refs.deref();
76 Q_ASSERT(d_1_1_Deprecated->refs.loadRelaxed());
78 if (d_1_2_Deprecated) {
79 d_1_2_Deprecated->refs.deref();
80 Q_ASSERT(d_1_2_Deprecated->refs.loadRelaxed());
82 if (d_1_3_Deprecated) {
83 d_1_3_Deprecated->refs.deref();
84 Q_ASSERT(d_1_3_Deprecated->refs.loadRelaxed());
86 if (d_1_4_Deprecated) {
87 d_1_4_Deprecated->refs.deref();
88 Q_ASSERT(d_1_4_Deprecated->refs.loadRelaxed());
92bool QOpenGLFunctions_1_4::initializeOpenGLFunctions()
94 if ( isInitialized() )
97 QOpenGLContext* context = QOpenGLContext::currentContext();
101 if (((owningContext() && owningContext() == context) || !owningContext())
102 && QOpenGLFunctions_1_4::isContextCompatible(context))
106 QOpenGLVersionFunctionsBackend* d =
nullptr;
107 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
108 d_1_0_Core =
static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
111 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
112 d_1_1_Core =
static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d);
115 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
116 d_1_2_Core =
static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d);
119 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
120 d_1_3_Core =
static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d);
123 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
124 d_1_4_Core =
static_cast<QOpenGLFunctions_1_4_CoreBackend*>(d);
127 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());
128 d_1_0_Deprecated =
static_cast<QOpenGLFunctions_1_0_DeprecatedBackend*>(d);
131 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());
132 d_1_1_Deprecated =
static_cast<QOpenGLFunctions_1_1_DeprecatedBackend*>(d);
135 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus());
136 d_1_2_Deprecated =
static_cast<QOpenGLFunctions_1_2_DeprecatedBackend*>(d);
139 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus());
140 d_1_3_Deprecated =
static_cast<QOpenGLFunctions_1_3_DeprecatedBackend*>(d);
143 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus());
144 d_1_4_Deprecated =
static_cast<QOpenGLFunctions_1_4_DeprecatedBackend*>(d);
147 QAbstractOpenGLFunctions::initializeOpenGLFunctions();
149 return isInitialized();