46QOpenGLFunctions_1_3::~QOpenGLFunctions_1_3()
49 d_1_0_Core->refs.deref();
50 Q_ASSERT(d_1_0_Core->refs.loadRelaxed());
53 d_1_1_Core->refs.deref();
54 Q_ASSERT(d_1_1_Core->refs.loadRelaxed());
57 d_1_2_Core->refs.deref();
58 Q_ASSERT(d_1_2_Core->refs.loadRelaxed());
61 d_1_3_Core->refs.deref();
62 Q_ASSERT(d_1_3_Core->refs.loadRelaxed());
64 if (d_1_0_Deprecated) {
65 d_1_0_Deprecated->refs.deref();
66 Q_ASSERT(d_1_0_Deprecated->refs.loadRelaxed());
68 if (d_1_1_Deprecated) {
69 d_1_1_Deprecated->refs.deref();
70 Q_ASSERT(d_1_1_Deprecated->refs.loadRelaxed());
72 if (d_1_2_Deprecated) {
73 d_1_2_Deprecated->refs.deref();
74 Q_ASSERT(d_1_2_Deprecated->refs.loadRelaxed());
76 if (d_1_3_Deprecated) {
77 d_1_3_Deprecated->refs.deref();
78 Q_ASSERT(d_1_3_Deprecated->refs.loadRelaxed());
82bool QOpenGLFunctions_1_3::initializeOpenGLFunctions()
84 if ( isInitialized() )
87 QOpenGLContext* context = QOpenGLContext::currentContext();
91 if (((owningContext() && owningContext() == context) || !owningContext())
92 && QOpenGLFunctions_1_3::isContextCompatible(context))
96 QOpenGLVersionFunctionsBackend* d =
nullptr;
97 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
98 d_1_0_Core =
static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
101 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
102 d_1_1_Core =
static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d);
105 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
106 d_1_2_Core =
static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d);
109 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
110 d_1_3_Core =
static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d);
113 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());
114 d_1_0_Deprecated =
static_cast<QOpenGLFunctions_1_0_DeprecatedBackend*>(d);
117 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());
118 d_1_1_Deprecated =
static_cast<QOpenGLFunctions_1_1_DeprecatedBackend*>(d);
121 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus());
122 d_1_2_Deprecated =
static_cast<QOpenGLFunctions_1_2_DeprecatedBackend*>(d);
125 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus());
126 d_1_3_Deprecated =
static_cast<QOpenGLFunctions_1_3_DeprecatedBackend*>(d);
129 QAbstractOpenGLFunctions::initializeOpenGLFunctions();
131 return isInitialized();