45QOpenGLFunctions_1_2::~QOpenGLFunctions_1_2()
48 d_1_0_Core->refs.deref();
49 Q_ASSERT(d_1_0_Core->refs.loadRelaxed());
52 d_1_1_Core->refs.deref();
53 Q_ASSERT(d_1_1_Core->refs.loadRelaxed());
56 d_1_2_Core->refs.deref();
57 Q_ASSERT(d_1_2_Core->refs.loadRelaxed());
59 if (d_1_0_Deprecated) {
60 d_1_0_Deprecated->refs.deref();
61 Q_ASSERT(d_1_0_Deprecated->refs.loadRelaxed());
63 if (d_1_1_Deprecated) {
64 d_1_1_Deprecated->refs.deref();
65 Q_ASSERT(d_1_1_Deprecated->refs.loadRelaxed());
67 if (d_1_2_Deprecated) {
68 d_1_2_Deprecated->refs.deref();
69 Q_ASSERT(d_1_2_Deprecated->refs.loadRelaxed());
73bool QOpenGLFunctions_1_2::initializeOpenGLFunctions()
75 if ( isInitialized() )
78 QOpenGLContext* context = QOpenGLContext::currentContext();
82 if (((owningContext() && owningContext() == context) || !owningContext())
83 && QOpenGLFunctions_1_2::isContextCompatible(context))
87 QOpenGLVersionFunctionsBackend* d =
nullptr;
88 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
89 d_1_0_Core =
static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
92 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
93 d_1_1_Core =
static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d);
96 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
97 d_1_2_Core =
static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d);
100 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());
101 d_1_0_Deprecated =
static_cast<QOpenGLFunctions_1_0_DeprecatedBackend*>(d);
104 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());
105 d_1_1_Deprecated =
static_cast<QOpenGLFunctions_1_1_DeprecatedBackend*>(d);
108 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus());
109 d_1_2_Deprecated =
static_cast<QOpenGLFunctions_1_2_DeprecatedBackend*>(d);
112 QAbstractOpenGLFunctions::initializeOpenGLFunctions();
114 return isInitialized();