| Line | Source | Count |
| 1 | | - |
| 2 | | - |
| 3 | | - |
| 4 | | - |
| 5 | | - |
| 6 | | - |
| 7 | | - |
| 8 | | - |
| 9 | | - |
| 10 | | - |
| 11 | | - |
| 12 | | - |
| 13 | | - |
| 14 | | - |
| 15 | | - |
| 16 | | - |
| 17 | | - |
| 18 | | - |
| 19 | | - |
| 20 | | - |
| 21 | | - |
| 22 | | - |
| 23 | | - |
| 24 | | - |
| 25 | | - |
| 26 | | - |
| 27 | | - |
| 28 | | - |
| 29 | | - |
| 30 | | - |
| 31 | | - |
| 32 | | - |
| 33 | | - |
| 34 | | - |
| 35 | | - |
| 36 | | - |
| 37 | | - |
| 38 | | - |
| 39 | | - |
| 40 | | - |
| 41 | | - |
| 42 | | - |
| 43 | | - |
| 44 | | - |
| 45 | | - |
| 46 | | - |
| 47 | | - |
| 48 | | - |
| 49 | #include "qopenglfunctions_1_2.h" | - |
| 50 | #include "qopenglcontext.h" | - |
| 51 | | - |
| 52 | QT_BEGIN_NAMESPACE | - |
| 53 | | - |
| 54 | | - |
| 55 | | - |
| 56 | | - |
| 57 | | - |
| 58 | | - |
| 59 | | - |
| 60 | | - |
| 61 | | - |
| 62 | | - |
| 63 | | - |
| 64 | | - |
| 65 | | - |
| 66 | | - |
| 67 | | - |
| 68 | QOpenGLFunctions_1_2::QOpenGLFunctions_1_2() | - |
| 69 | : QAbstractOpenGLFunctions() | - |
| 70 | , d_1_0_Core(0) | - |
| 71 | , d_1_1_Core(0) | - |
| 72 | , d_1_2_Core(0) | - |
| 73 | , d_1_0_Deprecated(0) | - |
| 74 | , d_1_1_Deprecated(0) | - |
| 75 | , d_1_2_Deprecated(0) | - |
| 76 | { | - |
| 77 | } | - |
| 78 | | - |
| 79 | QOpenGLFunctions_1_2::~QOpenGLFunctions_1_2() | - |
| 80 | { | - |
| 81 | if (d_1_0_Core&& !)| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 82 | d_1_0_Core->refs.deref()) { never executed: d_1_0_Core->refs.deref(); | 0 |
| QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend never executed: d_1_0_Core->refs.deref(); ();never executed: d_1_0_Core->refs.deref(); | |
| 83 | Q_ASSERT(d_1_0_Core->context, QOpenGLFunctions_1_0_CoreBackend::versionStatusrefs.load()); | - |
| 84 | delete d_1_0_Core;| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| }| TRUE | never evaluated | | FALSE | never evaluated |
if (d_1_1_Core&& !)| TRUE | never evaluated | | FALSE | never evaluated |
| |
| 85 | d_1_1_Core->refs.deref()) { never executed: d_1_1_Core->refs.deref(); | 0 |
| QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend never executed: d_1_1_Core->refs.deref(); ();never executed: d_1_1_Core->refs.deref(); | |
| 86 | Q_ASSERT(d_1_1_Core->context, QOpenGLFunctions_1_1_CoreBackend::versionStatusrefs.load()); | - |
| 87 | delete d_1_1_Core;| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| }| TRUE | never evaluated | | FALSE | never evaluated |
if (d_1_2_Core&& !)| TRUE | never evaluated | | FALSE | never evaluated |
| |
| 88 | d_1_2_Core->refs.deref()) { never executed: d_1_2_Core->refs.deref(); | 0 |
| QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend never executed: d_1_2_Core->refs.deref(); ();never executed: d_1_2_Core->refs.deref(); | |
| 89 | Q_ASSERT(d_1_2_Core->context, QOpenGLFunctions_1_2_CoreBackend::versionStatusrefs.load()); | - |
| 90 | delete d_1_2_Core;| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| }| TRUE | never evaluated | | FALSE | never evaluated |
if (d_1_0_Deprecated&& !)| TRUE | never evaluated | | FALSE | never evaluated |
| |
| 91 | d_1_0_Deprecated->refs.deref()) { never executed: d_1_0_Deprecated->refs.deref(); | 0 |
| QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend never executed: d_1_0_Deprecated->refs.deref(); ();never executed: d_1_0_Deprecated->refs.deref(); | |
| 92 | Q_ASSERT(d_1_0_Deprecated->context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatusrefs.load()); | - |
| 93 | delete d_1_0_Deprecated;| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| }| TRUE | never evaluated | | FALSE | never evaluated |
if (d_1_1_Deprecated&& !)| TRUE | never evaluated | | FALSE | never evaluated |
| |
| 94 | d_1_1_Deprecated->refs.deref()) { never executed: d_1_1_Deprecated->refs.deref(); | 0 |
| QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend never executed: d_1_1_Deprecated->refs.deref(); ();never executed: d_1_1_Deprecated->refs.deref(); | |
| 95 | Q_ASSERT(d_1_1_Deprecated->context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatusrefs.load()); | - |
| 96 | delete d_1_1_Deprecated;| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| }| TRUE | never evaluated | | FALSE | never evaluated |
if (d_1_2_Deprecated&& !)| TRUE | never evaluated | | FALSE | never evaluated |
| |
| 97 | d_1_2_Deprecated->refs.deref()) { never executed: d_1_2_Deprecated->refs.deref(); | 0 |
| QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend never executed: d_1_2_Deprecated->refs.deref(); ();never executed: d_1_2_Deprecated->refs.deref(); | |
| 98 | Q_ASSERT(d_1_2_Deprecated->context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatusrefs.load()); | - |
| delete d_1_2_Deprecated; never executed: end of block | |
| } never executed: end of block }never executed: end of block | |
| 100 | | - |
| 101 | bool QOpenGLFunctions_1_2::initializeOpenGLFunctions() | - |
| 102 | { | - |
| 103 | if ( isInitialized() )| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 104 | return true; never executed: return true; | 0 |
| 105 | | - |
| 106 | QOpenGLContext* context = QOpenGLContext::currentContext(); | - |
| 107 | | - |
| 108 | | - |
| 109 | | - |
| 110 | if (((owningContext() && owningContext() == context) || !owningContext())| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 111 | && QOpenGLFunctions_1_2::isContextCompatible(context))| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 112 | { | - |
| 113 | | - |
| 114 | | - |
| 115 | QOpenGLVersionFunctionsBackend* d = 0; | - |
| 116 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); | - |
| 117 | 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); | |
| 118 | d->refs.ref(); | - |
| 119 | | - |
| 120 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus()); | - |
| 121 | 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); | |
| 122 | d->refs.ref(); | - |
| 123 | | - |
| 124 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus()); | - |
| 125 | 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); | |
| 126 | d->refs.ref(); | - |
| 127 | | - |
| 128 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus()); | - |
| 129 | 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); | |
| 130 | d->refs.ref(); | - |
| 131 | | - |
| 132 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus()); | - |
| 133 | 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); | |
| 134 | d->refs.ref(); | - |
| 135 | | - |
| 136 | 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); | |
| } | |
| 137 | d_1_2_Deprecated = static_cast<QOpenGLFunctions_1_2_DeprecatedBackend*>(d); | - |
| 138 | d->refs.ref(); | - |
| 139 | | - |
| 140 | QAbstractOpenGLFunctions::initializeOpenGLFunctions(); | - |
| 141 | } never executed: end of block | 0 |
| 142 | return isInitialized(); never executed: return isInitialized(); | 0 |
| 143 | } | - |
| 144 | | - |
| 145 | bool QOpenGLFunctions_1_2::isContextCompatible(QOpenGLContext *context) | - |
| 146 | { | - |
| 147 | Q_ASSERT(context); | - |
| 148 | QSurfaceFormat f = context->format(); | - |
| 149 | const QPair<int, int> v = qMakePair(f.majorVersion(), f.minorVersion()); | - |
| 150 | if (v < qMakePair(1, 2)) | - |
| 151 | return false; | - |
| 152 | | - |
| 153 | if (f.profile() == QSurfaceFormat::CoreProfile) | - |
| 154 | return false; | - |
| 155 | | - |
| 156 | return true; | - |
| 157 | } | - |
| 158 | | - |
| 159 | QOpenGLVersionProfile QOpenGLFunctions_1_2::versionProfile() | - |
| 160 | { | - |
| 161 | QOpenGLVersionProfile v; | - |
| 162 | v.setVersion(1, 2); | - |
| 163 | return v; | - |
| 164 | } | - |
| 165 | | - |
| 166 | QT_END_NAMESPACE | - |
| | |