Refactor initialization/caching code for versioned opengl functions

Saves around 80k in Qt Gui.

Change-Id: I3f7068ae699136d0edf46a49694ade7e1df3c91d
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
bb10
Lars Knoll 2016-02-03 12:42:52 +01:00 committed by Laszlo Agocs
parent 8f1fcb0142
commit 6b0a577bf8
31 changed files with 1217 additions and 3040 deletions

View File

@ -661,8 +661,6 @@ void QOpenGLContext::destroy()
d->externalVersionFunctions.clear();
qDeleteAll(d->versionFunctions);
d->versionFunctions.clear();
qDeleteAll(d->versionFunctionsBackend);
d->versionFunctionsBackend.clear();
delete d->textureFunctions;
d->textureFunctions = 0;
@ -1302,28 +1300,10 @@ QOpenGLContext *QOpenGLContext::globalShareContext()
/*!
\internal
*/
QOpenGLVersionFunctionsBackend *QOpenGLContext::functionsBackend(const QOpenGLVersionFunctionsBackend::Version v) const
QOpenGLVersionFunctionsStorage *QOpenGLContext::functionsBackendStorage() const
{
Q_D(const QOpenGLContext);
return d->versionFunctionsBackend.value(v, 0);
}
/*!
\internal
*/
void QOpenGLContext::insertFunctionsBackend(const QOpenGLVersionFunctionsBackend::Version v, QOpenGLVersionFunctionsBackend *backend)
{
Q_D(QOpenGLContext);
d->versionFunctionsBackend.insert(v, backend);
}
/*!
\internal
*/
void QOpenGLContext::removeFunctionsBackend(const QOpenGLVersionFunctionsBackend::Version v)
{
Q_D(QOpenGLContext);
d->versionFunctionsBackend.remove(v);
return &d->versionFunctionsStorage;
}
/*!

View File

@ -237,9 +237,7 @@ private:
void setQGLContextHandle(void *handle,void (*qGLContextDeleteFunction)(void *));
void deleteQGLContext();
QOpenGLVersionFunctionsBackend* functionsBackend(QOpenGLVersionFunctionsBackend::Version v) const;
void insertFunctionsBackend(const QOpenGLVersionFunctionsBackend::Version v, QOpenGLVersionFunctionsBackend *backend);
void removeFunctionsBackend(const QOpenGLVersionFunctionsBackend::Version v);
QOpenGLVersionFunctionsStorage* functionsBackendStorage() const;
void insertExternalFunctions(QAbstractOpenGLFunctions *f);
void removeExternalFunctions(QAbstractOpenGLFunctions *f);

View File

@ -222,7 +222,7 @@ public:
}
mutable QHash<QOpenGLVersionProfile, QAbstractOpenGLFunctions *> versionFunctions;
mutable QHash<QOpenGLVersionFunctionsBackend::Version, QOpenGLVersionFunctionsBackend *> versionFunctionsBackend;
mutable QOpenGLVersionFunctionsStorage versionFunctionsStorage;
mutable QSet<QAbstractOpenGLFunctions *> externalVersionFunctions;
void *qGLContextHandle;

View File

@ -74,14 +74,12 @@ QOpenGLFunctions_1_0::QOpenGLFunctions_1_0()
QOpenGLFunctions_1_0::~QOpenGLFunctions_1_0()
{
if (d_1_0_Core && !d_1_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Core->context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
delete d_1_0_Core;
}
if (d_1_0_Deprecated && !d_1_0_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Deprecated->context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());
delete d_1_0_Deprecated;
}
if (d_1_0_Core)
d_1_0_Core->refs.deref();
Q_ASSERT(d_1_0_Core->refs.load());
if (d_1_0_Deprecated)
d_1_0_Deprecated->refs.deref();
Q_ASSERT(d_1_0_Deprecated->refs.load());
}
bool QOpenGLFunctions_1_0::initializeOpenGLFunctions()
@ -100,18 +98,10 @@ bool QOpenGLFunctions_1_0::initializeOpenGLFunctions()
// Function pointers in the backends are resolved at creation time
QOpenGLVersionFunctionsBackend* d = 0;
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus(), d);
}
d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_0_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus(), d);
}
d_1_0_Deprecated = static_cast<QOpenGLFunctions_1_0_DeprecatedBackend*>(d);
d->refs.ref();

View File

@ -76,22 +76,18 @@ QOpenGLFunctions_1_1::QOpenGLFunctions_1_1()
QOpenGLFunctions_1_1::~QOpenGLFunctions_1_1()
{
if (d_1_0_Core && !d_1_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Core->context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
delete d_1_0_Core;
}
if (d_1_1_Core && !d_1_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Core->context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
delete d_1_1_Core;
}
if (d_1_0_Deprecated && !d_1_0_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Deprecated->context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());
delete d_1_0_Deprecated;
}
if (d_1_1_Deprecated && !d_1_1_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Deprecated->context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());
delete d_1_1_Deprecated;
}
if (d_1_0_Core)
d_1_0_Core->refs.deref();
Q_ASSERT(d_1_0_Core->refs.load());
if (d_1_1_Core)
d_1_1_Core->refs.deref();
Q_ASSERT(d_1_1_Core->refs.load());
if (d_1_0_Deprecated)
d_1_0_Deprecated->refs.deref();
Q_ASSERT(d_1_0_Deprecated->refs.load());
if (d_1_1_Deprecated)
d_1_1_Deprecated->refs.deref();
Q_ASSERT(d_1_1_Deprecated->refs.load());
}
bool QOpenGLFunctions_1_1::initializeOpenGLFunctions()
@ -110,34 +106,18 @@ bool QOpenGLFunctions_1_1::initializeOpenGLFunctions()
// Function pointers in the backends are resolved at creation time
QOpenGLVersionFunctionsBackend* d = 0;
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus(), d);
}
d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus(), d);
}
d_1_1_Core = static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_0_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus(), d);
}
d_1_0_Deprecated = static_cast<QOpenGLFunctions_1_0_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_1_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus(), d);
}
d_1_1_Deprecated = static_cast<QOpenGLFunctions_1_1_DeprecatedBackend*>(d);
d->refs.ref();

View File

@ -78,30 +78,24 @@ QOpenGLFunctions_1_2::QOpenGLFunctions_1_2()
QOpenGLFunctions_1_2::~QOpenGLFunctions_1_2()
{
if (d_1_0_Core && !d_1_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Core->context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
delete d_1_0_Core;
}
if (d_1_1_Core && !d_1_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Core->context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
delete d_1_1_Core;
}
if (d_1_2_Core && !d_1_2_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Core->context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
delete d_1_2_Core;
}
if (d_1_0_Deprecated && !d_1_0_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Deprecated->context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());
delete d_1_0_Deprecated;
}
if (d_1_1_Deprecated && !d_1_1_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Deprecated->context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());
delete d_1_1_Deprecated;
}
if (d_1_2_Deprecated && !d_1_2_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Deprecated->context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus());
delete d_1_2_Deprecated;
}
if (d_1_0_Core)
d_1_0_Core->refs.deref();
Q_ASSERT(d_1_0_Core->refs.load());
if (d_1_1_Core)
d_1_1_Core->refs.deref();
Q_ASSERT(d_1_1_Core->refs.load());
if (d_1_2_Core)
d_1_2_Core->refs.deref();
Q_ASSERT(d_1_2_Core->refs.load());
if (d_1_0_Deprecated)
d_1_0_Deprecated->refs.deref();
Q_ASSERT(d_1_0_Deprecated->refs.load());
if (d_1_1_Deprecated)
d_1_1_Deprecated->refs.deref();
Q_ASSERT(d_1_1_Deprecated->refs.load());
if (d_1_2_Deprecated)
d_1_2_Deprecated->refs.deref();
Q_ASSERT(d_1_2_Deprecated->refs.load());
}
bool QOpenGLFunctions_1_2::initializeOpenGLFunctions()
@ -120,50 +114,26 @@ bool QOpenGLFunctions_1_2::initializeOpenGLFunctions()
// Function pointers in the backends are resolved at creation time
QOpenGLVersionFunctionsBackend* d = 0;
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus(), d);
}
d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus(), d);
}
d_1_1_Core = static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_2_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus(), d);
}
d_1_2_Core = static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_0_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus(), d);
}
d_1_0_Deprecated = static_cast<QOpenGLFunctions_1_0_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_1_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus(), d);
}
d_1_1_Deprecated = static_cast<QOpenGLFunctions_1_1_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_2_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus(), d);
}
d_1_2_Deprecated = static_cast<QOpenGLFunctions_1_2_DeprecatedBackend*>(d);
d->refs.ref();

View File

@ -80,38 +80,30 @@ QOpenGLFunctions_1_3::QOpenGLFunctions_1_3()
QOpenGLFunctions_1_3::~QOpenGLFunctions_1_3()
{
if (d_1_0_Core && !d_1_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Core->context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
delete d_1_0_Core;
}
if (d_1_1_Core && !d_1_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Core->context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
delete d_1_1_Core;
}
if (d_1_2_Core && !d_1_2_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Core->context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
delete d_1_2_Core;
}
if (d_1_3_Core && !d_1_3_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Core->context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
delete d_1_3_Core;
}
if (d_1_0_Deprecated && !d_1_0_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Deprecated->context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());
delete d_1_0_Deprecated;
}
if (d_1_1_Deprecated && !d_1_1_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Deprecated->context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());
delete d_1_1_Deprecated;
}
if (d_1_2_Deprecated && !d_1_2_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Deprecated->context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus());
delete d_1_2_Deprecated;
}
if (d_1_3_Deprecated && !d_1_3_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Deprecated->context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus());
delete d_1_3_Deprecated;
}
if (d_1_0_Core)
d_1_0_Core->refs.deref();
Q_ASSERT(d_1_0_Core->refs.load());
if (d_1_1_Core)
d_1_1_Core->refs.deref();
Q_ASSERT(d_1_1_Core->refs.load());
if (d_1_2_Core)
d_1_2_Core->refs.deref();
Q_ASSERT(d_1_2_Core->refs.load());
if (d_1_3_Core)
d_1_3_Core->refs.deref();
Q_ASSERT(d_1_3_Core->refs.load());
if (d_1_0_Deprecated)
d_1_0_Deprecated->refs.deref();
Q_ASSERT(d_1_0_Deprecated->refs.load());
if (d_1_1_Deprecated)
d_1_1_Deprecated->refs.deref();
Q_ASSERT(d_1_1_Deprecated->refs.load());
if (d_1_2_Deprecated)
d_1_2_Deprecated->refs.deref();
Q_ASSERT(d_1_2_Deprecated->refs.load());
if (d_1_3_Deprecated)
d_1_3_Deprecated->refs.deref();
Q_ASSERT(d_1_3_Deprecated->refs.load());
}
bool QOpenGLFunctions_1_3::initializeOpenGLFunctions()
@ -130,66 +122,34 @@ bool QOpenGLFunctions_1_3::initializeOpenGLFunctions()
// Function pointers in the backends are resolved at creation time
QOpenGLVersionFunctionsBackend* d = 0;
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus(), d);
}
d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus(), d);
}
d_1_1_Core = static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_2_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus(), d);
}
d_1_2_Core = static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_3_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus(), d);
}
d_1_3_Core = static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_0_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus(), d);
}
d_1_0_Deprecated = static_cast<QOpenGLFunctions_1_0_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_1_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus(), d);
}
d_1_1_Deprecated = static_cast<QOpenGLFunctions_1_1_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_2_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus(), d);
}
d_1_2_Deprecated = static_cast<QOpenGLFunctions_1_2_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_3_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus(), d);
}
d_1_3_Deprecated = static_cast<QOpenGLFunctions_1_3_DeprecatedBackend*>(d);
d->refs.ref();

View File

@ -82,46 +82,36 @@ QOpenGLFunctions_1_4::QOpenGLFunctions_1_4()
QOpenGLFunctions_1_4::~QOpenGLFunctions_1_4()
{
if (d_1_0_Core && !d_1_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Core->context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
delete d_1_0_Core;
}
if (d_1_1_Core && !d_1_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Core->context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
delete d_1_1_Core;
}
if (d_1_2_Core && !d_1_2_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Core->context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
delete d_1_2_Core;
}
if (d_1_3_Core && !d_1_3_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Core->context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
delete d_1_3_Core;
}
if (d_1_4_Core && !d_1_4_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Core->context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
delete d_1_4_Core;
}
if (d_1_0_Deprecated && !d_1_0_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Deprecated->context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());
delete d_1_0_Deprecated;
}
if (d_1_1_Deprecated && !d_1_1_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Deprecated->context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());
delete d_1_1_Deprecated;
}
if (d_1_2_Deprecated && !d_1_2_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Deprecated->context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus());
delete d_1_2_Deprecated;
}
if (d_1_3_Deprecated && !d_1_3_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Deprecated->context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus());
delete d_1_3_Deprecated;
}
if (d_1_4_Deprecated && !d_1_4_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Deprecated->context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus());
delete d_1_4_Deprecated;
}
if (d_1_0_Core)
d_1_0_Core->refs.deref();
Q_ASSERT(d_1_0_Core->refs.load());
if (d_1_1_Core)
d_1_1_Core->refs.deref();
Q_ASSERT(d_1_1_Core->refs.load());
if (d_1_2_Core)
d_1_2_Core->refs.deref();
Q_ASSERT(d_1_2_Core->refs.load());
if (d_1_3_Core)
d_1_3_Core->refs.deref();
Q_ASSERT(d_1_3_Core->refs.load());
if (d_1_4_Core)
d_1_4_Core->refs.deref();
Q_ASSERT(d_1_4_Core->refs.load());
if (d_1_0_Deprecated)
d_1_0_Deprecated->refs.deref();
Q_ASSERT(d_1_0_Deprecated->refs.load());
if (d_1_1_Deprecated)
d_1_1_Deprecated->refs.deref();
Q_ASSERT(d_1_1_Deprecated->refs.load());
if (d_1_2_Deprecated)
d_1_2_Deprecated->refs.deref();
Q_ASSERT(d_1_2_Deprecated->refs.load());
if (d_1_3_Deprecated)
d_1_3_Deprecated->refs.deref();
Q_ASSERT(d_1_3_Deprecated->refs.load());
if (d_1_4_Deprecated)
d_1_4_Deprecated->refs.deref();
Q_ASSERT(d_1_4_Deprecated->refs.load());
}
bool QOpenGLFunctions_1_4::initializeOpenGLFunctions()
@ -140,82 +130,42 @@ bool QOpenGLFunctions_1_4::initializeOpenGLFunctions()
// Function pointers in the backends are resolved at creation time
QOpenGLVersionFunctionsBackend* d = 0;
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus(), d);
}
d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus(), d);
}
d_1_1_Core = static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_2_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus(), d);
}
d_1_2_Core = static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_3_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus(), d);
}
d_1_3_Core = static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_4_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus(), d);
}
d_1_4_Core = static_cast<QOpenGLFunctions_1_4_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_0_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus(), d);
}
d_1_0_Deprecated = static_cast<QOpenGLFunctions_1_0_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_1_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus(), d);
}
d_1_1_Deprecated = static_cast<QOpenGLFunctions_1_1_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_2_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus(), d);
}
d_1_2_Deprecated = static_cast<QOpenGLFunctions_1_2_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_3_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus(), d);
}
d_1_3_Deprecated = static_cast<QOpenGLFunctions_1_3_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_4_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus(), d);
}
d_1_4_Deprecated = static_cast<QOpenGLFunctions_1_4_DeprecatedBackend*>(d);
d->refs.ref();

View File

@ -83,50 +83,39 @@ QOpenGLFunctions_1_5::QOpenGLFunctions_1_5()
QOpenGLFunctions_1_5::~QOpenGLFunctions_1_5()
{
if (d_1_0_Core && !d_1_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Core->context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
delete d_1_0_Core;
}
if (d_1_1_Core && !d_1_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Core->context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
delete d_1_1_Core;
}
if (d_1_2_Core && !d_1_2_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Core->context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
delete d_1_2_Core;
}
if (d_1_3_Core && !d_1_3_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Core->context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
delete d_1_3_Core;
}
if (d_1_4_Core && !d_1_4_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Core->context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
delete d_1_4_Core;
}
if (d_1_5_Core && !d_1_5_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_5_Core->context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
delete d_1_5_Core;
}
if (d_1_0_Deprecated && !d_1_0_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Deprecated->context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());
delete d_1_0_Deprecated;
}
if (d_1_1_Deprecated && !d_1_1_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Deprecated->context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());
delete d_1_1_Deprecated;
}
if (d_1_2_Deprecated && !d_1_2_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Deprecated->context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus());
delete d_1_2_Deprecated;
}
if (d_1_3_Deprecated && !d_1_3_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Deprecated->context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus());
delete d_1_3_Deprecated;
}
if (d_1_4_Deprecated && !d_1_4_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Deprecated->context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus());
delete d_1_4_Deprecated;
}
if (d_1_0_Core)
d_1_0_Core->refs.deref();
Q_ASSERT(d_1_0_Core->refs.load());
if (d_1_1_Core)
d_1_1_Core->refs.deref();
Q_ASSERT(d_1_1_Core->refs.load());
if (d_1_2_Core)
d_1_2_Core->refs.deref();
Q_ASSERT(d_1_2_Core->refs.load());
if (d_1_3_Core)
d_1_3_Core->refs.deref();
Q_ASSERT(d_1_3_Core->refs.load());
if (d_1_4_Core)
d_1_4_Core->refs.deref();
Q_ASSERT(d_1_4_Core->refs.load());
if (d_1_5_Core)
d_1_5_Core->refs.deref();
Q_ASSERT(d_1_5_Core->refs.load());
if (d_1_0_Deprecated)
d_1_0_Deprecated->refs.deref();
Q_ASSERT(d_1_0_Deprecated->refs.load());
if (d_1_1_Deprecated)
d_1_1_Deprecated->refs.deref();
Q_ASSERT(d_1_1_Deprecated->refs.load());
if (d_1_2_Deprecated)
d_1_2_Deprecated->refs.deref();
Q_ASSERT(d_1_2_Deprecated->refs.load());
if (d_1_3_Deprecated)
d_1_3_Deprecated->refs.deref();
Q_ASSERT(d_1_3_Deprecated->refs.load());
if (d_1_4_Deprecated)
d_1_4_Deprecated->refs.deref();
Q_ASSERT(d_1_4_Deprecated->refs.load());
}
bool QOpenGLFunctions_1_5::initializeOpenGLFunctions()
@ -145,90 +134,46 @@ bool QOpenGLFunctions_1_5::initializeOpenGLFunctions()
// Function pointers in the backends are resolved at creation time
QOpenGLVersionFunctionsBackend* d = 0;
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus(), d);
}
d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus(), d);
}
d_1_1_Core = static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_2_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus(), d);
}
d_1_2_Core = static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_3_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus(), d);
}
d_1_3_Core = static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_4_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus(), d);
}
d_1_4_Core = static_cast<QOpenGLFunctions_1_4_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_5_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus(), d);
}
d_1_5_Core = static_cast<QOpenGLFunctions_1_5_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_0_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus(), d);
}
d_1_0_Deprecated = static_cast<QOpenGLFunctions_1_0_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_1_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus(), d);
}
d_1_1_Deprecated = static_cast<QOpenGLFunctions_1_1_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_2_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus(), d);
}
d_1_2_Deprecated = static_cast<QOpenGLFunctions_1_2_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_3_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus(), d);
}
d_1_3_Deprecated = static_cast<QOpenGLFunctions_1_3_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_4_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus(), d);
}
d_1_4_Deprecated = static_cast<QOpenGLFunctions_1_4_DeprecatedBackend*>(d);
d->refs.ref();

View File

@ -85,54 +85,42 @@ QOpenGLFunctions_2_0::QOpenGLFunctions_2_0()
QOpenGLFunctions_2_0::~QOpenGLFunctions_2_0()
{
if (d_1_0_Core && !d_1_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Core->context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
delete d_1_0_Core;
}
if (d_1_1_Core && !d_1_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Core->context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
delete d_1_1_Core;
}
if (d_1_2_Core && !d_1_2_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Core->context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
delete d_1_2_Core;
}
if (d_1_3_Core && !d_1_3_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Core->context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
delete d_1_3_Core;
}
if (d_1_4_Core && !d_1_4_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Core->context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
delete d_1_4_Core;
}
if (d_1_5_Core && !d_1_5_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_5_Core->context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
delete d_1_5_Core;
}
if (d_2_0_Core && !d_2_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_0_Core->context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
delete d_2_0_Core;
}
if (d_1_0_Deprecated && !d_1_0_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Deprecated->context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());
delete d_1_0_Deprecated;
}
if (d_1_1_Deprecated && !d_1_1_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Deprecated->context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());
delete d_1_1_Deprecated;
}
if (d_1_2_Deprecated && !d_1_2_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Deprecated->context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus());
delete d_1_2_Deprecated;
}
if (d_1_3_Deprecated && !d_1_3_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Deprecated->context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus());
delete d_1_3_Deprecated;
}
if (d_1_4_Deprecated && !d_1_4_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Deprecated->context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus());
delete d_1_4_Deprecated;
}
if (d_1_0_Core)
d_1_0_Core->refs.deref();
Q_ASSERT(d_1_0_Core->refs.load());
if (d_1_1_Core)
d_1_1_Core->refs.deref();
Q_ASSERT(d_1_1_Core->refs.load());
if (d_1_2_Core)
d_1_2_Core->refs.deref();
Q_ASSERT(d_1_2_Core->refs.load());
if (d_1_3_Core)
d_1_3_Core->refs.deref();
Q_ASSERT(d_1_3_Core->refs.load());
if (d_1_4_Core)
d_1_4_Core->refs.deref();
Q_ASSERT(d_1_4_Core->refs.load());
if (d_1_5_Core)
d_1_5_Core->refs.deref();
Q_ASSERT(d_1_5_Core->refs.load());
if (d_2_0_Core)
d_2_0_Core->refs.deref();
Q_ASSERT(d_2_0_Core->refs.load());
if (d_1_0_Deprecated)
d_1_0_Deprecated->refs.deref();
Q_ASSERT(d_1_0_Deprecated->refs.load());
if (d_1_1_Deprecated)
d_1_1_Deprecated->refs.deref();
Q_ASSERT(d_1_1_Deprecated->refs.load());
if (d_1_2_Deprecated)
d_1_2_Deprecated->refs.deref();
Q_ASSERT(d_1_2_Deprecated->refs.load());
if (d_1_3_Deprecated)
d_1_3_Deprecated->refs.deref();
Q_ASSERT(d_1_3_Deprecated->refs.load());
if (d_1_4_Deprecated)
d_1_4_Deprecated->refs.deref();
Q_ASSERT(d_1_4_Deprecated->refs.load());
}
bool QOpenGLFunctions_2_0::initializeOpenGLFunctions()
@ -151,98 +139,50 @@ bool QOpenGLFunctions_2_0::initializeOpenGLFunctions()
// Function pointers in the backends are resolved at creation time
QOpenGLVersionFunctionsBackend* d = 0;
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus(), d);
}
d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus(), d);
}
d_1_1_Core = static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_2_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus(), d);
}
d_1_2_Core = static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_3_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus(), d);
}
d_1_3_Core = static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_4_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus(), d);
}
d_1_4_Core = static_cast<QOpenGLFunctions_1_4_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_5_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus(), d);
}
d_1_5_Core = static_cast<QOpenGLFunctions_1_5_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_2_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus(), d);
}
d_2_0_Core = static_cast<QOpenGLFunctions_2_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_0_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus(), d);
}
d_1_0_Deprecated = static_cast<QOpenGLFunctions_1_0_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_1_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus(), d);
}
d_1_1_Deprecated = static_cast<QOpenGLFunctions_1_1_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_2_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus(), d);
}
d_1_2_Deprecated = static_cast<QOpenGLFunctions_1_2_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_3_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus(), d);
}
d_1_3_Deprecated = static_cast<QOpenGLFunctions_1_3_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_4_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus(), d);
}
d_1_4_Deprecated = static_cast<QOpenGLFunctions_1_4_DeprecatedBackend*>(d);
d->refs.ref();

View File

@ -86,58 +86,45 @@ QOpenGLFunctions_2_1::QOpenGLFunctions_2_1()
QOpenGLFunctions_2_1::~QOpenGLFunctions_2_1()
{
if (d_1_0_Core && !d_1_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Core->context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
delete d_1_0_Core;
}
if (d_1_1_Core && !d_1_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Core->context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
delete d_1_1_Core;
}
if (d_1_2_Core && !d_1_2_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Core->context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
delete d_1_2_Core;
}
if (d_1_3_Core && !d_1_3_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Core->context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
delete d_1_3_Core;
}
if (d_1_4_Core && !d_1_4_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Core->context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
delete d_1_4_Core;
}
if (d_1_5_Core && !d_1_5_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_5_Core->context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
delete d_1_5_Core;
}
if (d_2_0_Core && !d_2_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_0_Core->context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
delete d_2_0_Core;
}
if (d_2_1_Core && !d_2_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_1_Core->context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
delete d_2_1_Core;
}
if (d_1_0_Deprecated && !d_1_0_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Deprecated->context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());
delete d_1_0_Deprecated;
}
if (d_1_1_Deprecated && !d_1_1_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Deprecated->context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());
delete d_1_1_Deprecated;
}
if (d_1_2_Deprecated && !d_1_2_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Deprecated->context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus());
delete d_1_2_Deprecated;
}
if (d_1_3_Deprecated && !d_1_3_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Deprecated->context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus());
delete d_1_3_Deprecated;
}
if (d_1_4_Deprecated && !d_1_4_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Deprecated->context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus());
delete d_1_4_Deprecated;
}
if (d_1_0_Core)
d_1_0_Core->refs.deref();
Q_ASSERT(d_1_0_Core->refs.load());
if (d_1_1_Core)
d_1_1_Core->refs.deref();
Q_ASSERT(d_1_1_Core->refs.load());
if (d_1_2_Core)
d_1_2_Core->refs.deref();
Q_ASSERT(d_1_2_Core->refs.load());
if (d_1_3_Core)
d_1_3_Core->refs.deref();
Q_ASSERT(d_1_3_Core->refs.load());
if (d_1_4_Core)
d_1_4_Core->refs.deref();
Q_ASSERT(d_1_4_Core->refs.load());
if (d_1_5_Core)
d_1_5_Core->refs.deref();
Q_ASSERT(d_1_5_Core->refs.load());
if (d_2_0_Core)
d_2_0_Core->refs.deref();
Q_ASSERT(d_2_0_Core->refs.load());
if (d_2_1_Core)
d_2_1_Core->refs.deref();
Q_ASSERT(d_2_1_Core->refs.load());
if (d_1_0_Deprecated)
d_1_0_Deprecated->refs.deref();
Q_ASSERT(d_1_0_Deprecated->refs.load());
if (d_1_1_Deprecated)
d_1_1_Deprecated->refs.deref();
Q_ASSERT(d_1_1_Deprecated->refs.load());
if (d_1_2_Deprecated)
d_1_2_Deprecated->refs.deref();
Q_ASSERT(d_1_2_Deprecated->refs.load());
if (d_1_3_Deprecated)
d_1_3_Deprecated->refs.deref();
Q_ASSERT(d_1_3_Deprecated->refs.load());
if (d_1_4_Deprecated)
d_1_4_Deprecated->refs.deref();
Q_ASSERT(d_1_4_Deprecated->refs.load());
}
bool QOpenGLFunctions_2_1::initializeOpenGLFunctions()
@ -156,106 +143,54 @@ bool QOpenGLFunctions_2_1::initializeOpenGLFunctions()
// Function pointers in the backends are resolved at creation time
QOpenGLVersionFunctionsBackend* d = 0;
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus(), d);
}
d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus(), d);
}
d_1_1_Core = static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_2_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus(), d);
}
d_1_2_Core = static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_3_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus(), d);
}
d_1_3_Core = static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_4_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus(), d);
}
d_1_4_Core = static_cast<QOpenGLFunctions_1_4_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_5_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus(), d);
}
d_1_5_Core = static_cast<QOpenGLFunctions_1_5_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_2_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus(), d);
}
d_2_0_Core = static_cast<QOpenGLFunctions_2_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_2_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus(), d);
}
d_2_1_Core = static_cast<QOpenGLFunctions_2_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_0_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus(), d);
}
d_1_0_Deprecated = static_cast<QOpenGLFunctions_1_0_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_1_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus(), d);
}
d_1_1_Deprecated = static_cast<QOpenGLFunctions_1_1_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_2_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus(), d);
}
d_1_2_Deprecated = static_cast<QOpenGLFunctions_1_2_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_3_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus(), d);
}
d_1_3_Deprecated = static_cast<QOpenGLFunctions_1_3_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_4_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus(), d);
}
d_1_4_Deprecated = static_cast<QOpenGLFunctions_1_4_DeprecatedBackend*>(d);
d->refs.ref();

View File

@ -88,62 +88,48 @@ QOpenGLFunctions_3_0::QOpenGLFunctions_3_0()
QOpenGLFunctions_3_0::~QOpenGLFunctions_3_0()
{
if (d_1_0_Core && !d_1_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Core->context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
delete d_1_0_Core;
}
if (d_1_1_Core && !d_1_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Core->context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
delete d_1_1_Core;
}
if (d_1_2_Core && !d_1_2_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Core->context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
delete d_1_2_Core;
}
if (d_1_3_Core && !d_1_3_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Core->context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
delete d_1_3_Core;
}
if (d_1_4_Core && !d_1_4_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Core->context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
delete d_1_4_Core;
}
if (d_1_5_Core && !d_1_5_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_5_Core->context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
delete d_1_5_Core;
}
if (d_2_0_Core && !d_2_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_0_Core->context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
delete d_2_0_Core;
}
if (d_2_1_Core && !d_2_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_1_Core->context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
delete d_2_1_Core;
}
if (d_3_0_Core && !d_3_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_0_Core->context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
delete d_3_0_Core;
}
if (d_1_0_Deprecated && !d_1_0_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Deprecated->context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());
delete d_1_0_Deprecated;
}
if (d_1_1_Deprecated && !d_1_1_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Deprecated->context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());
delete d_1_1_Deprecated;
}
if (d_1_2_Deprecated && !d_1_2_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Deprecated->context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus());
delete d_1_2_Deprecated;
}
if (d_1_3_Deprecated && !d_1_3_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Deprecated->context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus());
delete d_1_3_Deprecated;
}
if (d_1_4_Deprecated && !d_1_4_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Deprecated->context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus());
delete d_1_4_Deprecated;
}
if (d_1_0_Core)
d_1_0_Core->refs.deref();
Q_ASSERT(d_1_0_Core->refs.load());
if (d_1_1_Core)
d_1_1_Core->refs.deref();
Q_ASSERT(d_1_1_Core->refs.load());
if (d_1_2_Core)
d_1_2_Core->refs.deref();
Q_ASSERT(d_1_2_Core->refs.load());
if (d_1_3_Core)
d_1_3_Core->refs.deref();
Q_ASSERT(d_1_3_Core->refs.load());
if (d_1_4_Core)
d_1_4_Core->refs.deref();
Q_ASSERT(d_1_4_Core->refs.load());
if (d_1_5_Core)
d_1_5_Core->refs.deref();
Q_ASSERT(d_1_5_Core->refs.load());
if (d_2_0_Core)
d_2_0_Core->refs.deref();
Q_ASSERT(d_2_0_Core->refs.load());
if (d_2_1_Core)
d_2_1_Core->refs.deref();
Q_ASSERT(d_2_1_Core->refs.load());
if (d_3_0_Core)
d_3_0_Core->refs.deref();
Q_ASSERT(d_3_0_Core->refs.load());
if (d_1_0_Deprecated)
d_1_0_Deprecated->refs.deref();
Q_ASSERT(d_1_0_Deprecated->refs.load());
if (d_1_1_Deprecated)
d_1_1_Deprecated->refs.deref();
Q_ASSERT(d_1_1_Deprecated->refs.load());
if (d_1_2_Deprecated)
d_1_2_Deprecated->refs.deref();
Q_ASSERT(d_1_2_Deprecated->refs.load());
if (d_1_3_Deprecated)
d_1_3_Deprecated->refs.deref();
Q_ASSERT(d_1_3_Deprecated->refs.load());
if (d_1_4_Deprecated)
d_1_4_Deprecated->refs.deref();
Q_ASSERT(d_1_4_Deprecated->refs.load());
}
bool QOpenGLFunctions_3_0::initializeOpenGLFunctions()
@ -162,114 +148,58 @@ bool QOpenGLFunctions_3_0::initializeOpenGLFunctions()
// Function pointers in the backends are resolved at creation time
QOpenGLVersionFunctionsBackend* d = 0;
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus(), d);
}
d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus(), d);
}
d_1_1_Core = static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_2_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus(), d);
}
d_1_2_Core = static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_3_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus(), d);
}
d_1_3_Core = static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_4_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus(), d);
}
d_1_4_Core = static_cast<QOpenGLFunctions_1_4_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_5_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus(), d);
}
d_1_5_Core = static_cast<QOpenGLFunctions_1_5_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_2_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus(), d);
}
d_2_0_Core = static_cast<QOpenGLFunctions_2_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_2_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus(), d);
}
d_2_1_Core = static_cast<QOpenGLFunctions_2_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus(), d);
}
d_3_0_Core = static_cast<QOpenGLFunctions_3_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_0_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus(), d);
}
d_1_0_Deprecated = static_cast<QOpenGLFunctions_1_0_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_1_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus(), d);
}
d_1_1_Deprecated = static_cast<QOpenGLFunctions_1_1_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_2_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus(), d);
}
d_1_2_Deprecated = static_cast<QOpenGLFunctions_1_2_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_3_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus(), d);
}
d_1_3_Deprecated = static_cast<QOpenGLFunctions_1_3_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_4_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus(), d);
}
d_1_4_Deprecated = static_cast<QOpenGLFunctions_1_4_DeprecatedBackend*>(d);
d->refs.ref();

View File

@ -82,46 +82,36 @@ QOpenGLFunctions_3_1::QOpenGLFunctions_3_1()
QOpenGLFunctions_3_1::~QOpenGLFunctions_3_1()
{
if (d_1_0_Core && !d_1_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Core->context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
delete d_1_0_Core;
}
if (d_1_1_Core && !d_1_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Core->context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
delete d_1_1_Core;
}
if (d_1_2_Core && !d_1_2_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Core->context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
delete d_1_2_Core;
}
if (d_1_3_Core && !d_1_3_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Core->context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
delete d_1_3_Core;
}
if (d_1_4_Core && !d_1_4_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Core->context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
delete d_1_4_Core;
}
if (d_1_5_Core && !d_1_5_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_5_Core->context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
delete d_1_5_Core;
}
if (d_2_0_Core && !d_2_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_0_Core->context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
delete d_2_0_Core;
}
if (d_2_1_Core && !d_2_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_1_Core->context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
delete d_2_1_Core;
}
if (d_3_0_Core && !d_3_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_0_Core->context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
delete d_3_0_Core;
}
if (d_3_1_Core && !d_3_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_1_Core->context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());
delete d_3_1_Core;
}
if (d_1_0_Core)
d_1_0_Core->refs.deref();
Q_ASSERT(d_1_0_Core->refs.load());
if (d_1_1_Core)
d_1_1_Core->refs.deref();
Q_ASSERT(d_1_1_Core->refs.load());
if (d_1_2_Core)
d_1_2_Core->refs.deref();
Q_ASSERT(d_1_2_Core->refs.load());
if (d_1_3_Core)
d_1_3_Core->refs.deref();
Q_ASSERT(d_1_3_Core->refs.load());
if (d_1_4_Core)
d_1_4_Core->refs.deref();
Q_ASSERT(d_1_4_Core->refs.load());
if (d_1_5_Core)
d_1_5_Core->refs.deref();
Q_ASSERT(d_1_5_Core->refs.load());
if (d_2_0_Core)
d_2_0_Core->refs.deref();
Q_ASSERT(d_2_0_Core->refs.load());
if (d_2_1_Core)
d_2_1_Core->refs.deref();
Q_ASSERT(d_2_1_Core->refs.load());
if (d_3_0_Core)
d_3_0_Core->refs.deref();
Q_ASSERT(d_3_0_Core->refs.load());
if (d_3_1_Core)
d_3_1_Core->refs.deref();
Q_ASSERT(d_3_1_Core->refs.load());
}
bool QOpenGLFunctions_3_1::initializeOpenGLFunctions()
@ -140,82 +130,42 @@ bool QOpenGLFunctions_3_1::initializeOpenGLFunctions()
// Function pointers in the backends are resolved at creation time
QOpenGLVersionFunctionsBackend* d = 0;
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus(), d);
}
d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus(), d);
}
d_1_1_Core = static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_2_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus(), d);
}
d_1_2_Core = static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_3_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus(), d);
}
d_1_3_Core = static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_4_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus(), d);
}
d_1_4_Core = static_cast<QOpenGLFunctions_1_4_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_5_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus(), d);
}
d_1_5_Core = static_cast<QOpenGLFunctions_1_5_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_2_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus(), d);
}
d_2_0_Core = static_cast<QOpenGLFunctions_2_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_2_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus(), d);
}
d_2_1_Core = static_cast<QOpenGLFunctions_2_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus(), d);
}
d_3_0_Core = static_cast<QOpenGLFunctions_3_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus(), d);
}
d_3_1_Core = static_cast<QOpenGLFunctions_3_1_CoreBackend*>(d);
d->refs.ref();

View File

@ -90,70 +90,54 @@ QOpenGLFunctions_3_2_Compatibility::QOpenGLFunctions_3_2_Compatibility()
QOpenGLFunctions_3_2_Compatibility::~QOpenGLFunctions_3_2_Compatibility()
{
if (d_1_0_Core && !d_1_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Core->context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
delete d_1_0_Core;
}
if (d_1_1_Core && !d_1_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Core->context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
delete d_1_1_Core;
}
if (d_1_2_Core && !d_1_2_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Core->context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
delete d_1_2_Core;
}
if (d_1_3_Core && !d_1_3_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Core->context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
delete d_1_3_Core;
}
if (d_1_4_Core && !d_1_4_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Core->context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
delete d_1_4_Core;
}
if (d_1_5_Core && !d_1_5_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_5_Core->context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
delete d_1_5_Core;
}
if (d_2_0_Core && !d_2_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_0_Core->context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
delete d_2_0_Core;
}
if (d_2_1_Core && !d_2_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_1_Core->context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
delete d_2_1_Core;
}
if (d_3_0_Core && !d_3_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_0_Core->context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
delete d_3_0_Core;
}
if (d_3_1_Core && !d_3_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_1_Core->context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());
delete d_3_1_Core;
}
if (d_3_2_Core && !d_3_2_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_2_Core->context, QOpenGLFunctions_3_2_CoreBackend::versionStatus());
delete d_3_2_Core;
}
if (d_1_0_Deprecated && !d_1_0_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Deprecated->context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());
delete d_1_0_Deprecated;
}
if (d_1_1_Deprecated && !d_1_1_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Deprecated->context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());
delete d_1_1_Deprecated;
}
if (d_1_2_Deprecated && !d_1_2_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Deprecated->context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus());
delete d_1_2_Deprecated;
}
if (d_1_3_Deprecated && !d_1_3_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Deprecated->context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus());
delete d_1_3_Deprecated;
}
if (d_1_4_Deprecated && !d_1_4_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Deprecated->context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus());
delete d_1_4_Deprecated;
}
if (d_1_0_Core)
d_1_0_Core->refs.deref();
Q_ASSERT(d_1_0_Core->refs.load());
if (d_1_1_Core)
d_1_1_Core->refs.deref();
Q_ASSERT(d_1_1_Core->refs.load());
if (d_1_2_Core)
d_1_2_Core->refs.deref();
Q_ASSERT(d_1_2_Core->refs.load());
if (d_1_3_Core)
d_1_3_Core->refs.deref();
Q_ASSERT(d_1_3_Core->refs.load());
if (d_1_4_Core)
d_1_4_Core->refs.deref();
Q_ASSERT(d_1_4_Core->refs.load());
if (d_1_5_Core)
d_1_5_Core->refs.deref();
Q_ASSERT(d_1_5_Core->refs.load());
if (d_2_0_Core)
d_2_0_Core->refs.deref();
Q_ASSERT(d_2_0_Core->refs.load());
if (d_2_1_Core)
d_2_1_Core->refs.deref();
Q_ASSERT(d_2_1_Core->refs.load());
if (d_3_0_Core)
d_3_0_Core->refs.deref();
Q_ASSERT(d_3_0_Core->refs.load());
if (d_3_1_Core)
d_3_1_Core->refs.deref();
Q_ASSERT(d_3_1_Core->refs.load());
if (d_3_2_Core)
d_3_2_Core->refs.deref();
Q_ASSERT(d_3_2_Core->refs.load());
if (d_1_0_Deprecated)
d_1_0_Deprecated->refs.deref();
Q_ASSERT(d_1_0_Deprecated->refs.load());
if (d_1_1_Deprecated)
d_1_1_Deprecated->refs.deref();
Q_ASSERT(d_1_1_Deprecated->refs.load());
if (d_1_2_Deprecated)
d_1_2_Deprecated->refs.deref();
Q_ASSERT(d_1_2_Deprecated->refs.load());
if (d_1_3_Deprecated)
d_1_3_Deprecated->refs.deref();
Q_ASSERT(d_1_3_Deprecated->refs.load());
if (d_1_4_Deprecated)
d_1_4_Deprecated->refs.deref();
Q_ASSERT(d_1_4_Deprecated->refs.load());
}
bool QOpenGLFunctions_3_2_Compatibility::initializeOpenGLFunctions()
@ -172,130 +156,66 @@ bool QOpenGLFunctions_3_2_Compatibility::initializeOpenGLFunctions()
// Function pointers in the backends are resolved at creation time
QOpenGLVersionFunctionsBackend* d = 0;
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus(), d);
}
d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus(), d);
}
d_1_1_Core = static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_2_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus(), d);
}
d_1_2_Core = static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_3_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus(), d);
}
d_1_3_Core = static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_4_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus(), d);
}
d_1_4_Core = static_cast<QOpenGLFunctions_1_4_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_5_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus(), d);
}
d_1_5_Core = static_cast<QOpenGLFunctions_1_5_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_2_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus(), d);
}
d_2_0_Core = static_cast<QOpenGLFunctions_2_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_2_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus(), d);
}
d_2_1_Core = static_cast<QOpenGLFunctions_2_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus(), d);
}
d_3_0_Core = static_cast<QOpenGLFunctions_3_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus(), d);
}
d_3_1_Core = static_cast<QOpenGLFunctions_3_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_2_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus(), d);
}
d_3_2_Core = static_cast<QOpenGLFunctions_3_2_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_0_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus(), d);
}
d_1_0_Deprecated = static_cast<QOpenGLFunctions_1_0_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_1_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus(), d);
}
d_1_1_Deprecated = static_cast<QOpenGLFunctions_1_1_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_2_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus(), d);
}
d_1_2_Deprecated = static_cast<QOpenGLFunctions_1_2_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_3_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus(), d);
}
d_1_3_Deprecated = static_cast<QOpenGLFunctions_1_3_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_4_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus(), d);
}
d_1_4_Deprecated = static_cast<QOpenGLFunctions_1_4_DeprecatedBackend*>(d);
d->refs.ref();

View File

@ -83,50 +83,39 @@ QOpenGLFunctions_3_2_Core::QOpenGLFunctions_3_2_Core()
QOpenGLFunctions_3_2_Core::~QOpenGLFunctions_3_2_Core()
{
if (d_1_0_Core && !d_1_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Core->context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
delete d_1_0_Core;
}
if (d_1_1_Core && !d_1_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Core->context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
delete d_1_1_Core;
}
if (d_1_2_Core && !d_1_2_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Core->context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
delete d_1_2_Core;
}
if (d_1_3_Core && !d_1_3_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Core->context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
delete d_1_3_Core;
}
if (d_1_4_Core && !d_1_4_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Core->context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
delete d_1_4_Core;
}
if (d_1_5_Core && !d_1_5_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_5_Core->context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
delete d_1_5_Core;
}
if (d_2_0_Core && !d_2_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_0_Core->context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
delete d_2_0_Core;
}
if (d_2_1_Core && !d_2_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_1_Core->context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
delete d_2_1_Core;
}
if (d_3_0_Core && !d_3_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_0_Core->context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
delete d_3_0_Core;
}
if (d_3_1_Core && !d_3_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_1_Core->context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());
delete d_3_1_Core;
}
if (d_3_2_Core && !d_3_2_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_2_Core->context, QOpenGLFunctions_3_2_CoreBackend::versionStatus());
delete d_3_2_Core;
}
if (d_1_0_Core)
d_1_0_Core->refs.deref();
Q_ASSERT(d_1_0_Core->refs.load());
if (d_1_1_Core)
d_1_1_Core->refs.deref();
Q_ASSERT(d_1_1_Core->refs.load());
if (d_1_2_Core)
d_1_2_Core->refs.deref();
Q_ASSERT(d_1_2_Core->refs.load());
if (d_1_3_Core)
d_1_3_Core->refs.deref();
Q_ASSERT(d_1_3_Core->refs.load());
if (d_1_4_Core)
d_1_4_Core->refs.deref();
Q_ASSERT(d_1_4_Core->refs.load());
if (d_1_5_Core)
d_1_5_Core->refs.deref();
Q_ASSERT(d_1_5_Core->refs.load());
if (d_2_0_Core)
d_2_0_Core->refs.deref();
Q_ASSERT(d_2_0_Core->refs.load());
if (d_2_1_Core)
d_2_1_Core->refs.deref();
Q_ASSERT(d_2_1_Core->refs.load());
if (d_3_0_Core)
d_3_0_Core->refs.deref();
Q_ASSERT(d_3_0_Core->refs.load());
if (d_3_1_Core)
d_3_1_Core->refs.deref();
Q_ASSERT(d_3_1_Core->refs.load());
if (d_3_2_Core)
d_3_2_Core->refs.deref();
Q_ASSERT(d_3_2_Core->refs.load());
}
bool QOpenGLFunctions_3_2_Core::initializeOpenGLFunctions()
@ -145,90 +134,46 @@ bool QOpenGLFunctions_3_2_Core::initializeOpenGLFunctions()
// Function pointers in the backends are resolved at creation time
QOpenGLVersionFunctionsBackend* d = 0;
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus(), d);
}
d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus(), d);
}
d_1_1_Core = static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_2_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus(), d);
}
d_1_2_Core = static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_3_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus(), d);
}
d_1_3_Core = static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_4_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus(), d);
}
d_1_4_Core = static_cast<QOpenGLFunctions_1_4_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_5_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus(), d);
}
d_1_5_Core = static_cast<QOpenGLFunctions_1_5_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_2_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus(), d);
}
d_2_0_Core = static_cast<QOpenGLFunctions_2_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_2_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus(), d);
}
d_2_1_Core = static_cast<QOpenGLFunctions_2_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus(), d);
}
d_3_0_Core = static_cast<QOpenGLFunctions_3_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus(), d);
}
d_3_1_Core = static_cast<QOpenGLFunctions_3_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_2_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus(), d);
}
d_3_2_Core = static_cast<QOpenGLFunctions_3_2_CoreBackend*>(d);
d->refs.ref();

View File

@ -91,78 +91,60 @@ QOpenGLFunctions_3_3_Compatibility::QOpenGLFunctions_3_3_Compatibility()
QOpenGLFunctions_3_3_Compatibility::~QOpenGLFunctions_3_3_Compatibility()
{
if (d_1_0_Core && !d_1_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Core->context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
delete d_1_0_Core;
}
if (d_1_1_Core && !d_1_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Core->context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
delete d_1_1_Core;
}
if (d_1_2_Core && !d_1_2_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Core->context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
delete d_1_2_Core;
}
if (d_1_3_Core && !d_1_3_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Core->context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
delete d_1_3_Core;
}
if (d_1_4_Core && !d_1_4_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Core->context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
delete d_1_4_Core;
}
if (d_1_5_Core && !d_1_5_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_5_Core->context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
delete d_1_5_Core;
}
if (d_2_0_Core && !d_2_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_0_Core->context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
delete d_2_0_Core;
}
if (d_2_1_Core && !d_2_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_1_Core->context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
delete d_2_1_Core;
}
if (d_3_0_Core && !d_3_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_0_Core->context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
delete d_3_0_Core;
}
if (d_3_1_Core && !d_3_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_1_Core->context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());
delete d_3_1_Core;
}
if (d_3_2_Core && !d_3_2_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_2_Core->context, QOpenGLFunctions_3_2_CoreBackend::versionStatus());
delete d_3_2_Core;
}
if (d_3_3_Core && !d_3_3_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_3_Core->context, QOpenGLFunctions_3_3_CoreBackend::versionStatus());
delete d_3_3_Core;
}
if (d_1_0_Deprecated && !d_1_0_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Deprecated->context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());
delete d_1_0_Deprecated;
}
if (d_1_1_Deprecated && !d_1_1_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Deprecated->context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());
delete d_1_1_Deprecated;
}
if (d_1_2_Deprecated && !d_1_2_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Deprecated->context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus());
delete d_1_2_Deprecated;
}
if (d_1_3_Deprecated && !d_1_3_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Deprecated->context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus());
delete d_1_3_Deprecated;
}
if (d_1_4_Deprecated && !d_1_4_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Deprecated->context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus());
delete d_1_4_Deprecated;
}
if (d_3_3_Deprecated && !d_3_3_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_3_Deprecated->context, QOpenGLFunctions_3_3_DeprecatedBackend::versionStatus());
delete d_3_3_Deprecated;
}
if (d_1_0_Core)
d_1_0_Core->refs.deref();
Q_ASSERT(d_1_0_Core->refs.load());
if (d_1_1_Core)
d_1_1_Core->refs.deref();
Q_ASSERT(d_1_1_Core->refs.load());
if (d_1_2_Core)
d_1_2_Core->refs.deref();
Q_ASSERT(d_1_2_Core->refs.load());
if (d_1_3_Core)
d_1_3_Core->refs.deref();
Q_ASSERT(d_1_3_Core->refs.load());
if (d_1_4_Core)
d_1_4_Core->refs.deref();
Q_ASSERT(d_1_4_Core->refs.load());
if (d_1_5_Core)
d_1_5_Core->refs.deref();
Q_ASSERT(d_1_5_Core->refs.load());
if (d_2_0_Core)
d_2_0_Core->refs.deref();
Q_ASSERT(d_2_0_Core->refs.load());
if (d_2_1_Core)
d_2_1_Core->refs.deref();
Q_ASSERT(d_2_1_Core->refs.load());
if (d_3_0_Core)
d_3_0_Core->refs.deref();
Q_ASSERT(d_3_0_Core->refs.load());
if (d_3_1_Core)
d_3_1_Core->refs.deref();
Q_ASSERT(d_3_1_Core->refs.load());
if (d_3_2_Core)
d_3_2_Core->refs.deref();
Q_ASSERT(d_3_2_Core->refs.load());
if (d_3_3_Core)
d_3_3_Core->refs.deref();
Q_ASSERT(d_3_3_Core->refs.load());
if (d_1_0_Deprecated)
d_1_0_Deprecated->refs.deref();
Q_ASSERT(d_1_0_Deprecated->refs.load());
if (d_1_1_Deprecated)
d_1_1_Deprecated->refs.deref();
Q_ASSERT(d_1_1_Deprecated->refs.load());
if (d_1_2_Deprecated)
d_1_2_Deprecated->refs.deref();
Q_ASSERT(d_1_2_Deprecated->refs.load());
if (d_1_3_Deprecated)
d_1_3_Deprecated->refs.deref();
Q_ASSERT(d_1_3_Deprecated->refs.load());
if (d_1_4_Deprecated)
d_1_4_Deprecated->refs.deref();
Q_ASSERT(d_1_4_Deprecated->refs.load());
if (d_3_3_Deprecated)
d_3_3_Deprecated->refs.deref();
Q_ASSERT(d_3_3_Deprecated->refs.load());
}
bool QOpenGLFunctions_3_3_Compatibility::initializeOpenGLFunctions()
@ -181,146 +163,74 @@ bool QOpenGLFunctions_3_3_Compatibility::initializeOpenGLFunctions()
// Function pointers in the backends are resolved at creation time
QOpenGLVersionFunctionsBackend* d = 0;
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus(), d);
}
d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus(), d);
}
d_1_1_Core = static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_2_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus(), d);
}
d_1_2_Core = static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_3_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus(), d);
}
d_1_3_Core = static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_4_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus(), d);
}
d_1_4_Core = static_cast<QOpenGLFunctions_1_4_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_5_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus(), d);
}
d_1_5_Core = static_cast<QOpenGLFunctions_1_5_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_2_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus(), d);
}
d_2_0_Core = static_cast<QOpenGLFunctions_2_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_2_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus(), d);
}
d_2_1_Core = static_cast<QOpenGLFunctions_2_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus(), d);
}
d_3_0_Core = static_cast<QOpenGLFunctions_3_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus(), d);
}
d_3_1_Core = static_cast<QOpenGLFunctions_3_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_2_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus(), d);
}
d_3_2_Core = static_cast<QOpenGLFunctions_3_2_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_3_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus(), d);
}
d_3_3_Core = static_cast<QOpenGLFunctions_3_3_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_0_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus(), d);
}
d_1_0_Deprecated = static_cast<QOpenGLFunctions_1_0_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_1_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus(), d);
}
d_1_1_Deprecated = static_cast<QOpenGLFunctions_1_1_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_2_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus(), d);
}
d_1_2_Deprecated = static_cast<QOpenGLFunctions_1_2_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_3_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus(), d);
}
d_1_3_Deprecated = static_cast<QOpenGLFunctions_1_3_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_4_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus(), d);
}
d_1_4_Deprecated = static_cast<QOpenGLFunctions_1_4_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_3_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_3_DeprecatedBackend::versionStatus(), d);
}
d_3_3_Deprecated = static_cast<QOpenGLFunctions_3_3_DeprecatedBackend*>(d);
d->refs.ref();

View File

@ -84,54 +84,42 @@ QOpenGLFunctions_3_3_Core::QOpenGLFunctions_3_3_Core()
QOpenGLFunctions_3_3_Core::~QOpenGLFunctions_3_3_Core()
{
if (d_1_0_Core && !d_1_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Core->context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
delete d_1_0_Core;
}
if (d_1_1_Core && !d_1_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Core->context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
delete d_1_1_Core;
}
if (d_1_2_Core && !d_1_2_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Core->context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
delete d_1_2_Core;
}
if (d_1_3_Core && !d_1_3_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Core->context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
delete d_1_3_Core;
}
if (d_1_4_Core && !d_1_4_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Core->context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
delete d_1_4_Core;
}
if (d_1_5_Core && !d_1_5_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_5_Core->context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
delete d_1_5_Core;
}
if (d_2_0_Core && !d_2_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_0_Core->context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
delete d_2_0_Core;
}
if (d_2_1_Core && !d_2_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_1_Core->context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
delete d_2_1_Core;
}
if (d_3_0_Core && !d_3_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_0_Core->context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
delete d_3_0_Core;
}
if (d_3_1_Core && !d_3_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_1_Core->context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());
delete d_3_1_Core;
}
if (d_3_2_Core && !d_3_2_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_2_Core->context, QOpenGLFunctions_3_2_CoreBackend::versionStatus());
delete d_3_2_Core;
}
if (d_3_3_Core && !d_3_3_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_3_Core->context, QOpenGLFunctions_3_3_CoreBackend::versionStatus());
delete d_3_3_Core;
}
if (d_1_0_Core)
d_1_0_Core->refs.deref();
Q_ASSERT(d_1_0_Core->refs.load());
if (d_1_1_Core)
d_1_1_Core->refs.deref();
Q_ASSERT(d_1_1_Core->refs.load());
if (d_1_2_Core)
d_1_2_Core->refs.deref();
Q_ASSERT(d_1_2_Core->refs.load());
if (d_1_3_Core)
d_1_3_Core->refs.deref();
Q_ASSERT(d_1_3_Core->refs.load());
if (d_1_4_Core)
d_1_4_Core->refs.deref();
Q_ASSERT(d_1_4_Core->refs.load());
if (d_1_5_Core)
d_1_5_Core->refs.deref();
Q_ASSERT(d_1_5_Core->refs.load());
if (d_2_0_Core)
d_2_0_Core->refs.deref();
Q_ASSERT(d_2_0_Core->refs.load());
if (d_2_1_Core)
d_2_1_Core->refs.deref();
Q_ASSERT(d_2_1_Core->refs.load());
if (d_3_0_Core)
d_3_0_Core->refs.deref();
Q_ASSERT(d_3_0_Core->refs.load());
if (d_3_1_Core)
d_3_1_Core->refs.deref();
Q_ASSERT(d_3_1_Core->refs.load());
if (d_3_2_Core)
d_3_2_Core->refs.deref();
Q_ASSERT(d_3_2_Core->refs.load());
if (d_3_3_Core)
d_3_3_Core->refs.deref();
Q_ASSERT(d_3_3_Core->refs.load());
}
bool QOpenGLFunctions_3_3_Core::initializeOpenGLFunctions()
@ -150,98 +138,50 @@ bool QOpenGLFunctions_3_3_Core::initializeOpenGLFunctions()
// Function pointers in the backends are resolved at creation time
QOpenGLVersionFunctionsBackend* d = 0;
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus(), d);
}
d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus(), d);
}
d_1_1_Core = static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_2_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus(), d);
}
d_1_2_Core = static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_3_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus(), d);
}
d_1_3_Core = static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_4_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus(), d);
}
d_1_4_Core = static_cast<QOpenGLFunctions_1_4_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_5_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus(), d);
}
d_1_5_Core = static_cast<QOpenGLFunctions_1_5_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_2_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus(), d);
}
d_2_0_Core = static_cast<QOpenGLFunctions_2_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_2_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus(), d);
}
d_2_1_Core = static_cast<QOpenGLFunctions_2_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus(), d);
}
d_3_0_Core = static_cast<QOpenGLFunctions_3_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus(), d);
}
d_3_1_Core = static_cast<QOpenGLFunctions_3_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_2_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus(), d);
}
d_3_2_Core = static_cast<QOpenGLFunctions_3_2_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_3_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus(), d);
}
d_3_3_Core = static_cast<QOpenGLFunctions_3_3_CoreBackend*>(d);
d->refs.ref();

View File

@ -92,82 +92,63 @@ QOpenGLFunctions_4_0_Compatibility::QOpenGLFunctions_4_0_Compatibility()
QOpenGLFunctions_4_0_Compatibility::~QOpenGLFunctions_4_0_Compatibility()
{
if (d_1_0_Core && !d_1_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Core->context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
delete d_1_0_Core;
}
if (d_1_1_Core && !d_1_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Core->context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
delete d_1_1_Core;
}
if (d_1_2_Core && !d_1_2_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Core->context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
delete d_1_2_Core;
}
if (d_1_3_Core && !d_1_3_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Core->context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
delete d_1_3_Core;
}
if (d_1_4_Core && !d_1_4_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Core->context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
delete d_1_4_Core;
}
if (d_1_5_Core && !d_1_5_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_5_Core->context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
delete d_1_5_Core;
}
if (d_2_0_Core && !d_2_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_0_Core->context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
delete d_2_0_Core;
}
if (d_2_1_Core && !d_2_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_1_Core->context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
delete d_2_1_Core;
}
if (d_3_0_Core && !d_3_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_0_Core->context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
delete d_3_0_Core;
}
if (d_3_1_Core && !d_3_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_1_Core->context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());
delete d_3_1_Core;
}
if (d_3_2_Core && !d_3_2_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_2_Core->context, QOpenGLFunctions_3_2_CoreBackend::versionStatus());
delete d_3_2_Core;
}
if (d_3_3_Core && !d_3_3_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_3_Core->context, QOpenGLFunctions_3_3_CoreBackend::versionStatus());
delete d_3_3_Core;
}
if (d_4_0_Core && !d_4_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_0_Core->context, QOpenGLFunctions_4_0_CoreBackend::versionStatus());
delete d_4_0_Core;
}
if (d_1_0_Deprecated && !d_1_0_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Deprecated->context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());
delete d_1_0_Deprecated;
}
if (d_1_1_Deprecated && !d_1_1_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Deprecated->context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());
delete d_1_1_Deprecated;
}
if (d_1_2_Deprecated && !d_1_2_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Deprecated->context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus());
delete d_1_2_Deprecated;
}
if (d_1_3_Deprecated && !d_1_3_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Deprecated->context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus());
delete d_1_3_Deprecated;
}
if (d_1_4_Deprecated && !d_1_4_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Deprecated->context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus());
delete d_1_4_Deprecated;
}
if (d_3_3_Deprecated && !d_3_3_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_3_Deprecated->context, QOpenGLFunctions_3_3_DeprecatedBackend::versionStatus());
delete d_3_3_Deprecated;
}
if (d_1_0_Core)
d_1_0_Core->refs.deref();
Q_ASSERT(d_1_0_Core->refs.load());
if (d_1_1_Core)
d_1_1_Core->refs.deref();
Q_ASSERT(d_1_1_Core->refs.load());
if (d_1_2_Core)
d_1_2_Core->refs.deref();
Q_ASSERT(d_1_2_Core->refs.load());
if (d_1_3_Core)
d_1_3_Core->refs.deref();
Q_ASSERT(d_1_3_Core->refs.load());
if (d_1_4_Core)
d_1_4_Core->refs.deref();
Q_ASSERT(d_1_4_Core->refs.load());
if (d_1_5_Core)
d_1_5_Core->refs.deref();
Q_ASSERT(d_1_5_Core->refs.load());
if (d_2_0_Core)
d_2_0_Core->refs.deref();
Q_ASSERT(d_2_0_Core->refs.load());
if (d_2_1_Core)
d_2_1_Core->refs.deref();
Q_ASSERT(d_2_1_Core->refs.load());
if (d_3_0_Core)
d_3_0_Core->refs.deref();
Q_ASSERT(d_3_0_Core->refs.load());
if (d_3_1_Core)
d_3_1_Core->refs.deref();
Q_ASSERT(d_3_1_Core->refs.load());
if (d_3_2_Core)
d_3_2_Core->refs.deref();
Q_ASSERT(d_3_2_Core->refs.load());
if (d_3_3_Core)
d_3_3_Core->refs.deref();
Q_ASSERT(d_3_3_Core->refs.load());
if (d_4_0_Core)
d_4_0_Core->refs.deref();
Q_ASSERT(d_4_0_Core->refs.load());
if (d_1_0_Deprecated)
d_1_0_Deprecated->refs.deref();
Q_ASSERT(d_1_0_Deprecated->refs.load());
if (d_1_1_Deprecated)
d_1_1_Deprecated->refs.deref();
Q_ASSERT(d_1_1_Deprecated->refs.load());
if (d_1_2_Deprecated)
d_1_2_Deprecated->refs.deref();
Q_ASSERT(d_1_2_Deprecated->refs.load());
if (d_1_3_Deprecated)
d_1_3_Deprecated->refs.deref();
Q_ASSERT(d_1_3_Deprecated->refs.load());
if (d_1_4_Deprecated)
d_1_4_Deprecated->refs.deref();
Q_ASSERT(d_1_4_Deprecated->refs.load());
if (d_3_3_Deprecated)
d_3_3_Deprecated->refs.deref();
Q_ASSERT(d_3_3_Deprecated->refs.load());
}
bool QOpenGLFunctions_4_0_Compatibility::initializeOpenGLFunctions()
@ -186,154 +167,78 @@ bool QOpenGLFunctions_4_0_Compatibility::initializeOpenGLFunctions()
// Function pointers in the backends are resolved at creation time
QOpenGLVersionFunctionsBackend* d = 0;
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus(), d);
}
d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus(), d);
}
d_1_1_Core = static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_2_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus(), d);
}
d_1_2_Core = static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_3_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus(), d);
}
d_1_3_Core = static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_4_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus(), d);
}
d_1_4_Core = static_cast<QOpenGLFunctions_1_4_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_5_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus(), d);
}
d_1_5_Core = static_cast<QOpenGLFunctions_1_5_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_2_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus(), d);
}
d_2_0_Core = static_cast<QOpenGLFunctions_2_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_2_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus(), d);
}
d_2_1_Core = static_cast<QOpenGLFunctions_2_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus(), d);
}
d_3_0_Core = static_cast<QOpenGLFunctions_3_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus(), d);
}
d_3_1_Core = static_cast<QOpenGLFunctions_3_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_2_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus(), d);
}
d_3_2_Core = static_cast<QOpenGLFunctions_3_2_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_3_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus(), d);
}
d_3_3_Core = static_cast<QOpenGLFunctions_3_3_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_4_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_0_CoreBackend::versionStatus(), d);
}
d_4_0_Core = static_cast<QOpenGLFunctions_4_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_0_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus(), d);
}
d_1_0_Deprecated = static_cast<QOpenGLFunctions_1_0_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_1_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus(), d);
}
d_1_1_Deprecated = static_cast<QOpenGLFunctions_1_1_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_2_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus(), d);
}
d_1_2_Deprecated = static_cast<QOpenGLFunctions_1_2_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_3_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus(), d);
}
d_1_3_Deprecated = static_cast<QOpenGLFunctions_1_3_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_4_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus(), d);
}
d_1_4_Deprecated = static_cast<QOpenGLFunctions_1_4_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_3_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_3_DeprecatedBackend::versionStatus(), d);
}
d_3_3_Deprecated = static_cast<QOpenGLFunctions_3_3_DeprecatedBackend*>(d);
d->refs.ref();

View File

@ -85,58 +85,45 @@ QOpenGLFunctions_4_0_Core::QOpenGLFunctions_4_0_Core()
QOpenGLFunctions_4_0_Core::~QOpenGLFunctions_4_0_Core()
{
if (d_1_0_Core && !d_1_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Core->context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
delete d_1_0_Core;
}
if (d_1_1_Core && !d_1_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Core->context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
delete d_1_1_Core;
}
if (d_1_2_Core && !d_1_2_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Core->context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
delete d_1_2_Core;
}
if (d_1_3_Core && !d_1_3_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Core->context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
delete d_1_3_Core;
}
if (d_1_4_Core && !d_1_4_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Core->context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
delete d_1_4_Core;
}
if (d_1_5_Core && !d_1_5_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_5_Core->context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
delete d_1_5_Core;
}
if (d_2_0_Core && !d_2_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_0_Core->context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
delete d_2_0_Core;
}
if (d_2_1_Core && !d_2_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_1_Core->context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
delete d_2_1_Core;
}
if (d_3_0_Core && !d_3_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_0_Core->context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
delete d_3_0_Core;
}
if (d_3_1_Core && !d_3_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_1_Core->context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());
delete d_3_1_Core;
}
if (d_3_2_Core && !d_3_2_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_2_Core->context, QOpenGLFunctions_3_2_CoreBackend::versionStatus());
delete d_3_2_Core;
}
if (d_3_3_Core && !d_3_3_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_3_Core->context, QOpenGLFunctions_3_3_CoreBackend::versionStatus());
delete d_3_3_Core;
}
if (d_4_0_Core && !d_4_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_0_Core->context, QOpenGLFunctions_4_0_CoreBackend::versionStatus());
delete d_4_0_Core;
}
if (d_1_0_Core)
d_1_0_Core->refs.deref();
Q_ASSERT(d_1_0_Core->refs.load());
if (d_1_1_Core)
d_1_1_Core->refs.deref();
Q_ASSERT(d_1_1_Core->refs.load());
if (d_1_2_Core)
d_1_2_Core->refs.deref();
Q_ASSERT(d_1_2_Core->refs.load());
if (d_1_3_Core)
d_1_3_Core->refs.deref();
Q_ASSERT(d_1_3_Core->refs.load());
if (d_1_4_Core)
d_1_4_Core->refs.deref();
Q_ASSERT(d_1_4_Core->refs.load());
if (d_1_5_Core)
d_1_5_Core->refs.deref();
Q_ASSERT(d_1_5_Core->refs.load());
if (d_2_0_Core)
d_2_0_Core->refs.deref();
Q_ASSERT(d_2_0_Core->refs.load());
if (d_2_1_Core)
d_2_1_Core->refs.deref();
Q_ASSERT(d_2_1_Core->refs.load());
if (d_3_0_Core)
d_3_0_Core->refs.deref();
Q_ASSERT(d_3_0_Core->refs.load());
if (d_3_1_Core)
d_3_1_Core->refs.deref();
Q_ASSERT(d_3_1_Core->refs.load());
if (d_3_2_Core)
d_3_2_Core->refs.deref();
Q_ASSERT(d_3_2_Core->refs.load());
if (d_3_3_Core)
d_3_3_Core->refs.deref();
Q_ASSERT(d_3_3_Core->refs.load());
if (d_4_0_Core)
d_4_0_Core->refs.deref();
Q_ASSERT(d_4_0_Core->refs.load());
}
bool QOpenGLFunctions_4_0_Core::initializeOpenGLFunctions()
@ -155,106 +142,54 @@ bool QOpenGLFunctions_4_0_Core::initializeOpenGLFunctions()
// Function pointers in the backends are resolved at creation time
QOpenGLVersionFunctionsBackend* d = 0;
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus(), d);
}
d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus(), d);
}
d_1_1_Core = static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_2_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus(), d);
}
d_1_2_Core = static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_3_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus(), d);
}
d_1_3_Core = static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_4_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus(), d);
}
d_1_4_Core = static_cast<QOpenGLFunctions_1_4_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_5_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus(), d);
}
d_1_5_Core = static_cast<QOpenGLFunctions_1_5_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_2_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus(), d);
}
d_2_0_Core = static_cast<QOpenGLFunctions_2_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_2_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus(), d);
}
d_2_1_Core = static_cast<QOpenGLFunctions_2_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus(), d);
}
d_3_0_Core = static_cast<QOpenGLFunctions_3_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus(), d);
}
d_3_1_Core = static_cast<QOpenGLFunctions_3_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_2_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus(), d);
}
d_3_2_Core = static_cast<QOpenGLFunctions_3_2_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_3_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus(), d);
}
d_3_3_Core = static_cast<QOpenGLFunctions_3_3_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_4_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_0_CoreBackend::versionStatus(), d);
}
d_4_0_Core = static_cast<QOpenGLFunctions_4_0_CoreBackend*>(d);
d->refs.ref();

View File

@ -93,86 +93,66 @@ QOpenGLFunctions_4_1_Compatibility::QOpenGLFunctions_4_1_Compatibility()
QOpenGLFunctions_4_1_Compatibility::~QOpenGLFunctions_4_1_Compatibility()
{
if (d_1_0_Core && !d_1_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Core->context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
delete d_1_0_Core;
}
if (d_1_1_Core && !d_1_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Core->context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
delete d_1_1_Core;
}
if (d_1_2_Core && !d_1_2_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Core->context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
delete d_1_2_Core;
}
if (d_1_3_Core && !d_1_3_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Core->context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
delete d_1_3_Core;
}
if (d_1_4_Core && !d_1_4_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Core->context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
delete d_1_4_Core;
}
if (d_1_5_Core && !d_1_5_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_5_Core->context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
delete d_1_5_Core;
}
if (d_2_0_Core && !d_2_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_0_Core->context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
delete d_2_0_Core;
}
if (d_2_1_Core && !d_2_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_1_Core->context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
delete d_2_1_Core;
}
if (d_3_0_Core && !d_3_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_0_Core->context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
delete d_3_0_Core;
}
if (d_3_1_Core && !d_3_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_1_Core->context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());
delete d_3_1_Core;
}
if (d_3_2_Core && !d_3_2_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_2_Core->context, QOpenGLFunctions_3_2_CoreBackend::versionStatus());
delete d_3_2_Core;
}
if (d_3_3_Core && !d_3_3_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_3_Core->context, QOpenGLFunctions_3_3_CoreBackend::versionStatus());
delete d_3_3_Core;
}
if (d_4_0_Core && !d_4_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_0_Core->context, QOpenGLFunctions_4_0_CoreBackend::versionStatus());
delete d_4_0_Core;
}
if (d_4_1_Core && !d_4_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_1_Core->context, QOpenGLFunctions_4_1_CoreBackend::versionStatus());
delete d_4_1_Core;
}
if (d_1_0_Deprecated && !d_1_0_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Deprecated->context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());
delete d_1_0_Deprecated;
}
if (d_1_1_Deprecated && !d_1_1_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Deprecated->context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());
delete d_1_1_Deprecated;
}
if (d_1_2_Deprecated && !d_1_2_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Deprecated->context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus());
delete d_1_2_Deprecated;
}
if (d_1_3_Deprecated && !d_1_3_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Deprecated->context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus());
delete d_1_3_Deprecated;
}
if (d_1_4_Deprecated && !d_1_4_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Deprecated->context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus());
delete d_1_4_Deprecated;
}
if (d_3_3_Deprecated && !d_3_3_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_3_Deprecated->context, QOpenGLFunctions_3_3_DeprecatedBackend::versionStatus());
delete d_3_3_Deprecated;
}
if (d_1_0_Core)
d_1_0_Core->refs.deref();
Q_ASSERT(d_1_0_Core->refs.load());
if (d_1_1_Core)
d_1_1_Core->refs.deref();
Q_ASSERT(d_1_1_Core->refs.load());
if (d_1_2_Core)
d_1_2_Core->refs.deref();
Q_ASSERT(d_1_2_Core->refs.load());
if (d_1_3_Core)
d_1_3_Core->refs.deref();
Q_ASSERT(d_1_3_Core->refs.load());
if (d_1_4_Core)
d_1_4_Core->refs.deref();
Q_ASSERT(d_1_4_Core->refs.load());
if (d_1_5_Core)
d_1_5_Core->refs.deref();
Q_ASSERT(d_1_5_Core->refs.load());
if (d_2_0_Core)
d_2_0_Core->refs.deref();
Q_ASSERT(d_2_0_Core->refs.load());
if (d_2_1_Core)
d_2_1_Core->refs.deref();
Q_ASSERT(d_2_1_Core->refs.load());
if (d_3_0_Core)
d_3_0_Core->refs.deref();
Q_ASSERT(d_3_0_Core->refs.load());
if (d_3_1_Core)
d_3_1_Core->refs.deref();
Q_ASSERT(d_3_1_Core->refs.load());
if (d_3_2_Core)
d_3_2_Core->refs.deref();
Q_ASSERT(d_3_2_Core->refs.load());
if (d_3_3_Core)
d_3_3_Core->refs.deref();
Q_ASSERT(d_3_3_Core->refs.load());
if (d_4_0_Core)
d_4_0_Core->refs.deref();
Q_ASSERT(d_4_0_Core->refs.load());
if (d_4_1_Core)
d_4_1_Core->refs.deref();
Q_ASSERT(d_4_1_Core->refs.load());
if (d_1_0_Deprecated)
d_1_0_Deprecated->refs.deref();
Q_ASSERT(d_1_0_Deprecated->refs.load());
if (d_1_1_Deprecated)
d_1_1_Deprecated->refs.deref();
Q_ASSERT(d_1_1_Deprecated->refs.load());
if (d_1_2_Deprecated)
d_1_2_Deprecated->refs.deref();
Q_ASSERT(d_1_2_Deprecated->refs.load());
if (d_1_3_Deprecated)
d_1_3_Deprecated->refs.deref();
Q_ASSERT(d_1_3_Deprecated->refs.load());
if (d_1_4_Deprecated)
d_1_4_Deprecated->refs.deref();
Q_ASSERT(d_1_4_Deprecated->refs.load());
if (d_3_3_Deprecated)
d_3_3_Deprecated->refs.deref();
Q_ASSERT(d_3_3_Deprecated->refs.load());
}
bool QOpenGLFunctions_4_1_Compatibility::initializeOpenGLFunctions()
@ -191,162 +171,82 @@ bool QOpenGLFunctions_4_1_Compatibility::initializeOpenGLFunctions()
// Function pointers in the backends are resolved at creation time
QOpenGLVersionFunctionsBackend* d = 0;
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus(), d);
}
d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus(), d);
}
d_1_1_Core = static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_2_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus(), d);
}
d_1_2_Core = static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_3_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus(), d);
}
d_1_3_Core = static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_4_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus(), d);
}
d_1_4_Core = static_cast<QOpenGLFunctions_1_4_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_5_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus(), d);
}
d_1_5_Core = static_cast<QOpenGLFunctions_1_5_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_2_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus(), d);
}
d_2_0_Core = static_cast<QOpenGLFunctions_2_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_2_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus(), d);
}
d_2_1_Core = static_cast<QOpenGLFunctions_2_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus(), d);
}
d_3_0_Core = static_cast<QOpenGLFunctions_3_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus(), d);
}
d_3_1_Core = static_cast<QOpenGLFunctions_3_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_2_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus(), d);
}
d_3_2_Core = static_cast<QOpenGLFunctions_3_2_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_3_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus(), d);
}
d_3_3_Core = static_cast<QOpenGLFunctions_3_3_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_4_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_0_CoreBackend::versionStatus(), d);
}
d_4_0_Core = static_cast<QOpenGLFunctions_4_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_4_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_1_CoreBackend::versionStatus(), d);
}
d_4_1_Core = static_cast<QOpenGLFunctions_4_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_0_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus(), d);
}
d_1_0_Deprecated = static_cast<QOpenGLFunctions_1_0_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_1_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus(), d);
}
d_1_1_Deprecated = static_cast<QOpenGLFunctions_1_1_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_2_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus(), d);
}
d_1_2_Deprecated = static_cast<QOpenGLFunctions_1_2_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_3_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus(), d);
}
d_1_3_Deprecated = static_cast<QOpenGLFunctions_1_3_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_4_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus(), d);
}
d_1_4_Deprecated = static_cast<QOpenGLFunctions_1_4_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_3_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_3_DeprecatedBackend::versionStatus(), d);
}
d_3_3_Deprecated = static_cast<QOpenGLFunctions_3_3_DeprecatedBackend*>(d);
d->refs.ref();

View File

@ -86,62 +86,48 @@ QOpenGLFunctions_4_1_Core::QOpenGLFunctions_4_1_Core()
QOpenGLFunctions_4_1_Core::~QOpenGLFunctions_4_1_Core()
{
if (d_1_0_Core && !d_1_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Core->context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
delete d_1_0_Core;
}
if (d_1_1_Core && !d_1_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Core->context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
delete d_1_1_Core;
}
if (d_1_2_Core && !d_1_2_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Core->context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
delete d_1_2_Core;
}
if (d_1_3_Core && !d_1_3_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Core->context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
delete d_1_3_Core;
}
if (d_1_4_Core && !d_1_4_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Core->context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
delete d_1_4_Core;
}
if (d_1_5_Core && !d_1_5_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_5_Core->context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
delete d_1_5_Core;
}
if (d_2_0_Core && !d_2_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_0_Core->context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
delete d_2_0_Core;
}
if (d_2_1_Core && !d_2_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_1_Core->context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
delete d_2_1_Core;
}
if (d_3_0_Core && !d_3_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_0_Core->context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
delete d_3_0_Core;
}
if (d_3_1_Core && !d_3_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_1_Core->context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());
delete d_3_1_Core;
}
if (d_3_2_Core && !d_3_2_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_2_Core->context, QOpenGLFunctions_3_2_CoreBackend::versionStatus());
delete d_3_2_Core;
}
if (d_3_3_Core && !d_3_3_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_3_Core->context, QOpenGLFunctions_3_3_CoreBackend::versionStatus());
delete d_3_3_Core;
}
if (d_4_0_Core && !d_4_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_0_Core->context, QOpenGLFunctions_4_0_CoreBackend::versionStatus());
delete d_4_0_Core;
}
if (d_4_1_Core && !d_4_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_1_Core->context, QOpenGLFunctions_4_1_CoreBackend::versionStatus());
delete d_4_1_Core;
}
if (d_1_0_Core)
d_1_0_Core->refs.deref();
Q_ASSERT(d_1_0_Core->refs.load());
if (d_1_1_Core)
d_1_1_Core->refs.deref();
Q_ASSERT(d_1_1_Core->refs.load());
if (d_1_2_Core)
d_1_2_Core->refs.deref();
Q_ASSERT(d_1_2_Core->refs.load());
if (d_1_3_Core)
d_1_3_Core->refs.deref();
Q_ASSERT(d_1_3_Core->refs.load());
if (d_1_4_Core)
d_1_4_Core->refs.deref();
Q_ASSERT(d_1_4_Core->refs.load());
if (d_1_5_Core)
d_1_5_Core->refs.deref();
Q_ASSERT(d_1_5_Core->refs.load());
if (d_2_0_Core)
d_2_0_Core->refs.deref();
Q_ASSERT(d_2_0_Core->refs.load());
if (d_2_1_Core)
d_2_1_Core->refs.deref();
Q_ASSERT(d_2_1_Core->refs.load());
if (d_3_0_Core)
d_3_0_Core->refs.deref();
Q_ASSERT(d_3_0_Core->refs.load());
if (d_3_1_Core)
d_3_1_Core->refs.deref();
Q_ASSERT(d_3_1_Core->refs.load());
if (d_3_2_Core)
d_3_2_Core->refs.deref();
Q_ASSERT(d_3_2_Core->refs.load());
if (d_3_3_Core)
d_3_3_Core->refs.deref();
Q_ASSERT(d_3_3_Core->refs.load());
if (d_4_0_Core)
d_4_0_Core->refs.deref();
Q_ASSERT(d_4_0_Core->refs.load());
if (d_4_1_Core)
d_4_1_Core->refs.deref();
Q_ASSERT(d_4_1_Core->refs.load());
}
bool QOpenGLFunctions_4_1_Core::initializeOpenGLFunctions()
@ -160,114 +146,58 @@ bool QOpenGLFunctions_4_1_Core::initializeOpenGLFunctions()
// Function pointers in the backends are resolved at creation time
QOpenGLVersionFunctionsBackend* d = 0;
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus(), d);
}
d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus(), d);
}
d_1_1_Core = static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_2_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus(), d);
}
d_1_2_Core = static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_3_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus(), d);
}
d_1_3_Core = static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_4_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus(), d);
}
d_1_4_Core = static_cast<QOpenGLFunctions_1_4_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_5_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus(), d);
}
d_1_5_Core = static_cast<QOpenGLFunctions_1_5_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_2_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus(), d);
}
d_2_0_Core = static_cast<QOpenGLFunctions_2_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_2_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus(), d);
}
d_2_1_Core = static_cast<QOpenGLFunctions_2_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus(), d);
}
d_3_0_Core = static_cast<QOpenGLFunctions_3_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus(), d);
}
d_3_1_Core = static_cast<QOpenGLFunctions_3_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_2_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus(), d);
}
d_3_2_Core = static_cast<QOpenGLFunctions_3_2_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_3_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus(), d);
}
d_3_3_Core = static_cast<QOpenGLFunctions_3_3_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_4_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_0_CoreBackend::versionStatus(), d);
}
d_4_0_Core = static_cast<QOpenGLFunctions_4_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_4_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_1_CoreBackend::versionStatus(), d);
}
d_4_1_Core = static_cast<QOpenGLFunctions_4_1_CoreBackend*>(d);
d->refs.ref();

View File

@ -94,90 +94,69 @@ QOpenGLFunctions_4_2_Compatibility::QOpenGLFunctions_4_2_Compatibility()
QOpenGLFunctions_4_2_Compatibility::~QOpenGLFunctions_4_2_Compatibility()
{
if (d_1_0_Core && !d_1_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Core->context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
delete d_1_0_Core;
}
if (d_1_1_Core && !d_1_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Core->context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
delete d_1_1_Core;
}
if (d_1_2_Core && !d_1_2_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Core->context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
delete d_1_2_Core;
}
if (d_1_3_Core && !d_1_3_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Core->context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
delete d_1_3_Core;
}
if (d_1_4_Core && !d_1_4_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Core->context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
delete d_1_4_Core;
}
if (d_1_5_Core && !d_1_5_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_5_Core->context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
delete d_1_5_Core;
}
if (d_2_0_Core && !d_2_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_0_Core->context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
delete d_2_0_Core;
}
if (d_2_1_Core && !d_2_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_1_Core->context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
delete d_2_1_Core;
}
if (d_3_0_Core && !d_3_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_0_Core->context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
delete d_3_0_Core;
}
if (d_3_1_Core && !d_3_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_1_Core->context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());
delete d_3_1_Core;
}
if (d_3_2_Core && !d_3_2_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_2_Core->context, QOpenGLFunctions_3_2_CoreBackend::versionStatus());
delete d_3_2_Core;
}
if (d_3_3_Core && !d_3_3_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_3_Core->context, QOpenGLFunctions_3_3_CoreBackend::versionStatus());
delete d_3_3_Core;
}
if (d_4_0_Core && !d_4_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_0_Core->context, QOpenGLFunctions_4_0_CoreBackend::versionStatus());
delete d_4_0_Core;
}
if (d_4_1_Core && !d_4_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_1_Core->context, QOpenGLFunctions_4_1_CoreBackend::versionStatus());
delete d_4_1_Core;
}
if (d_4_2_Core && !d_4_2_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_2_Core->context, QOpenGLFunctions_4_2_CoreBackend::versionStatus());
delete d_4_2_Core;
}
if (d_1_0_Deprecated && !d_1_0_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Deprecated->context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());
delete d_1_0_Deprecated;
}
if (d_1_1_Deprecated && !d_1_1_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Deprecated->context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());
delete d_1_1_Deprecated;
}
if (d_1_2_Deprecated && !d_1_2_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Deprecated->context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus());
delete d_1_2_Deprecated;
}
if (d_1_3_Deprecated && !d_1_3_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Deprecated->context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus());
delete d_1_3_Deprecated;
}
if (d_1_4_Deprecated && !d_1_4_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Deprecated->context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus());
delete d_1_4_Deprecated;
}
if (d_3_3_Deprecated && !d_3_3_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_3_Deprecated->context, QOpenGLFunctions_3_3_DeprecatedBackend::versionStatus());
delete d_3_3_Deprecated;
}
if (d_1_0_Core)
d_1_0_Core->refs.deref();
Q_ASSERT(d_1_0_Core->refs.load());
if (d_1_1_Core)
d_1_1_Core->refs.deref();
Q_ASSERT(d_1_1_Core->refs.load());
if (d_1_2_Core)
d_1_2_Core->refs.deref();
Q_ASSERT(d_1_2_Core->refs.load());
if (d_1_3_Core)
d_1_3_Core->refs.deref();
Q_ASSERT(d_1_3_Core->refs.load());
if (d_1_4_Core)
d_1_4_Core->refs.deref();
Q_ASSERT(d_1_4_Core->refs.load());
if (d_1_5_Core)
d_1_5_Core->refs.deref();
Q_ASSERT(d_1_5_Core->refs.load());
if (d_2_0_Core)
d_2_0_Core->refs.deref();
Q_ASSERT(d_2_0_Core->refs.load());
if (d_2_1_Core)
d_2_1_Core->refs.deref();
Q_ASSERT(d_2_1_Core->refs.load());
if (d_3_0_Core)
d_3_0_Core->refs.deref();
Q_ASSERT(d_3_0_Core->refs.load());
if (d_3_1_Core)
d_3_1_Core->refs.deref();
Q_ASSERT(d_3_1_Core->refs.load());
if (d_3_2_Core)
d_3_2_Core->refs.deref();
Q_ASSERT(d_3_2_Core->refs.load());
if (d_3_3_Core)
d_3_3_Core->refs.deref();
Q_ASSERT(d_3_3_Core->refs.load());
if (d_4_0_Core)
d_4_0_Core->refs.deref();
Q_ASSERT(d_4_0_Core->refs.load());
if (d_4_1_Core)
d_4_1_Core->refs.deref();
Q_ASSERT(d_4_1_Core->refs.load());
if (d_4_2_Core)
d_4_2_Core->refs.deref();
Q_ASSERT(d_4_2_Core->refs.load());
if (d_1_0_Deprecated)
d_1_0_Deprecated->refs.deref();
Q_ASSERT(d_1_0_Deprecated->refs.load());
if (d_1_1_Deprecated)
d_1_1_Deprecated->refs.deref();
Q_ASSERT(d_1_1_Deprecated->refs.load());
if (d_1_2_Deprecated)
d_1_2_Deprecated->refs.deref();
Q_ASSERT(d_1_2_Deprecated->refs.load());
if (d_1_3_Deprecated)
d_1_3_Deprecated->refs.deref();
Q_ASSERT(d_1_3_Deprecated->refs.load());
if (d_1_4_Deprecated)
d_1_4_Deprecated->refs.deref();
Q_ASSERT(d_1_4_Deprecated->refs.load());
if (d_3_3_Deprecated)
d_3_3_Deprecated->refs.deref();
Q_ASSERT(d_3_3_Deprecated->refs.load());
}
bool QOpenGLFunctions_4_2_Compatibility::initializeOpenGLFunctions()
@ -196,170 +175,86 @@ bool QOpenGLFunctions_4_2_Compatibility::initializeOpenGLFunctions()
// Function pointers in the backends are resolved at creation time
QOpenGLVersionFunctionsBackend* d = 0;
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus(), d);
}
d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus(), d);
}
d_1_1_Core = static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_2_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus(), d);
}
d_1_2_Core = static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_3_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus(), d);
}
d_1_3_Core = static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_4_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus(), d);
}
d_1_4_Core = static_cast<QOpenGLFunctions_1_4_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_5_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus(), d);
}
d_1_5_Core = static_cast<QOpenGLFunctions_1_5_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_2_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus(), d);
}
d_2_0_Core = static_cast<QOpenGLFunctions_2_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_2_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus(), d);
}
d_2_1_Core = static_cast<QOpenGLFunctions_2_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus(), d);
}
d_3_0_Core = static_cast<QOpenGLFunctions_3_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus(), d);
}
d_3_1_Core = static_cast<QOpenGLFunctions_3_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_2_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus(), d);
}
d_3_2_Core = static_cast<QOpenGLFunctions_3_2_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_3_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus(), d);
}
d_3_3_Core = static_cast<QOpenGLFunctions_3_3_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_4_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_0_CoreBackend::versionStatus(), d);
}
d_4_0_Core = static_cast<QOpenGLFunctions_4_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_4_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_1_CoreBackend::versionStatus(), d);
}
d_4_1_Core = static_cast<QOpenGLFunctions_4_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_2_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_4_2_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_2_CoreBackend::versionStatus(), d);
}
d_4_2_Core = static_cast<QOpenGLFunctions_4_2_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_0_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus(), d);
}
d_1_0_Deprecated = static_cast<QOpenGLFunctions_1_0_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_1_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus(), d);
}
d_1_1_Deprecated = static_cast<QOpenGLFunctions_1_1_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_2_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus(), d);
}
d_1_2_Deprecated = static_cast<QOpenGLFunctions_1_2_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_3_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus(), d);
}
d_1_3_Deprecated = static_cast<QOpenGLFunctions_1_3_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_4_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus(), d);
}
d_1_4_Deprecated = static_cast<QOpenGLFunctions_1_4_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_3_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_3_DeprecatedBackend::versionStatus(), d);
}
d_3_3_Deprecated = static_cast<QOpenGLFunctions_3_3_DeprecatedBackend*>(d);
d->refs.ref();

View File

@ -87,66 +87,51 @@ QOpenGLFunctions_4_2_Core::QOpenGLFunctions_4_2_Core()
QOpenGLFunctions_4_2_Core::~QOpenGLFunctions_4_2_Core()
{
if (d_1_0_Core && !d_1_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Core->context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
delete d_1_0_Core;
}
if (d_1_1_Core && !d_1_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Core->context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
delete d_1_1_Core;
}
if (d_1_2_Core && !d_1_2_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Core->context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
delete d_1_2_Core;
}
if (d_1_3_Core && !d_1_3_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Core->context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
delete d_1_3_Core;
}
if (d_1_4_Core && !d_1_4_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Core->context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
delete d_1_4_Core;
}
if (d_1_5_Core && !d_1_5_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_5_Core->context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
delete d_1_5_Core;
}
if (d_2_0_Core && !d_2_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_0_Core->context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
delete d_2_0_Core;
}
if (d_2_1_Core && !d_2_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_1_Core->context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
delete d_2_1_Core;
}
if (d_3_0_Core && !d_3_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_0_Core->context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
delete d_3_0_Core;
}
if (d_3_1_Core && !d_3_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_1_Core->context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());
delete d_3_1_Core;
}
if (d_3_2_Core && !d_3_2_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_2_Core->context, QOpenGLFunctions_3_2_CoreBackend::versionStatus());
delete d_3_2_Core;
}
if (d_3_3_Core && !d_3_3_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_3_Core->context, QOpenGLFunctions_3_3_CoreBackend::versionStatus());
delete d_3_3_Core;
}
if (d_4_0_Core && !d_4_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_0_Core->context, QOpenGLFunctions_4_0_CoreBackend::versionStatus());
delete d_4_0_Core;
}
if (d_4_1_Core && !d_4_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_1_Core->context, QOpenGLFunctions_4_1_CoreBackend::versionStatus());
delete d_4_1_Core;
}
if (d_4_2_Core && !d_4_2_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_2_Core->context, QOpenGLFunctions_4_2_CoreBackend::versionStatus());
delete d_4_2_Core;
}
if (d_1_0_Core)
d_1_0_Core->refs.deref();
Q_ASSERT(d_1_0_Core->refs.load());
if (d_1_1_Core)
d_1_1_Core->refs.deref();
Q_ASSERT(d_1_1_Core->refs.load());
if (d_1_2_Core)
d_1_2_Core->refs.deref();
Q_ASSERT(d_1_2_Core->refs.load());
if (d_1_3_Core)
d_1_3_Core->refs.deref();
Q_ASSERT(d_1_3_Core->refs.load());
if (d_1_4_Core)
d_1_4_Core->refs.deref();
Q_ASSERT(d_1_4_Core->refs.load());
if (d_1_5_Core)
d_1_5_Core->refs.deref();
Q_ASSERT(d_1_5_Core->refs.load());
if (d_2_0_Core)
d_2_0_Core->refs.deref();
Q_ASSERT(d_2_0_Core->refs.load());
if (d_2_1_Core)
d_2_1_Core->refs.deref();
Q_ASSERT(d_2_1_Core->refs.load());
if (d_3_0_Core)
d_3_0_Core->refs.deref();
Q_ASSERT(d_3_0_Core->refs.load());
if (d_3_1_Core)
d_3_1_Core->refs.deref();
Q_ASSERT(d_3_1_Core->refs.load());
if (d_3_2_Core)
d_3_2_Core->refs.deref();
Q_ASSERT(d_3_2_Core->refs.load());
if (d_3_3_Core)
d_3_3_Core->refs.deref();
Q_ASSERT(d_3_3_Core->refs.load());
if (d_4_0_Core)
d_4_0_Core->refs.deref();
Q_ASSERT(d_4_0_Core->refs.load());
if (d_4_1_Core)
d_4_1_Core->refs.deref();
Q_ASSERT(d_4_1_Core->refs.load());
if (d_4_2_Core)
d_4_2_Core->refs.deref();
Q_ASSERT(d_4_2_Core->refs.load());
}
bool QOpenGLFunctions_4_2_Core::initializeOpenGLFunctions()
@ -165,122 +150,62 @@ bool QOpenGLFunctions_4_2_Core::initializeOpenGLFunctions()
// Function pointers in the backends are resolved at creation time
QOpenGLVersionFunctionsBackend* d = 0;
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus(), d);
}
d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus(), d);
}
d_1_1_Core = static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_2_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus(), d);
}
d_1_2_Core = static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_3_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus(), d);
}
d_1_3_Core = static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_4_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus(), d);
}
d_1_4_Core = static_cast<QOpenGLFunctions_1_4_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_5_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus(), d);
}
d_1_5_Core = static_cast<QOpenGLFunctions_1_5_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_2_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus(), d);
}
d_2_0_Core = static_cast<QOpenGLFunctions_2_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_2_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus(), d);
}
d_2_1_Core = static_cast<QOpenGLFunctions_2_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus(), d);
}
d_3_0_Core = static_cast<QOpenGLFunctions_3_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus(), d);
}
d_3_1_Core = static_cast<QOpenGLFunctions_3_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_2_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus(), d);
}
d_3_2_Core = static_cast<QOpenGLFunctions_3_2_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_3_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus(), d);
}
d_3_3_Core = static_cast<QOpenGLFunctions_3_3_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_4_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_0_CoreBackend::versionStatus(), d);
}
d_4_0_Core = static_cast<QOpenGLFunctions_4_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_4_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_1_CoreBackend::versionStatus(), d);
}
d_4_1_Core = static_cast<QOpenGLFunctions_4_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_2_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_4_2_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_2_CoreBackend::versionStatus(), d);
}
d_4_2_Core = static_cast<QOpenGLFunctions_4_2_CoreBackend*>(d);
d->refs.ref();

View File

@ -95,94 +95,72 @@ QOpenGLFunctions_4_3_Compatibility::QOpenGLFunctions_4_3_Compatibility()
QOpenGLFunctions_4_3_Compatibility::~QOpenGLFunctions_4_3_Compatibility()
{
if (d_1_0_Core && !d_1_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Core->context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
delete d_1_0_Core;
}
if (d_1_1_Core && !d_1_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Core->context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
delete d_1_1_Core;
}
if (d_1_2_Core && !d_1_2_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Core->context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
delete d_1_2_Core;
}
if (d_1_3_Core && !d_1_3_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Core->context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
delete d_1_3_Core;
}
if (d_1_4_Core && !d_1_4_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Core->context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
delete d_1_4_Core;
}
if (d_1_5_Core && !d_1_5_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_5_Core->context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
delete d_1_5_Core;
}
if (d_2_0_Core && !d_2_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_0_Core->context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
delete d_2_0_Core;
}
if (d_2_1_Core && !d_2_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_1_Core->context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
delete d_2_1_Core;
}
if (d_3_0_Core && !d_3_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_0_Core->context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
delete d_3_0_Core;
}
if (d_3_1_Core && !d_3_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_1_Core->context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());
delete d_3_1_Core;
}
if (d_3_2_Core && !d_3_2_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_2_Core->context, QOpenGLFunctions_3_2_CoreBackend::versionStatus());
delete d_3_2_Core;
}
if (d_3_3_Core && !d_3_3_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_3_Core->context, QOpenGLFunctions_3_3_CoreBackend::versionStatus());
delete d_3_3_Core;
}
if (d_4_0_Core && !d_4_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_0_Core->context, QOpenGLFunctions_4_0_CoreBackend::versionStatus());
delete d_4_0_Core;
}
if (d_4_1_Core && !d_4_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_1_Core->context, QOpenGLFunctions_4_1_CoreBackend::versionStatus());
delete d_4_1_Core;
}
if (d_4_2_Core && !d_4_2_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_2_Core->context, QOpenGLFunctions_4_2_CoreBackend::versionStatus());
delete d_4_2_Core;
}
if (d_4_3_Core && !d_4_3_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_3_Core->context, QOpenGLFunctions_4_3_CoreBackend::versionStatus());
delete d_4_3_Core;
}
if (d_1_0_Deprecated && !d_1_0_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Deprecated->context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());
delete d_1_0_Deprecated;
}
if (d_1_1_Deprecated && !d_1_1_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Deprecated->context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());
delete d_1_1_Deprecated;
}
if (d_1_2_Deprecated && !d_1_2_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Deprecated->context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus());
delete d_1_2_Deprecated;
}
if (d_1_3_Deprecated && !d_1_3_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Deprecated->context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus());
delete d_1_3_Deprecated;
}
if (d_1_4_Deprecated && !d_1_4_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Deprecated->context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus());
delete d_1_4_Deprecated;
}
if (d_3_3_Deprecated && !d_3_3_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_3_Deprecated->context, QOpenGLFunctions_3_3_DeprecatedBackend::versionStatus());
delete d_3_3_Deprecated;
}
if (d_1_0_Core)
d_1_0_Core->refs.deref();
Q_ASSERT(d_1_0_Core->refs.load());
if (d_1_1_Core)
d_1_1_Core->refs.deref();
Q_ASSERT(d_1_1_Core->refs.load());
if (d_1_2_Core)
d_1_2_Core->refs.deref();
Q_ASSERT(d_1_2_Core->refs.load());
if (d_1_3_Core)
d_1_3_Core->refs.deref();
Q_ASSERT(d_1_3_Core->refs.load());
if (d_1_4_Core)
d_1_4_Core->refs.deref();
Q_ASSERT(d_1_4_Core->refs.load());
if (d_1_5_Core)
d_1_5_Core->refs.deref();
Q_ASSERT(d_1_5_Core->refs.load());
if (d_2_0_Core)
d_2_0_Core->refs.deref();
Q_ASSERT(d_2_0_Core->refs.load());
if (d_2_1_Core)
d_2_1_Core->refs.deref();
Q_ASSERT(d_2_1_Core->refs.load());
if (d_3_0_Core)
d_3_0_Core->refs.deref();
Q_ASSERT(d_3_0_Core->refs.load());
if (d_3_1_Core)
d_3_1_Core->refs.deref();
Q_ASSERT(d_3_1_Core->refs.load());
if (d_3_2_Core)
d_3_2_Core->refs.deref();
Q_ASSERT(d_3_2_Core->refs.load());
if (d_3_3_Core)
d_3_3_Core->refs.deref();
Q_ASSERT(d_3_3_Core->refs.load());
if (d_4_0_Core)
d_4_0_Core->refs.deref();
Q_ASSERT(d_4_0_Core->refs.load());
if (d_4_1_Core)
d_4_1_Core->refs.deref();
Q_ASSERT(d_4_1_Core->refs.load());
if (d_4_2_Core)
d_4_2_Core->refs.deref();
Q_ASSERT(d_4_2_Core->refs.load());
if (d_4_3_Core)
d_4_3_Core->refs.deref();
Q_ASSERT(d_4_3_Core->refs.load());
if (d_1_0_Deprecated)
d_1_0_Deprecated->refs.deref();
Q_ASSERT(d_1_0_Deprecated->refs.load());
if (d_1_1_Deprecated)
d_1_1_Deprecated->refs.deref();
Q_ASSERT(d_1_1_Deprecated->refs.load());
if (d_1_2_Deprecated)
d_1_2_Deprecated->refs.deref();
Q_ASSERT(d_1_2_Deprecated->refs.load());
if (d_1_3_Deprecated)
d_1_3_Deprecated->refs.deref();
Q_ASSERT(d_1_3_Deprecated->refs.load());
if (d_1_4_Deprecated)
d_1_4_Deprecated->refs.deref();
Q_ASSERT(d_1_4_Deprecated->refs.load());
if (d_3_3_Deprecated)
d_3_3_Deprecated->refs.deref();
Q_ASSERT(d_3_3_Deprecated->refs.load());
}
bool QOpenGLFunctions_4_3_Compatibility::initializeOpenGLFunctions()
@ -201,178 +179,90 @@ bool QOpenGLFunctions_4_3_Compatibility::initializeOpenGLFunctions()
// Function pointers in the backends are resolved at creation time
QOpenGLVersionFunctionsBackend* d = 0;
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus(), d);
}
d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus(), d);
}
d_1_1_Core = static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_2_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus(), d);
}
d_1_2_Core = static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_3_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus(), d);
}
d_1_3_Core = static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_4_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus(), d);
}
d_1_4_Core = static_cast<QOpenGLFunctions_1_4_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_5_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus(), d);
}
d_1_5_Core = static_cast<QOpenGLFunctions_1_5_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_2_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus(), d);
}
d_2_0_Core = static_cast<QOpenGLFunctions_2_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_2_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus(), d);
}
d_2_1_Core = static_cast<QOpenGLFunctions_2_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus(), d);
}
d_3_0_Core = static_cast<QOpenGLFunctions_3_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus(), d);
}
d_3_1_Core = static_cast<QOpenGLFunctions_3_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_2_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus(), d);
}
d_3_2_Core = static_cast<QOpenGLFunctions_3_2_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_3_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus(), d);
}
d_3_3_Core = static_cast<QOpenGLFunctions_3_3_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_4_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_0_CoreBackend::versionStatus(), d);
}
d_4_0_Core = static_cast<QOpenGLFunctions_4_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_4_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_1_CoreBackend::versionStatus(), d);
}
d_4_1_Core = static_cast<QOpenGLFunctions_4_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_2_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_4_2_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_2_CoreBackend::versionStatus(), d);
}
d_4_2_Core = static_cast<QOpenGLFunctions_4_2_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_3_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_4_3_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_3_CoreBackend::versionStatus(), d);
}
d_4_3_Core = static_cast<QOpenGLFunctions_4_3_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_0_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus(), d);
}
d_1_0_Deprecated = static_cast<QOpenGLFunctions_1_0_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_1_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus(), d);
}
d_1_1_Deprecated = static_cast<QOpenGLFunctions_1_1_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_2_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus(), d);
}
d_1_2_Deprecated = static_cast<QOpenGLFunctions_1_2_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_3_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus(), d);
}
d_1_3_Deprecated = static_cast<QOpenGLFunctions_1_3_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_4_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus(), d);
}
d_1_4_Deprecated = static_cast<QOpenGLFunctions_1_4_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_3_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_3_DeprecatedBackend::versionStatus(), d);
}
d_3_3_Deprecated = static_cast<QOpenGLFunctions_3_3_DeprecatedBackend*>(d);
d->refs.ref();

View File

@ -88,70 +88,54 @@ QOpenGLFunctions_4_3_Core::QOpenGLFunctions_4_3_Core()
QOpenGLFunctions_4_3_Core::~QOpenGLFunctions_4_3_Core()
{
if (d_1_0_Core && !d_1_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Core->context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
delete d_1_0_Core;
}
if (d_1_1_Core && !d_1_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Core->context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
delete d_1_1_Core;
}
if (d_1_2_Core && !d_1_2_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Core->context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
delete d_1_2_Core;
}
if (d_1_3_Core && !d_1_3_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Core->context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
delete d_1_3_Core;
}
if (d_1_4_Core && !d_1_4_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Core->context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
delete d_1_4_Core;
}
if (d_1_5_Core && !d_1_5_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_5_Core->context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
delete d_1_5_Core;
}
if (d_2_0_Core && !d_2_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_0_Core->context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
delete d_2_0_Core;
}
if (d_2_1_Core && !d_2_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_1_Core->context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
delete d_2_1_Core;
}
if (d_3_0_Core && !d_3_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_0_Core->context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
delete d_3_0_Core;
}
if (d_3_1_Core && !d_3_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_1_Core->context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());
delete d_3_1_Core;
}
if (d_3_2_Core && !d_3_2_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_2_Core->context, QOpenGLFunctions_3_2_CoreBackend::versionStatus());
delete d_3_2_Core;
}
if (d_3_3_Core && !d_3_3_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_3_Core->context, QOpenGLFunctions_3_3_CoreBackend::versionStatus());
delete d_3_3_Core;
}
if (d_4_0_Core && !d_4_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_0_Core->context, QOpenGLFunctions_4_0_CoreBackend::versionStatus());
delete d_4_0_Core;
}
if (d_4_1_Core && !d_4_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_1_Core->context, QOpenGLFunctions_4_1_CoreBackend::versionStatus());
delete d_4_1_Core;
}
if (d_4_2_Core && !d_4_2_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_2_Core->context, QOpenGLFunctions_4_2_CoreBackend::versionStatus());
delete d_4_2_Core;
}
if (d_4_3_Core && !d_4_3_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_3_Core->context, QOpenGLFunctions_4_3_CoreBackend::versionStatus());
delete d_4_3_Core;
}
if (d_1_0_Core)
d_1_0_Core->refs.deref();
Q_ASSERT(d_1_0_Core->refs.load());
if (d_1_1_Core)
d_1_1_Core->refs.deref();
Q_ASSERT(d_1_1_Core->refs.load());
if (d_1_2_Core)
d_1_2_Core->refs.deref();
Q_ASSERT(d_1_2_Core->refs.load());
if (d_1_3_Core)
d_1_3_Core->refs.deref();
Q_ASSERT(d_1_3_Core->refs.load());
if (d_1_4_Core)
d_1_4_Core->refs.deref();
Q_ASSERT(d_1_4_Core->refs.load());
if (d_1_5_Core)
d_1_5_Core->refs.deref();
Q_ASSERT(d_1_5_Core->refs.load());
if (d_2_0_Core)
d_2_0_Core->refs.deref();
Q_ASSERT(d_2_0_Core->refs.load());
if (d_2_1_Core)
d_2_1_Core->refs.deref();
Q_ASSERT(d_2_1_Core->refs.load());
if (d_3_0_Core)
d_3_0_Core->refs.deref();
Q_ASSERT(d_3_0_Core->refs.load());
if (d_3_1_Core)
d_3_1_Core->refs.deref();
Q_ASSERT(d_3_1_Core->refs.load());
if (d_3_2_Core)
d_3_2_Core->refs.deref();
Q_ASSERT(d_3_2_Core->refs.load());
if (d_3_3_Core)
d_3_3_Core->refs.deref();
Q_ASSERT(d_3_3_Core->refs.load());
if (d_4_0_Core)
d_4_0_Core->refs.deref();
Q_ASSERT(d_4_0_Core->refs.load());
if (d_4_1_Core)
d_4_1_Core->refs.deref();
Q_ASSERT(d_4_1_Core->refs.load());
if (d_4_2_Core)
d_4_2_Core->refs.deref();
Q_ASSERT(d_4_2_Core->refs.load());
if (d_4_3_Core)
d_4_3_Core->refs.deref();
Q_ASSERT(d_4_3_Core->refs.load());
}
bool QOpenGLFunctions_4_3_Core::initializeOpenGLFunctions()
@ -170,130 +154,66 @@ bool QOpenGLFunctions_4_3_Core::initializeOpenGLFunctions()
// Function pointers in the backends are resolved at creation time
QOpenGLVersionFunctionsBackend* d = 0;
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus(), d);
}
d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus(), d);
}
d_1_1_Core = static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_2_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus(), d);
}
d_1_2_Core = static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_3_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus(), d);
}
d_1_3_Core = static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_4_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus(), d);
}
d_1_4_Core = static_cast<QOpenGLFunctions_1_4_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_5_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus(), d);
}
d_1_5_Core = static_cast<QOpenGLFunctions_1_5_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_2_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus(), d);
}
d_2_0_Core = static_cast<QOpenGLFunctions_2_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_2_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus(), d);
}
d_2_1_Core = static_cast<QOpenGLFunctions_2_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus(), d);
}
d_3_0_Core = static_cast<QOpenGLFunctions_3_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus(), d);
}
d_3_1_Core = static_cast<QOpenGLFunctions_3_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_2_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus(), d);
}
d_3_2_Core = static_cast<QOpenGLFunctions_3_2_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_3_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus(), d);
}
d_3_3_Core = static_cast<QOpenGLFunctions_3_3_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_4_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_0_CoreBackend::versionStatus(), d);
}
d_4_0_Core = static_cast<QOpenGLFunctions_4_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_4_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_1_CoreBackend::versionStatus(), d);
}
d_4_1_Core = static_cast<QOpenGLFunctions_4_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_2_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_4_2_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_2_CoreBackend::versionStatus(), d);
}
d_4_2_Core = static_cast<QOpenGLFunctions_4_2_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_3_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_4_3_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_3_CoreBackend::versionStatus(), d);
}
d_4_3_Core = static_cast<QOpenGLFunctions_4_3_CoreBackend*>(d);
d->refs.ref();

View File

@ -95,98 +95,75 @@ QOpenGLFunctions_4_4_Compatibility::QOpenGLFunctions_4_4_Compatibility()
QOpenGLFunctions_4_4_Compatibility::~QOpenGLFunctions_4_4_Compatibility()
{
if (d_1_0_Core && !d_1_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Core->context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
delete d_1_0_Core;
}
if (d_1_1_Core && !d_1_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Core->context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
delete d_1_1_Core;
}
if (d_1_2_Core && !d_1_2_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Core->context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
delete d_1_2_Core;
}
if (d_1_3_Core && !d_1_3_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Core->context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
delete d_1_3_Core;
}
if (d_1_4_Core && !d_1_4_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Core->context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
delete d_1_4_Core;
}
if (d_1_5_Core && !d_1_5_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_5_Core->context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
delete d_1_5_Core;
}
if (d_2_0_Core && !d_2_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_0_Core->context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
delete d_2_0_Core;
}
if (d_2_1_Core && !d_2_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_1_Core->context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
delete d_2_1_Core;
}
if (d_3_0_Core && !d_3_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_0_Core->context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
delete d_3_0_Core;
}
if (d_3_1_Core && !d_3_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_1_Core->context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());
delete d_3_1_Core;
}
if (d_3_2_Core && !d_3_2_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_2_Core->context, QOpenGLFunctions_3_2_CoreBackend::versionStatus());
delete d_3_2_Core;
}
if (d_3_3_Core && !d_3_3_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_3_Core->context, QOpenGLFunctions_3_3_CoreBackend::versionStatus());
delete d_3_3_Core;
}
if (d_4_0_Core && !d_4_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_0_Core->context, QOpenGLFunctions_4_0_CoreBackend::versionStatus());
delete d_4_0_Core;
}
if (d_4_1_Core && !d_4_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_1_Core->context, QOpenGLFunctions_4_1_CoreBackend::versionStatus());
delete d_4_1_Core;
}
if (d_4_2_Core && !d_4_2_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_2_Core->context, QOpenGLFunctions_4_2_CoreBackend::versionStatus());
delete d_4_2_Core;
}
if (d_4_3_Core && !d_4_3_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_3_Core->context, QOpenGLFunctions_4_3_CoreBackend::versionStatus());
delete d_4_3_Core;
}
if (d_4_4_Core && !d_4_4_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_4_Core->context, QOpenGLFunctions_4_4_CoreBackend::versionStatus());
delete d_4_4_Core;
}
if (d_1_0_Deprecated && !d_1_0_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Deprecated->context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());
delete d_1_0_Deprecated;
}
if (d_1_1_Deprecated && !d_1_1_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Deprecated->context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());
delete d_1_1_Deprecated;
}
if (d_1_2_Deprecated && !d_1_2_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Deprecated->context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus());
delete d_1_2_Deprecated;
}
if (d_1_3_Deprecated && !d_1_3_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Deprecated->context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus());
delete d_1_3_Deprecated;
}
if (d_1_4_Deprecated && !d_1_4_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Deprecated->context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus());
delete d_1_4_Deprecated;
}
if (d_3_3_Deprecated && !d_3_3_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_3_Deprecated->context, QOpenGLFunctions_3_3_DeprecatedBackend::versionStatus());
delete d_3_3_Deprecated;
}
if (d_1_0_Core)
d_1_0_Core->refs.deref();
Q_ASSERT(d_1_0_Core->refs.load());
if (d_1_1_Core)
d_1_1_Core->refs.deref();
Q_ASSERT(d_1_1_Core->refs.load());
if (d_1_2_Core)
d_1_2_Core->refs.deref();
Q_ASSERT(d_1_2_Core->refs.load());
if (d_1_3_Core)
d_1_3_Core->refs.deref();
Q_ASSERT(d_1_3_Core->refs.load());
if (d_1_4_Core)
d_1_4_Core->refs.deref();
Q_ASSERT(d_1_4_Core->refs.load());
if (d_1_5_Core)
d_1_5_Core->refs.deref();
Q_ASSERT(d_1_5_Core->refs.load());
if (d_2_0_Core)
d_2_0_Core->refs.deref();
Q_ASSERT(d_2_0_Core->refs.load());
if (d_2_1_Core)
d_2_1_Core->refs.deref();
Q_ASSERT(d_2_1_Core->refs.load());
if (d_3_0_Core)
d_3_0_Core->refs.deref();
Q_ASSERT(d_3_0_Core->refs.load());
if (d_3_1_Core)
d_3_1_Core->refs.deref();
Q_ASSERT(d_3_1_Core->refs.load());
if (d_3_2_Core)
d_3_2_Core->refs.deref();
Q_ASSERT(d_3_2_Core->refs.load());
if (d_3_3_Core)
d_3_3_Core->refs.deref();
Q_ASSERT(d_3_3_Core->refs.load());
if (d_4_0_Core)
d_4_0_Core->refs.deref();
Q_ASSERT(d_4_0_Core->refs.load());
if (d_4_1_Core)
d_4_1_Core->refs.deref();
Q_ASSERT(d_4_1_Core->refs.load());
if (d_4_2_Core)
d_4_2_Core->refs.deref();
Q_ASSERT(d_4_2_Core->refs.load());
if (d_4_3_Core)
d_4_3_Core->refs.deref();
Q_ASSERT(d_4_3_Core->refs.load());
if (d_4_4_Core)
d_4_4_Core->refs.deref();
Q_ASSERT(d_4_4_Core->refs.load());
if (d_1_0_Deprecated)
d_1_0_Deprecated->refs.deref();
Q_ASSERT(d_1_0_Deprecated->refs.load());
if (d_1_1_Deprecated)
d_1_1_Deprecated->refs.deref();
Q_ASSERT(d_1_1_Deprecated->refs.load());
if (d_1_2_Deprecated)
d_1_2_Deprecated->refs.deref();
Q_ASSERT(d_1_2_Deprecated->refs.load());
if (d_1_3_Deprecated)
d_1_3_Deprecated->refs.deref();
Q_ASSERT(d_1_3_Deprecated->refs.load());
if (d_1_4_Deprecated)
d_1_4_Deprecated->refs.deref();
Q_ASSERT(d_1_4_Deprecated->refs.load());
if (d_3_3_Deprecated)
d_3_3_Deprecated->refs.deref();
Q_ASSERT(d_3_3_Deprecated->refs.load());
}
bool QOpenGLFunctions_4_4_Compatibility::initializeOpenGLFunctions()
@ -205,186 +182,94 @@ bool QOpenGLFunctions_4_4_Compatibility::initializeOpenGLFunctions()
// Function pointers in the backends are resolved at creation time
QOpenGLVersionFunctionsBackend* d = 0;
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus(), d);
}
d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus(), d);
}
d_1_1_Core = static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_2_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus(), d);
}
d_1_2_Core = static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_3_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus(), d);
}
d_1_3_Core = static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_4_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus(), d);
}
d_1_4_Core = static_cast<QOpenGLFunctions_1_4_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_5_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus(), d);
}
d_1_5_Core = static_cast<QOpenGLFunctions_1_5_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_2_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus(), d);
}
d_2_0_Core = static_cast<QOpenGLFunctions_2_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_2_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus(), d);
}
d_2_1_Core = static_cast<QOpenGLFunctions_2_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus(), d);
}
d_3_0_Core = static_cast<QOpenGLFunctions_3_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus(), d);
}
d_3_1_Core = static_cast<QOpenGLFunctions_3_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_2_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus(), d);
}
d_3_2_Core = static_cast<QOpenGLFunctions_3_2_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_3_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus(), d);
}
d_3_3_Core = static_cast<QOpenGLFunctions_3_3_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_4_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_0_CoreBackend::versionStatus(), d);
}
d_4_0_Core = static_cast<QOpenGLFunctions_4_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_4_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_1_CoreBackend::versionStatus(), d);
}
d_4_1_Core = static_cast<QOpenGLFunctions_4_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_2_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_4_2_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_2_CoreBackend::versionStatus(), d);
}
d_4_2_Core = static_cast<QOpenGLFunctions_4_2_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_3_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_4_3_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_3_CoreBackend::versionStatus(), d);
}
d_4_3_Core = static_cast<QOpenGLFunctions_4_3_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_4_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_4_4_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_4_CoreBackend::versionStatus(), d);
}
d_4_4_Core = static_cast<QOpenGLFunctions_4_4_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_0_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus(), d);
}
d_1_0_Deprecated = static_cast<QOpenGLFunctions_1_0_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_1_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus(), d);
}
d_1_1_Deprecated = static_cast<QOpenGLFunctions_1_1_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_2_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus(), d);
}
d_1_2_Deprecated = static_cast<QOpenGLFunctions_1_2_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_3_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus(), d);
}
d_1_3_Deprecated = static_cast<QOpenGLFunctions_1_3_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_4_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus(), d);
}
d_1_4_Deprecated = static_cast<QOpenGLFunctions_1_4_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_3_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_3_DeprecatedBackend::versionStatus(), d);
}
d_3_3_Deprecated = static_cast<QOpenGLFunctions_3_3_DeprecatedBackend*>(d);
d->refs.ref();

View File

@ -89,74 +89,57 @@ QOpenGLFunctions_4_4_Core::QOpenGLFunctions_4_4_Core()
QOpenGLFunctions_4_4_Core::~QOpenGLFunctions_4_4_Core()
{
if (d_1_0_Core && !d_1_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Core->context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
delete d_1_0_Core;
}
if (d_1_1_Core && !d_1_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Core->context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
delete d_1_1_Core;
}
if (d_1_2_Core && !d_1_2_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Core->context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
delete d_1_2_Core;
}
if (d_1_3_Core && !d_1_3_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Core->context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
delete d_1_3_Core;
}
if (d_1_4_Core && !d_1_4_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Core->context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
delete d_1_4_Core;
}
if (d_1_5_Core && !d_1_5_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_5_Core->context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
delete d_1_5_Core;
}
if (d_2_0_Core && !d_2_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_0_Core->context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
delete d_2_0_Core;
}
if (d_2_1_Core && !d_2_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_1_Core->context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
delete d_2_1_Core;
}
if (d_3_0_Core && !d_3_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_0_Core->context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
delete d_3_0_Core;
}
if (d_3_1_Core && !d_3_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_1_Core->context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());
delete d_3_1_Core;
}
if (d_3_2_Core && !d_3_2_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_2_Core->context, QOpenGLFunctions_3_2_CoreBackend::versionStatus());
delete d_3_2_Core;
}
if (d_3_3_Core && !d_3_3_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_3_Core->context, QOpenGLFunctions_3_3_CoreBackend::versionStatus());
delete d_3_3_Core;
}
if (d_4_0_Core && !d_4_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_0_Core->context, QOpenGLFunctions_4_0_CoreBackend::versionStatus());
delete d_4_0_Core;
}
if (d_4_1_Core && !d_4_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_1_Core->context, QOpenGLFunctions_4_1_CoreBackend::versionStatus());
delete d_4_1_Core;
}
if (d_4_2_Core && !d_4_2_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_2_Core->context, QOpenGLFunctions_4_2_CoreBackend::versionStatus());
delete d_4_2_Core;
}
if (d_4_3_Core && !d_4_3_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_3_Core->context, QOpenGLFunctions_4_3_CoreBackend::versionStatus());
delete d_4_3_Core;
}
if (d_4_4_Core && !d_4_4_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_4_Core->context, QOpenGLFunctions_4_4_CoreBackend::versionStatus());
delete d_4_4_Core;
}
if (d_1_0_Core)
d_1_0_Core->refs.deref();
Q_ASSERT(d_1_0_Core->refs.load());
if (d_1_1_Core)
d_1_1_Core->refs.deref();
Q_ASSERT(d_1_1_Core->refs.load());
if (d_1_2_Core)
d_1_2_Core->refs.deref();
Q_ASSERT(d_1_2_Core->refs.load());
if (d_1_3_Core)
d_1_3_Core->refs.deref();
Q_ASSERT(d_1_3_Core->refs.load());
if (d_1_4_Core)
d_1_4_Core->refs.deref();
Q_ASSERT(d_1_4_Core->refs.load());
if (d_1_5_Core)
d_1_5_Core->refs.deref();
Q_ASSERT(d_1_5_Core->refs.load());
if (d_2_0_Core)
d_2_0_Core->refs.deref();
Q_ASSERT(d_2_0_Core->refs.load());
if (d_2_1_Core)
d_2_1_Core->refs.deref();
Q_ASSERT(d_2_1_Core->refs.load());
if (d_3_0_Core)
d_3_0_Core->refs.deref();
Q_ASSERT(d_3_0_Core->refs.load());
if (d_3_1_Core)
d_3_1_Core->refs.deref();
Q_ASSERT(d_3_1_Core->refs.load());
if (d_3_2_Core)
d_3_2_Core->refs.deref();
Q_ASSERT(d_3_2_Core->refs.load());
if (d_3_3_Core)
d_3_3_Core->refs.deref();
Q_ASSERT(d_3_3_Core->refs.load());
if (d_4_0_Core)
d_4_0_Core->refs.deref();
Q_ASSERT(d_4_0_Core->refs.load());
if (d_4_1_Core)
d_4_1_Core->refs.deref();
Q_ASSERT(d_4_1_Core->refs.load());
if (d_4_2_Core)
d_4_2_Core->refs.deref();
Q_ASSERT(d_4_2_Core->refs.load());
if (d_4_3_Core)
d_4_3_Core->refs.deref();
Q_ASSERT(d_4_3_Core->refs.load());
if (d_4_4_Core)
d_4_4_Core->refs.deref();
Q_ASSERT(d_4_4_Core->refs.load());
}
bool QOpenGLFunctions_4_4_Core::initializeOpenGLFunctions()
@ -175,138 +158,70 @@ bool QOpenGLFunctions_4_4_Core::initializeOpenGLFunctions()
// Function pointers in the backends are resolved at creation time
QOpenGLVersionFunctionsBackend* d = 0;
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus(), d);
}
d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus(), d);
}
d_1_1_Core = static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_2_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus(), d);
}
d_1_2_Core = static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_3_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus(), d);
}
d_1_3_Core = static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_4_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus(), d);
}
d_1_4_Core = static_cast<QOpenGLFunctions_1_4_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_5_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus(), d);
}
d_1_5_Core = static_cast<QOpenGLFunctions_1_5_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_2_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus(), d);
}
d_2_0_Core = static_cast<QOpenGLFunctions_2_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_2_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus(), d);
}
d_2_1_Core = static_cast<QOpenGLFunctions_2_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus(), d);
}
d_3_0_Core = static_cast<QOpenGLFunctions_3_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus(), d);
}
d_3_1_Core = static_cast<QOpenGLFunctions_3_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_2_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus(), d);
}
d_3_2_Core = static_cast<QOpenGLFunctions_3_2_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_3_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus(), d);
}
d_3_3_Core = static_cast<QOpenGLFunctions_3_3_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_4_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_0_CoreBackend::versionStatus(), d);
}
d_4_0_Core = static_cast<QOpenGLFunctions_4_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_4_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_1_CoreBackend::versionStatus(), d);
}
d_4_1_Core = static_cast<QOpenGLFunctions_4_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_2_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_4_2_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_2_CoreBackend::versionStatus(), d);
}
d_4_2_Core = static_cast<QOpenGLFunctions_4_2_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_3_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_4_3_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_3_CoreBackend::versionStatus(), d);
}
d_4_3_Core = static_cast<QOpenGLFunctions_4_3_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_4_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_4_4_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_4_CoreBackend::versionStatus(), d);
}
d_4_4_Core = static_cast<QOpenGLFunctions_4_4_CoreBackend*>(d);
d->refs.ref();

View File

@ -97,106 +97,81 @@ QOpenGLFunctions_4_5_Compatibility::QOpenGLFunctions_4_5_Compatibility()
QOpenGLFunctions_4_5_Compatibility::~QOpenGLFunctions_4_5_Compatibility()
{
if (d_1_0_Core && !d_1_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Core->context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
delete d_1_0_Core;
}
if (d_1_1_Core && !d_1_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Core->context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
delete d_1_1_Core;
}
if (d_1_2_Core && !d_1_2_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Core->context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
delete d_1_2_Core;
}
if (d_1_3_Core && !d_1_3_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Core->context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
delete d_1_3_Core;
}
if (d_1_4_Core && !d_1_4_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Core->context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
delete d_1_4_Core;
}
if (d_1_5_Core && !d_1_5_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_5_Core->context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
delete d_1_5_Core;
}
if (d_2_0_Core && !d_2_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_0_Core->context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
delete d_2_0_Core;
}
if (d_2_1_Core && !d_2_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_1_Core->context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
delete d_2_1_Core;
}
if (d_3_0_Core && !d_3_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_0_Core->context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
delete d_3_0_Core;
}
if (d_3_1_Core && !d_3_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_1_Core->context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());
delete d_3_1_Core;
}
if (d_3_2_Core && !d_3_2_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_2_Core->context, QOpenGLFunctions_3_2_CoreBackend::versionStatus());
delete d_3_2_Core;
}
if (d_3_3_Core && !d_3_3_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_3_Core->context, QOpenGLFunctions_3_3_CoreBackend::versionStatus());
delete d_3_3_Core;
}
if (d_4_0_Core && !d_4_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_0_Core->context, QOpenGLFunctions_4_0_CoreBackend::versionStatus());
delete d_4_0_Core;
}
if (d_4_1_Core && !d_4_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_1_Core->context, QOpenGLFunctions_4_1_CoreBackend::versionStatus());
delete d_4_1_Core;
}
if (d_4_2_Core && !d_4_2_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_2_Core->context, QOpenGLFunctions_4_2_CoreBackend::versionStatus());
delete d_4_2_Core;
}
if (d_4_3_Core && !d_4_3_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_3_Core->context, QOpenGLFunctions_4_3_CoreBackend::versionStatus());
delete d_4_3_Core;
}
if (d_4_4_Core && !d_4_4_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_4_Core->context, QOpenGLFunctions_4_4_CoreBackend::versionStatus());
delete d_4_4_Core;
}
if (d_4_5_Core && !d_4_5_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_5_Core->context, QOpenGLFunctions_4_5_CoreBackend::versionStatus());
delete d_4_5_Core;
}
if (d_1_0_Deprecated && !d_1_0_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Deprecated->context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());
delete d_1_0_Deprecated;
}
if (d_1_1_Deprecated && !d_1_1_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Deprecated->context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());
delete d_1_1_Deprecated;
}
if (d_1_2_Deprecated && !d_1_2_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Deprecated->context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus());
delete d_1_2_Deprecated;
}
if (d_1_3_Deprecated && !d_1_3_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Deprecated->context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus());
delete d_1_3_Deprecated;
}
if (d_1_4_Deprecated && !d_1_4_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Deprecated->context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus());
delete d_1_4_Deprecated;
}
if (d_3_3_Deprecated && !d_3_3_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_3_Deprecated->context, QOpenGLFunctions_3_3_DeprecatedBackend::versionStatus());
delete d_3_3_Deprecated;
}
if (d_4_5_Deprecated && !d_4_5_Deprecated->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_5_Deprecated->context, QOpenGLFunctions_4_5_DeprecatedBackend::versionStatus());
delete d_4_5_Deprecated;
}
if (d_1_0_Core)
d_1_0_Core->refs.deref();
Q_ASSERT(d_1_0_Core->refs.load());
if (d_1_1_Core)
d_1_1_Core->refs.deref();
Q_ASSERT(d_1_1_Core->refs.load());
if (d_1_2_Core)
d_1_2_Core->refs.deref();
Q_ASSERT(d_1_2_Core->refs.load());
if (d_1_3_Core)
d_1_3_Core->refs.deref();
Q_ASSERT(d_1_3_Core->refs.load());
if (d_1_4_Core)
d_1_4_Core->refs.deref();
Q_ASSERT(d_1_4_Core->refs.load());
if (d_1_5_Core)
d_1_5_Core->refs.deref();
Q_ASSERT(d_1_5_Core->refs.load());
if (d_2_0_Core)
d_2_0_Core->refs.deref();
Q_ASSERT(d_2_0_Core->refs.load());
if (d_2_1_Core)
d_2_1_Core->refs.deref();
Q_ASSERT(d_2_1_Core->refs.load());
if (d_3_0_Core)
d_3_0_Core->refs.deref();
Q_ASSERT(d_3_0_Core->refs.load());
if (d_3_1_Core)
d_3_1_Core->refs.deref();
Q_ASSERT(d_3_1_Core->refs.load());
if (d_3_2_Core)
d_3_2_Core->refs.deref();
Q_ASSERT(d_3_2_Core->refs.load());
if (d_3_3_Core)
d_3_3_Core->refs.deref();
Q_ASSERT(d_3_3_Core->refs.load());
if (d_4_0_Core)
d_4_0_Core->refs.deref();
Q_ASSERT(d_4_0_Core->refs.load());
if (d_4_1_Core)
d_4_1_Core->refs.deref();
Q_ASSERT(d_4_1_Core->refs.load());
if (d_4_2_Core)
d_4_2_Core->refs.deref();
Q_ASSERT(d_4_2_Core->refs.load());
if (d_4_3_Core)
d_4_3_Core->refs.deref();
Q_ASSERT(d_4_3_Core->refs.load());
if (d_4_4_Core)
d_4_4_Core->refs.deref();
Q_ASSERT(d_4_4_Core->refs.load());
if (d_4_5_Core)
d_4_5_Core->refs.deref();
Q_ASSERT(d_4_5_Core->refs.load());
if (d_1_0_Deprecated)
d_1_0_Deprecated->refs.deref();
Q_ASSERT(d_1_0_Deprecated->refs.load());
if (d_1_1_Deprecated)
d_1_1_Deprecated->refs.deref();
Q_ASSERT(d_1_1_Deprecated->refs.load());
if (d_1_2_Deprecated)
d_1_2_Deprecated->refs.deref();
Q_ASSERT(d_1_2_Deprecated->refs.load());
if (d_1_3_Deprecated)
d_1_3_Deprecated->refs.deref();
Q_ASSERT(d_1_3_Deprecated->refs.load());
if (d_1_4_Deprecated)
d_1_4_Deprecated->refs.deref();
Q_ASSERT(d_1_4_Deprecated->refs.load());
if (d_3_3_Deprecated)
d_3_3_Deprecated->refs.deref();
Q_ASSERT(d_3_3_Deprecated->refs.load());
if (d_4_5_Deprecated)
d_4_5_Deprecated->refs.deref();
Q_ASSERT(d_4_5_Deprecated->refs.load());
}
bool QOpenGLFunctions_4_5_Compatibility::initializeOpenGLFunctions()
@ -215,202 +190,102 @@ bool QOpenGLFunctions_4_5_Compatibility::initializeOpenGLFunctions()
// Function pointers in the backends are resolved at creation time
QOpenGLVersionFunctionsBackend* d = 0;
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus(), d);
}
d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus(), d);
}
d_1_1_Core = static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_2_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus(), d);
}
d_1_2_Core = static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_3_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus(), d);
}
d_1_3_Core = static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_4_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus(), d);
}
d_1_4_Core = static_cast<QOpenGLFunctions_1_4_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_5_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus(), d);
}
d_1_5_Core = static_cast<QOpenGLFunctions_1_5_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_2_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus(), d);
}
d_2_0_Core = static_cast<QOpenGLFunctions_2_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_2_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus(), d);
}
d_2_1_Core = static_cast<QOpenGLFunctions_2_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus(), d);
}
d_3_0_Core = static_cast<QOpenGLFunctions_3_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus(), d);
}
d_3_1_Core = static_cast<QOpenGLFunctions_3_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_2_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus(), d);
}
d_3_2_Core = static_cast<QOpenGLFunctions_3_2_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_3_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus(), d);
}
d_3_3_Core = static_cast<QOpenGLFunctions_3_3_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_4_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_0_CoreBackend::versionStatus(), d);
}
d_4_0_Core = static_cast<QOpenGLFunctions_4_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_4_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_1_CoreBackend::versionStatus(), d);
}
d_4_1_Core = static_cast<QOpenGLFunctions_4_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_2_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_4_2_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_2_CoreBackend::versionStatus(), d);
}
d_4_2_Core = static_cast<QOpenGLFunctions_4_2_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_3_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_4_3_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_3_CoreBackend::versionStatus(), d);
}
d_4_3_Core = static_cast<QOpenGLFunctions_4_3_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_4_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_4_4_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_4_CoreBackend::versionStatus(), d);
}
d_4_4_Core = static_cast<QOpenGLFunctions_4_4_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_5_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_4_5_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_5_CoreBackend::versionStatus(), d);
}
d_4_5_Core = static_cast<QOpenGLFunctions_4_5_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_0_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus(), d);
}
d_1_0_Deprecated = static_cast<QOpenGLFunctions_1_0_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_1_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus(), d);
}
d_1_1_Deprecated = static_cast<QOpenGLFunctions_1_1_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_2_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus(), d);
}
d_1_2_Deprecated = static_cast<QOpenGLFunctions_1_2_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_3_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus(), d);
}
d_1_3_Deprecated = static_cast<QOpenGLFunctions_1_3_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_4_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus(), d);
}
d_1_4_Deprecated = static_cast<QOpenGLFunctions_1_4_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_3_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_3_DeprecatedBackend::versionStatus(), d);
}
d_3_3_Deprecated = static_cast<QOpenGLFunctions_3_3_DeprecatedBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_5_DeprecatedBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_4_5_DeprecatedBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_5_DeprecatedBackend::versionStatus(), d);
}
d_4_5_Deprecated = static_cast<QOpenGLFunctions_4_5_DeprecatedBackend*>(d);
d->refs.ref();

View File

@ -90,78 +90,60 @@ QOpenGLFunctions_4_5_Core::QOpenGLFunctions_4_5_Core()
QOpenGLFunctions_4_5_Core::~QOpenGLFunctions_4_5_Core()
{
if (d_1_0_Core && !d_1_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Core->context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
delete d_1_0_Core;
}
if (d_1_1_Core && !d_1_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Core->context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
delete d_1_1_Core;
}
if (d_1_2_Core && !d_1_2_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Core->context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
delete d_1_2_Core;
}
if (d_1_3_Core && !d_1_3_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Core->context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
delete d_1_3_Core;
}
if (d_1_4_Core && !d_1_4_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Core->context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
delete d_1_4_Core;
}
if (d_1_5_Core && !d_1_5_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_5_Core->context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
delete d_1_5_Core;
}
if (d_2_0_Core && !d_2_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_0_Core->context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
delete d_2_0_Core;
}
if (d_2_1_Core && !d_2_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_1_Core->context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
delete d_2_1_Core;
}
if (d_3_0_Core && !d_3_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_0_Core->context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
delete d_3_0_Core;
}
if (d_3_1_Core && !d_3_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_1_Core->context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());
delete d_3_1_Core;
}
if (d_3_2_Core && !d_3_2_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_2_Core->context, QOpenGLFunctions_3_2_CoreBackend::versionStatus());
delete d_3_2_Core;
}
if (d_3_3_Core && !d_3_3_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_3_Core->context, QOpenGLFunctions_3_3_CoreBackend::versionStatus());
delete d_3_3_Core;
}
if (d_4_0_Core && !d_4_0_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_0_Core->context, QOpenGLFunctions_4_0_CoreBackend::versionStatus());
delete d_4_0_Core;
}
if (d_4_1_Core && !d_4_1_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_1_Core->context, QOpenGLFunctions_4_1_CoreBackend::versionStatus());
delete d_4_1_Core;
}
if (d_4_2_Core && !d_4_2_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_2_Core->context, QOpenGLFunctions_4_2_CoreBackend::versionStatus());
delete d_4_2_Core;
}
if (d_4_3_Core && !d_4_3_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_3_Core->context, QOpenGLFunctions_4_3_CoreBackend::versionStatus());
delete d_4_3_Core;
}
if (d_4_4_Core && !d_4_4_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_4_Core->context, QOpenGLFunctions_4_4_CoreBackend::versionStatus());
delete d_4_4_Core;
}
if (d_4_5_Core && !d_4_5_Core->refs.deref()) {
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_5_Core->context, QOpenGLFunctions_4_5_CoreBackend::versionStatus());
delete d_4_5_Core;
}
if (d_1_0_Core)
d_1_0_Core->refs.deref();
Q_ASSERT(d_1_0_Core->refs.load());
if (d_1_1_Core)
d_1_1_Core->refs.deref();
Q_ASSERT(d_1_1_Core->refs.load());
if (d_1_2_Core)
d_1_2_Core->refs.deref();
Q_ASSERT(d_1_2_Core->refs.load());
if (d_1_3_Core)
d_1_3_Core->refs.deref();
Q_ASSERT(d_1_3_Core->refs.load());
if (d_1_4_Core)
d_1_4_Core->refs.deref();
Q_ASSERT(d_1_4_Core->refs.load());
if (d_1_5_Core)
d_1_5_Core->refs.deref();
Q_ASSERT(d_1_5_Core->refs.load());
if (d_2_0_Core)
d_2_0_Core->refs.deref();
Q_ASSERT(d_2_0_Core->refs.load());
if (d_2_1_Core)
d_2_1_Core->refs.deref();
Q_ASSERT(d_2_1_Core->refs.load());
if (d_3_0_Core)
d_3_0_Core->refs.deref();
Q_ASSERT(d_3_0_Core->refs.load());
if (d_3_1_Core)
d_3_1_Core->refs.deref();
Q_ASSERT(d_3_1_Core->refs.load());
if (d_3_2_Core)
d_3_2_Core->refs.deref();
Q_ASSERT(d_3_2_Core->refs.load());
if (d_3_3_Core)
d_3_3_Core->refs.deref();
Q_ASSERT(d_3_3_Core->refs.load());
if (d_4_0_Core)
d_4_0_Core->refs.deref();
Q_ASSERT(d_4_0_Core->refs.load());
if (d_4_1_Core)
d_4_1_Core->refs.deref();
Q_ASSERT(d_4_1_Core->refs.load());
if (d_4_2_Core)
d_4_2_Core->refs.deref();
Q_ASSERT(d_4_2_Core->refs.load());
if (d_4_3_Core)
d_4_3_Core->refs.deref();
Q_ASSERT(d_4_3_Core->refs.load());
if (d_4_4_Core)
d_4_4_Core->refs.deref();
Q_ASSERT(d_4_4_Core->refs.load());
if (d_4_5_Core)
d_4_5_Core->refs.deref();
Q_ASSERT(d_4_5_Core->refs.load());
}
bool QOpenGLFunctions_4_5_Core::initializeOpenGLFunctions()
@ -180,146 +162,74 @@ bool QOpenGLFunctions_4_5_Core::initializeOpenGLFunctions()
// Function pointers in the backends are resolved at creation time
QOpenGLVersionFunctionsBackend* d = 0;
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus(), d);
}
d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus(), d);
}
d_1_1_Core = static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_2_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus(), d);
}
d_1_2_Core = static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_3_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus(), d);
}
d_1_3_Core = static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_4_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus(), d);
}
d_1_4_Core = static_cast<QOpenGLFunctions_1_4_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_1_5_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus(), d);
}
d_1_5_Core = static_cast<QOpenGLFunctions_1_5_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_2_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus(), d);
}
d_2_0_Core = static_cast<QOpenGLFunctions_2_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_2_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus(), d);
}
d_2_1_Core = static_cast<QOpenGLFunctions_2_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus(), d);
}
d_3_0_Core = static_cast<QOpenGLFunctions_3_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus(), d);
}
d_3_1_Core = static_cast<QOpenGLFunctions_3_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_2_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus(), d);
}
d_3_2_Core = static_cast<QOpenGLFunctions_3_2_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_3_3_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus(), d);
}
d_3_3_Core = static_cast<QOpenGLFunctions_3_3_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_0_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_4_0_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_0_CoreBackend::versionStatus(), d);
}
d_4_0_Core = static_cast<QOpenGLFunctions_4_0_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_1_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_4_1_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_1_CoreBackend::versionStatus(), d);
}
d_4_1_Core = static_cast<QOpenGLFunctions_4_1_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_2_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_4_2_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_2_CoreBackend::versionStatus(), d);
}
d_4_2_Core = static_cast<QOpenGLFunctions_4_2_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_3_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_4_3_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_3_CoreBackend::versionStatus(), d);
}
d_4_3_Core = static_cast<QOpenGLFunctions_4_3_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_4_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_4_4_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_4_CoreBackend::versionStatus(), d);
}
d_4_4_Core = static_cast<QOpenGLFunctions_4_4_CoreBackend*>(d);
d->refs.ref();
d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_5_CoreBackend::versionStatus());
if (!d) {
d = new QOpenGLFunctions_4_5_CoreBackend(context);
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_5_CoreBackend::versionStatus(), d);
}
d_4_5_Core = static_cast<QOpenGLFunctions_4_5_CoreBackend*>(d);
d->refs.ref();

View File

@ -85,23 +85,59 @@ void CLASS::init() \
#define QT_OPENGL_IMPLEMENT_WIN QT_OPENGL_IMPLEMENT
#endif
QOpenGLVersionFunctionsStorage::QOpenGLVersionFunctionsStorage()
: backends(0)
{
}
QOpenGLVersionFunctionsStorage::~QOpenGLVersionFunctionsStorage()
{
if (backends) {
for (int i = 0; i < QOpenGLVersionFunctionsBackend::OpenGLVersionBackendCount; ++i) {
if (backends[i] && !--backends[i]->refs) {
// deleting the base class is ok, as the derived classes don't have a destructor
delete backends[i];
}
}
delete[] backends;
}
}
QOpenGLVersionFunctionsBackend *QOpenGLVersionFunctionsStorage::backend(QOpenGLContext *context, QOpenGLVersionFunctionsBackend::Version v)
{
#ifdef QT_OPENGL_ES
Q_UNUSED(context);
Q_UNUSED(v);
return 0;
#else
if (!backends) {
backends = new QOpenGLVersionFunctionsBackend *[QOpenGLVersionFunctionsBackend::OpenGLVersionBackendCount];
memset(backends, 0, sizeof(QOpenGLVersionFunctionsBackend *)*QOpenGLVersionFunctionsBackend::OpenGLVersionBackendCount);
}
if (backends[v])
return backends[v];
switch(v) {
#define VERSION_ENUM(X) QOpenGLVersionFunctionsBackend::OpenGL_##X
#define CREATE_BACKEND(X) \
case VERSION_ENUM(X): \
backends[VERSION_ENUM(X)] = new QOpenGLFunctions_##X##Backend(context); \
break;
QT_OPENGL_VERSIONS(CREATE_BACKEND)
case QOpenGLVersionFunctionsBackend::OpenGLVersionBackendCount:
Q_UNREACHABLE();
}
// the storage keeps one ref
++backends[v]->refs;
return backends[v];
#endif
}
QOpenGLVersionFunctionsBackend *QAbstractOpenGLFunctionsPrivate::functionsBackend(QOpenGLContext *context, QOpenGLVersionFunctionsBackend::Version v)
{
Q_ASSERT(context);
return context->functionsBackend(v);
}
void QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(QOpenGLContext *context, QOpenGLVersionFunctionsBackend::Version v,
QOpenGLVersionFunctionsBackend *backend)
{
Q_ASSERT(context);
context->insertFunctionsBackend(v, backend);
}
void QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(QOpenGLContext *context, QOpenGLVersionFunctionsBackend::Version v)
{
Q_ASSERT(context);
context->removeFunctionsBackend(v);
QOpenGLVersionFunctionsStorage *storage = context->functionsBackendStorage();
return storage->backend(context, v);
}
void QAbstractOpenGLFunctionsPrivate::insertExternalFunctions(QOpenGLContext *context, QAbstractOpenGLFunctions *f)

View File

@ -132,36 +132,41 @@ private: \
class QOpenGLVersionFunctionsBackend
{
public:
#define QT_OPENGL_VERSIONS(F) \
F(1_0_Core) \
F(1_1_Core) \
F(1_2_Core) \
F(1_3_Core) \
F(1_4_Core) \
F(1_5_Core) \
F(2_0_Core) \
F(2_1_Core) \
F(3_0_Core) \
F(3_1_Core) \
F(3_2_Core) \
F(3_3_Core) \
F(4_0_Core) \
F(4_1_Core) \
F(4_2_Core) \
F(4_3_Core) \
F(4_4_Core) \
F(4_5_Core) \
F(1_0_Deprecated) \
F(1_1_Deprecated) \
F(1_2_Deprecated) \
F(1_3_Deprecated) \
F(1_4_Deprecated) \
F(2_0_Deprecated) \
F(3_0_Deprecated) \
F(3_3_Deprecated) \
F(4_5_Deprecated) \
#define VERSION_ENUM(X) OpenGL_##X,
enum Version {
OpenGL_1_0,
OpenGL_1_1,
OpenGL_1_2,
OpenGL_1_3,
OpenGL_1_4,
OpenGL_1_5,
OpenGL_2_0,
OpenGL_2_1,
OpenGL_3_0,
OpenGL_3_1,
OpenGL_3_2_Core,
OpenGL_3_3_Core,
OpenGL_4_0_Core,
OpenGL_4_1_Core,
OpenGL_4_2_Core,
OpenGL_4_3_Core,
OpenGL_4_4_Core,
OpenGL_4_5_Core,
OpenGL_1_0_Deprecated,
OpenGL_1_1_Deprecated,
OpenGL_1_2_Deprecated,
OpenGL_1_3_Deprecated,
OpenGL_1_4_Deprecated,
OpenGL_2_0_Deprecated,
OpenGL_3_0_Deprecated,
OpenGL_3_3_Deprecated,
OpenGL_4_5_Deprecated,
QT_OPENGL_VERSIONS(VERSION_ENUM)
OpenGLVersionBackendCount
};
#undef VERSION_ENUM
QOpenGLVersionFunctionsBackend(QOpenGLContext *ctx)
: context(ctx)
@ -171,6 +176,17 @@ public:
QAtomicInt refs;
};
class QOpenGLVersionFunctionsStorage
{
public:
QOpenGLVersionFunctionsStorage();
~QOpenGLVersionFunctionsStorage();
QOpenGLVersionFunctionsBackend *backend(QOpenGLContext *context, QOpenGLVersionFunctionsBackend::Version v);
QOpenGLVersionFunctionsBackend **backends;
};
class QAbstractOpenGLFunctions;
class QAbstractOpenGLFunctionsPrivate
@ -182,9 +198,6 @@ public:
{}
static QOpenGLVersionFunctionsBackend *functionsBackend(QOpenGLContext *context, QOpenGLVersionFunctionsBackend::Version v);
static void insertFunctionsBackend(QOpenGLContext *context, QOpenGLVersionFunctionsBackend::Version v,
QOpenGLVersionFunctionsBackend *backend);
static void removeFunctionsBackend(QOpenGLContext *context, QOpenGLVersionFunctionsBackend::Version v);
static void insertExternalFunctions(QOpenGLContext *context, QAbstractOpenGLFunctions *f);
static void removeExternalFunctions(QOpenGLContext *context, QAbstractOpenGLFunctions *f);
@ -232,7 +245,7 @@ public:
}
Q_DECL_CONSTEXPR static Version versionStatus()
{ return OpenGL_1_0; }
{ return OpenGL_1_0_Core; }
// OpenGL 1.0 core functions
#define QT_OPENGL_1_0_FUNCTIONS(F) \
@ -298,7 +311,7 @@ public:
}
Q_DECL_CONSTEXPR static Version versionStatus()
{ return OpenGL_1_1; }
{ return OpenGL_1_1_Core; }
// OpenGL 1.1 core functions
#define QT_OPENGL_1_1_FUNCTIONS(F) \
@ -332,7 +345,7 @@ public:
}
Q_DECL_CONSTEXPR static Version versionStatus()
{ return OpenGL_1_2; }
{ return OpenGL_1_2_Core; }
// OpenGL 1.2 core functions
#define QT_OPENGL_1_2_FUNCTIONS(F) \
@ -356,7 +369,7 @@ public:
}
Q_DECL_CONSTEXPR static Version versionStatus()
{ return OpenGL_1_3; }
{ return OpenGL_1_3_Core; }
// OpenGL 1.3 core functions
#define QT_OPENGL_1_3_FUNCTIONS(F) \
@ -383,7 +396,7 @@ public:
}
Q_DECL_CONSTEXPR static Version versionStatus()
{ return OpenGL_1_4; }
{ return OpenGL_1_4_Core; }
// OpenGL 1.4 core functions
#define QT_OPENGL_1_4_FUNCTIONS(F) \
@ -408,7 +421,7 @@ public:
}
Q_DECL_CONSTEXPR static Version versionStatus()
{ return OpenGL_1_5; }
{ return OpenGL_1_5_Core; }
// OpenGL 1.5 core functions
#define QT_OPENGL_1_5_FUNCTIONS(F) \
@ -445,7 +458,7 @@ public:
}
Q_DECL_CONSTEXPR static Version versionStatus()
{ return OpenGL_2_0; }
{ return OpenGL_2_0_Core; }
// OpenGL 2.0 core functions
#define QT_OPENGL_2_0_FUNCTIONS(F) \
@ -556,7 +569,7 @@ public:
}
Q_DECL_CONSTEXPR static Version versionStatus()
{ return OpenGL_2_1; }
{ return OpenGL_2_1_Core; }
// OpenGL 2.1 core functions
#define QT_OPENGL_2_1_FUNCTIONS(F) \
@ -580,7 +593,7 @@ public:
}
Q_DECL_CONSTEXPR static Version versionStatus()
{ return OpenGL_3_0; }
{ return OpenGL_3_0_Core; }
// OpenGL 3.0 core functions
#define QT_OPENGL_3_0_FUNCTIONS(F) \
@ -682,7 +695,7 @@ public:
}
Q_DECL_CONSTEXPR static Version versionStatus()
{ return OpenGL_3_1; }
{ return OpenGL_3_1_Core; }
// OpenGL 3.1 core functions
#define QT_OPENGL_3_1_FUNCTIONS(F) \