47QOpenGLFunctions_1_3::~QOpenGLFunctions_1_3()
50 d_1_0_Core->refs.deref();
51 Q_ASSERT(d_1_0_Core->refs.loadRelaxed());
54 d_1_1_Core->refs.deref();
55 Q_ASSERT(d_1_1_Core->refs.loadRelaxed());
58 d_1_2_Core->refs.deref();
59 Q_ASSERT(d_1_2_Core->refs.loadRelaxed());
62 d_1_3_Core->refs.deref();
63 Q_ASSERT(d_1_3_Core->refs.loadRelaxed());
65 if (d_1_0_Deprecated) {
66 d_1_0_Deprecated->refs.deref();
67 Q_ASSERT(d_1_0_Deprecated->refs.loadRelaxed());
69 if (d_1_1_Deprecated) {
70 d_1_1_Deprecated->refs.deref();
71 Q_ASSERT(d_1_1_Deprecated->refs.loadRelaxed());
73 if (d_1_2_Deprecated) {
74 d_1_2_Deprecated->refs.deref();
75 Q_ASSERT(d_1_2_Deprecated->refs.loadRelaxed());
77 if (d_1_3_Deprecated) {
78 d_1_3_Deprecated->refs.deref();
79 Q_ASSERT(d_1_3_Deprecated->refs.loadRelaxed());
83bool QOpenGLFunctions_1_3::initializeOpenGLFunctions()
85 if ( isInitialized() )
88 QOpenGLContext* context = QOpenGLContext::currentContext();
92 if (((owningContext() && owningContext() == context) || !owningContext())
93 && QOpenGLFunctions_1_3::isContextCompatible(context))
97 QOpenGLVersionFunctionsBackend* d =
nullptr;
98 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
99 d_1_0_Core =
static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
102 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
103 d_1_1_Core =
static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d);
106 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
107 d_1_2_Core =
static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d);
110 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
111 d_1_3_Core =
static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d);
114 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());
115 d_1_0_Deprecated =
static_cast<QOpenGLFunctions_1_0_DeprecatedBackend*>(d);
118 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());
119 d_1_1_Deprecated =
static_cast<QOpenGLFunctions_1_1_DeprecatedBackend*>(d);
122 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus());
123 d_1_2_Deprecated =
static_cast<QOpenGLFunctions_1_2_DeprecatedBackend*>(d);
126 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus());
127 d_1_3_Deprecated =
static_cast<QOpenGLFunctions_1_3_DeprecatedBackend*>(d);
130 QAbstractOpenGLFunctions::initializeOpenGLFunctions();
132 return isInitialized();