42QOpenGLFunctions_1_1::~QOpenGLFunctions_1_1()
45 d_1_0_Core->refs.deref();
46 Q_ASSERT(d_1_0_Core->refs.loadRelaxed());
49 d_1_1_Core->refs.deref();
50 Q_ASSERT(d_1_1_Core->refs.loadRelaxed());
52 if (d_1_0_Deprecated) {
53 d_1_0_Deprecated->refs.deref();
54 Q_ASSERT(d_1_0_Deprecated->refs.loadRelaxed());
56 if (d_1_1_Deprecated) {
57 d_1_1_Deprecated->refs.deref();
58 Q_ASSERT(d_1_1_Deprecated->refs.loadRelaxed());
62bool QOpenGLFunctions_1_1::initializeOpenGLFunctions()
64 if ( isInitialized() )
67 QOpenGLContext* context = QOpenGLContext::currentContext();
71 if (((owningContext() && owningContext() == context) || !owningContext())
72 && QOpenGLFunctions_1_1::isContextCompatible(context))
76 QOpenGLVersionFunctionsBackend* d =
nullptr;
77 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
78 d_1_0_Core =
static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
81 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
82 d_1_1_Core =
static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d);
85 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());
86 d_1_0_Deprecated =
static_cast<QOpenGLFunctions_1_0_DeprecatedBackend*>(d);
89 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());
90 d_1_1_Deprecated =
static_cast<QOpenGLFunctions_1_1_DeprecatedBackend*>(d);
93 QAbstractOpenGLFunctions::initializeOpenGLFunctions();
95 return isInitialized();