| 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 | #include "qopenglfunctions_2_0.h" | - |
| 44 | #include "qopenglcontext.h" | - |
| 45 | | - |
| 46 | QT_BEGIN_NAMESPACE | - |
| 47 | | - |
| 48 | | - |
| 49 | | - |
| 50 | | - |
| 51 | | - |
| 52 | | - |
| 53 | | - |
| 54 | | - |
| 55 | | - |
| 56 | | - |
| 57 | | - |
| 58 | | - |
| 59 | | - |
| 60 | | - |
| 61 | | - |
| 62 | QOpenGLFunctions_2_0::QOpenGLFunctions_2_0() | - |
| 63 | : QAbstractOpenGLFunctions() | - |
| 64 | , d_1_0_Core(0) | - |
| 65 | , d_1_1_Core(0) | - |
| 66 | , d_1_2_Core(0) | - |
| 67 | , d_1_3_Core(0) | - |
| 68 | , d_1_4_Core(0) | - |
| 69 | , d_1_5_Core(0) | - |
| 70 | , d_2_0_Core(0) | - |
| 71 | , d_1_0_Deprecated(0) | - |
| 72 | , d_1_1_Deprecated(0) | - |
| 73 | , d_1_2_Deprecated(0) | - |
| 74 | , d_1_3_Deprecated(0) | - |
| 75 | , d_1_4_Deprecated(0) | - |
| 76 | , m_reserved_2_0_Deprecated(Q_NULLPTR) | - |
| 77 | { | - |
| 78 | } never executed: end of block | 0 |
| 79 | | - |
| 80 | QOpenGLFunctions_2_0::~QOpenGLFunctions_2_0() | - |
| 81 | { | - |
| 82 | if (d_1_0_Core && !d_1_0_Core->refs.deref()) {| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 83 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Core->context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); | - |
| 84 | delete d_1_0_Core; | - |
| 85 | } never executed: end of block | 0 |
| 86 | if (d_1_1_Core && !d_1_1_Core->refs.deref()) {| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 87 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Core->context, QOpenGLFunctions_1_1_CoreBackend::versionStatus()); | - |
| 88 | delete d_1_1_Core; | - |
| 89 | } never executed: end of block | 0 |
| 90 | if (d_1_2_Core && !d_1_2_Core->refs.deref()) {| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 91 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Core->context, QOpenGLFunctions_1_2_CoreBackend::versionStatus()); | - |
| 92 | delete d_1_2_Core; | - |
| 93 | } never executed: end of block | 0 |
| 94 | if (d_1_3_Core && !d_1_3_Core->refs.deref()) {| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 95 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Core->context, QOpenGLFunctions_1_3_CoreBackend::versionStatus()); | - |
| 96 | delete d_1_3_Core; | - |
| 97 | } never executed: end of block | 0 |
| 98 | if (d_1_4_Core && !d_1_4_Core->refs.deref()) {| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 99 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Core->context, QOpenGLFunctions_1_4_CoreBackend::versionStatus()); | - |
| 100 | delete d_1_4_Core; | - |
| 101 | } never executed: end of block | 0 |
| 102 | if (d_1_5_Core && !d_1_5_Core->refs.deref()) {| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 103 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_5_Core->context, QOpenGLFunctions_1_5_CoreBackend::versionStatus()); | - |
| 104 | delete d_1_5_Core; | - |
| 105 | } never executed: end of block | 0 |
| 106 | if (d_2_0_Core && !d_2_0_Core->refs.deref()) {| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 107 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_0_Core->context, QOpenGLFunctions_2_0_CoreBackend::versionStatus()); | - |
| 108 | delete d_2_0_Core; | - |
| 109 | } never executed: end of block | 0 |
| 110 | if (d_1_0_Deprecated && !d_1_0_Deprecated->refs.deref()) {| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 111 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Deprecated->context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus()); | - |
| 112 | delete d_1_0_Deprecated; | - |
| 113 | } never executed: end of block | 0 |
| 114 | if (d_1_1_Deprecated && !d_1_1_Deprecated->refs.deref()) {| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 115 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Deprecated->context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus()); | - |
| 116 | delete d_1_1_Deprecated; | - |
| 117 | } never executed: end of block | 0 |
| 118 | if (d_1_2_Deprecated && !d_1_2_Deprecated->refs.deref()) {| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 119 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Deprecated->context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus()); | - |
| 120 | delete d_1_2_Deprecated; | - |
| 121 | } never executed: end of block | 0 |
| 122 | if (d_1_3_Deprecated && !d_1_3_Deprecated->refs.deref()) {| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 123 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Deprecated->context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus()); | - |
| 124 | delete d_1_3_Deprecated; | - |
| 125 | } never executed: end of block | 0 |
| 126 | if (d_1_4_Deprecated && !d_1_4_Deprecated->refs.deref()) {| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 127 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Deprecated->context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus()); | - |
| 128 | delete d_1_4_Deprecated; | - |
| 129 | } never executed: end of block | 0 |
| 130 | } never executed: end of block | 0 |
| 131 | | - |
| 132 | bool QOpenGLFunctions_2_0::initializeOpenGLFunctions() | - |
| 133 | { | - |
| 134 | if ( isInitialized() )| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 135 | return true; never executed: return true; | 0 |
| 136 | | - |
| 137 | QOpenGLContext* context = QOpenGLContext::currentContext(); | - |
| 138 | | - |
| 139 | | - |
| 140 | | - |
| 141 | if (((owningContext() && owningContext() == context) || !owningContext())| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 142 | && QOpenGLFunctions_2_0::isContextCompatible(context))| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 143 | { | - |
| 144 | | - |
| 145 | | - |
| 146 | QOpenGLVersionFunctionsBackend* d = 0; | - |
| 147 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); | - |
| 148 | if (!d) {| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 149 | d = new QOpenGLFunctions_1_0_CoreBackend(context); | - |
| 150 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus(), d); | - |
| 151 | } never executed: end of block | 0 |
| 152 | d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d); | - |
| 153 | d->refs.ref(); | - |
| 154 | | - |
| 155 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus()); | - |
| 156 | if (!d) {| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 157 | d = new QOpenGLFunctions_1_1_CoreBackend(context); | - |
| 158 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus(), d); | - |
| 159 | } never executed: end of block | 0 |
| 160 | d_1_1_Core = static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d); | - |
| 161 | d->refs.ref(); | - |
| 162 | | - |
| 163 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus()); | - |
| 164 | if (!d) {| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 165 | d = new QOpenGLFunctions_1_2_CoreBackend(context); | - |
| 166 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus(), d); | - |
| 167 | } never executed: end of block | 0 |
| 168 | d_1_2_Core = static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d); | - |
| 169 | d->refs.ref(); | - |
| 170 | | - |
| 171 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus()); | - |
| 172 | if (!d) {| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 173 | d = new QOpenGLFunctions_1_3_CoreBackend(context); | - |
| 174 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus(), d); | - |
| 175 | } never executed: end of block | 0 |
| 176 | d_1_3_Core = static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d); | - |
| 177 | d->refs.ref(); | - |
| 178 | | - |
| 179 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus()); | - |
| 180 | if (!d) {| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 181 | d = new QOpenGLFunctions_1_4_CoreBackend(context); | - |
| 182 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus(), d); | - |
| 183 | } never executed: end of block | 0 |
| 184 | d_1_4_Core = static_cast<QOpenGLFunctions_1_4_CoreBackend*>(d); | - |
| 185 | d->refs.ref(); | - |
| 186 | | - |
| 187 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus()); | - |
| 188 | if (!d) {| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 189 | d = new QOpenGLFunctions_1_5_CoreBackend(context); | - |
| 190 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus(), d); | - |
| 191 | } never executed: end of block | 0 |
| 192 | d_1_5_Core = static_cast<QOpenGLFunctions_1_5_CoreBackend*>(d); | - |
| 193 | d->refs.ref(); | - |
| 194 | | - |
| 195 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus()); | - |
| 196 | if (!d) {| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 197 | d = new QOpenGLFunctions_2_0_CoreBackend(context); | - |
| 198 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus(), d); | - |
| 199 | } never executed: end of block | 0 |
| 200 | d_2_0_Core = static_cast<QOpenGLFunctions_2_0_CoreBackend*>(d); | - |
| 201 | d->refs.ref(); | - |
| 202 | | - |
| 203 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus()); | - |
| 204 | if (!d) {| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 205 | d = new QOpenGLFunctions_1_0_DeprecatedBackend(context); | - |
| 206 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus(), d); | - |
| 207 | } never executed: end of block | 0 |
| 208 | d_1_0_Deprecated = static_cast<QOpenGLFunctions_1_0_DeprecatedBackend*>(d); | - |
| 209 | d->refs.ref(); | - |
| 210 | | - |
| 211 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus()); | - |
| 212 | if (!d) {| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 213 | d = new QOpenGLFunctions_1_1_DeprecatedBackend(context); | - |
| 214 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus(), d); | - |
| 215 | } never executed: end of block | 0 |
| 216 | d_1_1_Deprecated = static_cast<QOpenGLFunctions_1_1_DeprecatedBackend*>(d); | - |
| 217 | d->refs.ref(); | - |
| 218 | | - |
| 219 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus()); | - |
| 220 | if (!d) {| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 221 | d = new QOpenGLFunctions_1_2_DeprecatedBackend(context); | - |
| 222 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus(), d); | - |
| 223 | } never executed: end of block | 0 |
| 224 | d_1_2_Deprecated = static_cast<QOpenGLFunctions_1_2_DeprecatedBackend*>(d); | - |
| 225 | d->refs.ref(); | - |
| 226 | | - |
| 227 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus()); | - |
| 228 | if (!d) {| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 229 | d = new QOpenGLFunctions_1_3_DeprecatedBackend(context); | - |
| 230 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus(), d); | - |
| 231 | } never executed: end of block | 0 |
| 232 | d_1_3_Deprecated = static_cast<QOpenGLFunctions_1_3_DeprecatedBackend*>(d); | - |
| 233 | d->refs.ref(); | - |
| 234 | | - |
| 235 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus()); | - |
| 236 | if (!d) {| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 237 | d = new QOpenGLFunctions_1_4_DeprecatedBackend(context); | - |
| 238 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus(), d); | - |
| 239 | } never executed: end of block | 0 |
| 240 | d_1_4_Deprecated = static_cast<QOpenGLFunctions_1_4_DeprecatedBackend*>(d); | - |
| 241 | d->refs.ref(); | - |
| 242 | | - |
| 243 | QAbstractOpenGLFunctions::initializeOpenGLFunctions(); | - |
| 244 | } never executed: end of block | 0 |
| 245 | return isInitialized(); never executed: return isInitialized(); | 0 |
| 246 | } | - |
| 247 | | - |
| 248 | bool QOpenGLFunctions_2_0::isContextCompatible(QOpenGLContext *context) | - |
| 249 | { | - |
| 250 | Q_ASSERT(context); | - |
| 251 | QSurfaceFormat f = context->format(); | - |
| 252 | const QPair<int, int> v = qMakePair(f.majorVersion(), f.minorVersion()); | - |
| 253 | if (v < qMakePair(2, 0))| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 254 | return false; never executed: return false; | 0 |
| 255 | | - |
| 256 | if (f.profile() == QSurfaceFormat::CoreProfile)| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 257 | return false; never executed: return false; | 0 |
| 258 | | - |
| 259 | return true; never executed: return true; | 0 |
| 260 | } | - |
| 261 | | - |
| 262 | QOpenGLVersionProfile QOpenGLFunctions_2_0::versionProfile() | - |
| 263 | { | - |
| 264 | QOpenGLVersionProfile v; | - |
| 265 | v.setVersion(2, 0); | - |
| 266 | return v; never executed: return v; | 0 |
| 267 | } | - |
| 268 | | - |
| 269 | QT_END_NAMESPACE | - |
| | |