| 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_4_1_core.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_4_1_Core::QOpenGLFunctions_4_1_Core() | - |
| 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_2_1_Core(0) | - |
| 72 | , d_3_0_Core(0) | - |
| 73 | , d_3_1_Core(0) | - |
| 74 | , d_3_2_Core(0) | - |
| 75 | , d_3_3_Core(0) | - |
| 76 | , d_4_0_Core(0) | - |
| 77 | , d_4_1_Core(0) | - |
| 78 | { | - |
| 79 | } never executed: end of block | 0 |
| 80 | | - |
| 81 | QOpenGLFunctions_4_1_Core::~QOpenGLFunctions_4_1_Core() | - |
| 82 | { | - |
| 83 | if (d_1_0_Core && !d_1_0_Core->refs.deref()) {| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 84 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Core->context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); | - |
| 85 | delete d_1_0_Core; | - |
| 86 | } never executed: end of block | 0 |
| 87 | if (d_1_1_Core && !d_1_1_Core->refs.deref()) {| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 88 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Core->context, QOpenGLFunctions_1_1_CoreBackend::versionStatus()); | - |
| 89 | delete d_1_1_Core; | - |
| 90 | } never executed: end of block | 0 |
| 91 | if (d_1_2_Core && !d_1_2_Core->refs.deref()) {| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 92 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Core->context, QOpenGLFunctions_1_2_CoreBackend::versionStatus()); | - |
| 93 | delete d_1_2_Core; | - |
| 94 | } never executed: end of block | 0 |
| 95 | if (d_1_3_Core && !d_1_3_Core->refs.deref()) {| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 96 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Core->context, QOpenGLFunctions_1_3_CoreBackend::versionStatus()); | - |
| 97 | delete d_1_3_Core; | - |
| 98 | } never executed: end of block | 0 |
| 99 | if (d_1_4_Core && !d_1_4_Core->refs.deref()) {| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 100 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Core->context, QOpenGLFunctions_1_4_CoreBackend::versionStatus()); | - |
| 101 | delete d_1_4_Core; | - |
| 102 | } never executed: end of block | 0 |
| 103 | if (d_1_5_Core && !d_1_5_Core->refs.deref()) {| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 104 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_5_Core->context, QOpenGLFunctions_1_5_CoreBackend::versionStatus()); | - |
| 105 | delete d_1_5_Core; | - |
| 106 | } never executed: end of block | 0 |
| 107 | if (d_2_0_Core && !d_2_0_Core->refs.deref()) {| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 108 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_0_Core->context, QOpenGLFunctions_2_0_CoreBackend::versionStatus()); | - |
| 109 | delete d_2_0_Core; | - |
| 110 | } never executed: end of block | 0 |
| 111 | if (d_2_1_Core && !d_2_1_Core->refs.deref()) {| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 112 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_1_Core->context, QOpenGLFunctions_2_1_CoreBackend::versionStatus()); | - |
| 113 | delete d_2_1_Core; | - |
| 114 | } never executed: end of block | 0 |
| 115 | if (d_3_0_Core && !d_3_0_Core->refs.deref()) {| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 116 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_0_Core->context, QOpenGLFunctions_3_0_CoreBackend::versionStatus()); | - |
| 117 | delete d_3_0_Core; | - |
| 118 | } never executed: end of block | 0 |
| 119 | if (d_3_1_Core && !d_3_1_Core->refs.deref()) {| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 120 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_1_Core->context, QOpenGLFunctions_3_1_CoreBackend::versionStatus()); | - |
| 121 | delete d_3_1_Core; | - |
| 122 | } never executed: end of block | 0 |
| 123 | if (d_3_2_Core && !d_3_2_Core->refs.deref()) {| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 124 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_2_Core->context, QOpenGLFunctions_3_2_CoreBackend::versionStatus()); | - |
| 125 | delete d_3_2_Core; | - |
| 126 | } never executed: end of block | 0 |
| 127 | if (d_3_3_Core && !d_3_3_Core->refs.deref()) {| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 128 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_3_Core->context, QOpenGLFunctions_3_3_CoreBackend::versionStatus()); | - |
| 129 | delete d_3_3_Core; | - |
| 130 | } never executed: end of block | 0 |
| 131 | if (d_4_0_Core && !d_4_0_Core->refs.deref()) {| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 132 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_0_Core->context, QOpenGLFunctions_4_0_CoreBackend::versionStatus()); | - |
| 133 | delete d_4_0_Core; | - |
| 134 | } never executed: end of block | 0 |
| 135 | if (d_4_1_Core && !d_4_1_Core->refs.deref()) {| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 136 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_1_Core->context, QOpenGLFunctions_4_1_CoreBackend::versionStatus()); | - |
| 137 | delete d_4_1_Core; | - |
| 138 | } never executed: end of block | 0 |
| 139 | } never executed: end of block | 0 |
| 140 | | - |
| 141 | bool QOpenGLFunctions_4_1_Core::initializeOpenGLFunctions() | - |
| 142 | { | - |
| 143 | if ( isInitialized() )| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 144 | return true; never executed: return true; | 0 |
| 145 | | - |
| 146 | QOpenGLContext* context = QOpenGLContext::currentContext(); | - |
| 147 | | - |
| 148 | | - |
| 149 | | - |
| 150 | if (((owningContext() && owningContext() == context) || !owningContext())| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | never evaluated |
| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 151 | && QOpenGLFunctions_4_1_Core::isContextCompatible(context))| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 152 | { | - |
| 153 | | - |
| 154 | | - |
| 155 | QOpenGLVersionFunctionsBackend* d = 0; | - |
| 156 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); | - |
| 157 | if (!d) {| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 158 | d = new QOpenGLFunctions_1_0_CoreBackend(context); | - |
| 159 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus(), d); | - |
| 160 | } never executed: end of block | 0 |
| 161 | d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d); | - |
| 162 | d->refs.ref(); | - |
| 163 | | - |
| 164 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus()); | - |
| 165 | if (!d) {| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 166 | d = new QOpenGLFunctions_1_1_CoreBackend(context); | - |
| 167 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus(), d); | - |
| 168 | } never executed: end of block | 0 |
| 169 | d_1_1_Core = static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d); | - |
| 170 | d->refs.ref(); | - |
| 171 | | - |
| 172 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus()); | - |
| 173 | if (!d) {| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 174 | d = new QOpenGLFunctions_1_2_CoreBackend(context); | - |
| 175 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus(), d); | - |
| 176 | } never executed: end of block | 0 |
| 177 | d_1_2_Core = static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d); | - |
| 178 | d->refs.ref(); | - |
| 179 | | - |
| 180 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus()); | - |
| 181 | if (!d) {| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 182 | d = new QOpenGLFunctions_1_3_CoreBackend(context); | - |
| 183 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus(), d); | - |
| 184 | } never executed: end of block | 0 |
| 185 | d_1_3_Core = static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d); | - |
| 186 | d->refs.ref(); | - |
| 187 | | - |
| 188 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus()); | - |
| 189 | if (!d) {| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 190 | d = new QOpenGLFunctions_1_4_CoreBackend(context); | - |
| 191 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus(), d); | - |
| 192 | } never executed: end of block | 0 |
| 193 | d_1_4_Core = static_cast<QOpenGLFunctions_1_4_CoreBackend*>(d); | - |
| 194 | d->refs.ref(); | - |
| 195 | | - |
| 196 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus()); | - |
| 197 | if (!d) {| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 198 | d = new QOpenGLFunctions_1_5_CoreBackend(context); | - |
| 199 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus(), d); | - |
| 200 | } never executed: end of block | 0 |
| 201 | d_1_5_Core = static_cast<QOpenGLFunctions_1_5_CoreBackend*>(d); | - |
| 202 | d->refs.ref(); | - |
| 203 | | - |
| 204 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus()); | - |
| 205 | if (!d) {| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 206 | d = new QOpenGLFunctions_2_0_CoreBackend(context); | - |
| 207 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus(), d); | - |
| 208 | } never executed: end of block | 0 |
| 209 | d_2_0_Core = static_cast<QOpenGLFunctions_2_0_CoreBackend*>(d); | - |
| 210 | d->refs.ref(); | - |
| 211 | | - |
| 212 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus()); | - |
| 213 | if (!d) {| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 214 | d = new QOpenGLFunctions_2_1_CoreBackend(context); | - |
| 215 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus(), d); | - |
| 216 | } never executed: end of block | 0 |
| 217 | d_2_1_Core = static_cast<QOpenGLFunctions_2_1_CoreBackend*>(d); | - |
| 218 | d->refs.ref(); | - |
| 219 | | - |
| 220 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus()); | - |
| 221 | if (!d) {| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 222 | d = new QOpenGLFunctions_3_0_CoreBackend(context); | - |
| 223 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus(), d); | - |
| 224 | } never executed: end of block | 0 |
| 225 | d_3_0_Core = static_cast<QOpenGLFunctions_3_0_CoreBackend*>(d); | - |
| 226 | d->refs.ref(); | - |
| 227 | | - |
| 228 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus()); | - |
| 229 | if (!d) {| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 230 | d = new QOpenGLFunctions_3_1_CoreBackend(context); | - |
| 231 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus(), d); | - |
| 232 | } never executed: end of block | 0 |
| 233 | d_3_1_Core = static_cast<QOpenGLFunctions_3_1_CoreBackend*>(d); | - |
| 234 | d->refs.ref(); | - |
| 235 | | - |
| 236 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus()); | - |
| 237 | if (!d) {| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 238 | d = new QOpenGLFunctions_3_2_CoreBackend(context); | - |
| 239 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus(), d); | - |
| 240 | } never executed: end of block | 0 |
| 241 | d_3_2_Core = static_cast<QOpenGLFunctions_3_2_CoreBackend*>(d); | - |
| 242 | d->refs.ref(); | - |
| 243 | | - |
| 244 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus()); | - |
| 245 | if (!d) {| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 246 | d = new QOpenGLFunctions_3_3_CoreBackend(context); | - |
| 247 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus(), d); | - |
| 248 | } never executed: end of block | 0 |
| 249 | d_3_3_Core = static_cast<QOpenGLFunctions_3_3_CoreBackend*>(d); | - |
| 250 | d->refs.ref(); | - |
| 251 | | - |
| 252 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_0_CoreBackend::versionStatus()); | - |
| 253 | if (!d) {| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 254 | d = new QOpenGLFunctions_4_0_CoreBackend(context); | - |
| 255 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_0_CoreBackend::versionStatus(), d); | - |
| 256 | } never executed: end of block | 0 |
| 257 | d_4_0_Core = static_cast<QOpenGLFunctions_4_0_CoreBackend*>(d); | - |
| 258 | d->refs.ref(); | - |
| 259 | | - |
| 260 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_1_CoreBackend::versionStatus()); | - |
| 261 | if (!d) {| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 262 | d = new QOpenGLFunctions_4_1_CoreBackend(context); | - |
| 263 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_1_CoreBackend::versionStatus(), d); | - |
| 264 | } never executed: end of block | 0 |
| 265 | d_4_1_Core = static_cast<QOpenGLFunctions_4_1_CoreBackend*>(d); | - |
| 266 | d->refs.ref(); | - |
| 267 | | - |
| 268 | QAbstractOpenGLFunctions::initializeOpenGLFunctions(); | - |
| 269 | } never executed: end of block | 0 |
| 270 | return isInitialized(); never executed: return isInitialized(); | 0 |
| 271 | } | - |
| 272 | | - |
| 273 | bool QOpenGLFunctions_4_1_Core::isContextCompatible(QOpenGLContext *context) | - |
| 274 | { | - |
| 275 | Q_ASSERT(context); | - |
| 276 | QSurfaceFormat f = context->format(); | - |
| 277 | const QPair<int, int> v = qMakePair(f.majorVersion(), f.minorVersion()); | - |
| 278 | if (v < qMakePair(4, 1))| TRUE | never evaluated | | FALSE | never evaluated |
| 0 |
| 279 | return false; never executed: return false; | 0 |
| 280 | | - |
| 281 | return true; never executed: return true; | 0 |
| 282 | } | - |
| 283 | | - |
| 284 | QOpenGLVersionProfile QOpenGLFunctions_4_1_Core::versionProfile() | - |
| 285 | { | - |
| 286 | QOpenGLVersionProfile v; | - |
| 287 | v.setVersion(4, 1); | - |
| 288 | v.setProfile(QSurfaceFormat::CoreProfile); | - |
| 289 | return v; never executed: return v; | 0 |
| 290 | } | - |
| 291 | | - |
| 292 | QT_END_NAMESPACE | - |
| | |