43QOpenGLFunctions_1_1::~QOpenGLFunctions_1_1()
46 d_1_0_Core->refs.deref();
47 Q_ASSERT(d_1_0_Core->refs.loadRelaxed());
50 d_1_1_Core->refs.deref();
51 Q_ASSERT(d_1_1_Core->refs.loadRelaxed());
53 if (d_1_0_Deprecated) {
54 d_1_0_Deprecated->refs.deref();
55 Q_ASSERT(d_1_0_Deprecated->refs.loadRelaxed());
57 if (d_1_1_Deprecated) {
58 d_1_1_Deprecated->refs.deref();
59 Q_ASSERT(d_1_1_Deprecated->refs.loadRelaxed());
63bool QOpenGLFunctions_1_1::initializeOpenGLFunctions()
65 if ( isInitialized() )
68 QOpenGLContext* context = QOpenGLContext::currentContext();
72 if (((owningContext() && owningContext() == context) || !owningContext())
73 && QOpenGLFunctions_1_1::isContextCompatible(context))
77 QOpenGLVersionFunctionsBackend* d =
nullptr;
78 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
79 d_1_0_Core =
static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
82 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
83 d_1_1_Core =
static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d);
86 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());
87 d_1_0_Deprecated =
static_cast<QOpenGLFunctions_1_0_DeprecatedBackend*>(d);
90 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());
91 d_1_1_Deprecated =
static_cast<QOpenGLFunctions_1_1_DeprecatedBackend*>(d);
94 QAbstractOpenGLFunctions::initializeOpenGLFunctions();
96 return isInitialized();