44QOpenGLFunctions_1_2::~QOpenGLFunctions_1_2()
47 d_1_0_Core->refs.deref();
48 Q_ASSERT(d_1_0_Core->refs.loadRelaxed());
51 d_1_1_Core->refs.deref();
52 Q_ASSERT(d_1_1_Core->refs.loadRelaxed());
55 d_1_2_Core->refs.deref();
56 Q_ASSERT(d_1_2_Core->refs.loadRelaxed());
58 if (d_1_0_Deprecated) {
59 d_1_0_Deprecated->refs.deref();
60 Q_ASSERT(d_1_0_Deprecated->refs.loadRelaxed());
62 if (d_1_1_Deprecated) {
63 d_1_1_Deprecated->refs.deref();
64 Q_ASSERT(d_1_1_Deprecated->refs.loadRelaxed());
66 if (d_1_2_Deprecated) {
67 d_1_2_Deprecated->refs.deref();
68 Q_ASSERT(d_1_2_Deprecated->refs.loadRelaxed());
72bool QOpenGLFunctions_1_2::initializeOpenGLFunctions()
74 if ( isInitialized() )
77 QOpenGLContext* context = QOpenGLContext::currentContext();
81 if (((owningContext() && owningContext() == context) || !owningContext())
82 && QOpenGLFunctions_1_2::isContextCompatible(context))
86 QOpenGLVersionFunctionsBackend* d =
nullptr;
87 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
88 d_1_0_Core =
static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
91 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
92 d_1_1_Core =
static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d);
95 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
96 d_1_2_Core =
static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d);
99 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());
100 d_1_0_Deprecated =
static_cast<QOpenGLFunctions_1_0_DeprecatedBackend*>(d);
103 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());
104 d_1_1_Deprecated =
static_cast<QOpenGLFunctions_1_1_DeprecatedBackend*>(d);
107 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus());
108 d_1_2_Deprecated =
static_cast<QOpenGLFunctions_1_2_DeprecatedBackend*>(d);
111 QAbstractOpenGLFunctions::initializeOpenGLFunctions();
113 return isInitialized();