49QOpenGLFunctions_1_5::~QOpenGLFunctions_1_5()
52 d_1_0_Core->refs.deref();
53 Q_ASSERT(d_1_0_Core->refs.loadRelaxed());
56 d_1_1_Core->refs.deref();
57 Q_ASSERT(d_1_1_Core->refs.loadRelaxed());
60 d_1_2_Core->refs.deref();
61 Q_ASSERT(d_1_2_Core->refs.loadRelaxed());
64 d_1_3_Core->refs.deref();
65 Q_ASSERT(d_1_3_Core->refs.loadRelaxed());
68 d_1_4_Core->refs.deref();
69 Q_ASSERT(d_1_4_Core->refs.loadRelaxed());
72 d_1_5_Core->refs.deref();
73 Q_ASSERT(d_1_5_Core->refs.loadRelaxed());
75 if (d_1_0_Deprecated) {
76 d_1_0_Deprecated->refs.deref();
77 Q_ASSERT(d_1_0_Deprecated->refs.loadRelaxed());
79 if (d_1_1_Deprecated) {
80 d_1_1_Deprecated->refs.deref();
81 Q_ASSERT(d_1_1_Deprecated->refs.loadRelaxed());
83 if (d_1_2_Deprecated) {
84 d_1_2_Deprecated->refs.deref();
85 Q_ASSERT(d_1_2_Deprecated->refs.loadRelaxed());
87 if (d_1_3_Deprecated) {
88 d_1_3_Deprecated->refs.deref();
89 Q_ASSERT(d_1_3_Deprecated->refs.loadRelaxed());
91 if (d_1_4_Deprecated) {
92 d_1_4_Deprecated->refs.deref();
93 Q_ASSERT(d_1_4_Deprecated->refs.loadRelaxed());
97bool QOpenGLFunctions_1_5::initializeOpenGLFunctions()
99 if ( isInitialized() )
102 QOpenGLContext* context = QOpenGLContext::currentContext();
106 if (((owningContext() && owningContext() == context) || !owningContext())
107 && QOpenGLFunctions_1_5::isContextCompatible(context))
111 QOpenGLVersionFunctionsBackend* d =
nullptr;
112 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
113 d_1_0_Core =
static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
116 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
117 d_1_1_Core =
static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d);
120 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
121 d_1_2_Core =
static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d);
124 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
125 d_1_3_Core =
static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d);
128 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
129 d_1_4_Core =
static_cast<QOpenGLFunctions_1_4_CoreBackend*>(d);
132 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
133 d_1_5_Core =
static_cast<QOpenGLFunctions_1_5_CoreBackend*>(d);
136 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());
137 d_1_0_Deprecated =
static_cast<QOpenGLFunctions_1_0_DeprecatedBackend*>(d);
140 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());
141 d_1_1_Deprecated =
static_cast<QOpenGLFunctions_1_1_DeprecatedBackend*>(d);
144 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus());
145 d_1_2_Deprecated =
static_cast<QOpenGLFunctions_1_2_DeprecatedBackend*>(d);
148 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus());
149 d_1_3_Deprecated =
static_cast<QOpenGLFunctions_1_3_DeprecatedBackend*>(d);
152 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus());
153 d_1_4_Deprecated =
static_cast<QOpenGLFunctions_1_4_DeprecatedBackend*>(d);
156 QAbstractOpenGLFunctions::initializeOpenGLFunctions();
158 return isInitialized();