| Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/gui/opengl/qopenglfunctions_4_5_core.cpp |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||||||||
| 2 | - | |||||||||||||||||||
| 3 | QOpenGLFunctions_4_5_Core::QOpenGLFunctions_4_5_Core() | - | ||||||||||||||||||
| 4 | : QAbstractOpenGLFunctions() | - | ||||||||||||||||||
| 5 | , d_1_0_Core(0) | - | ||||||||||||||||||
| 6 | , d_1_1_Core(0) | - | ||||||||||||||||||
| 7 | , d_1_2_Core(0) | - | ||||||||||||||||||
| 8 | , d_1_3_Core(0) | - | ||||||||||||||||||
| 9 | , d_1_4_Core(0) | - | ||||||||||||||||||
| 10 | , d_1_5_Core(0) | - | ||||||||||||||||||
| 11 | , d_2_0_Core(0) | - | ||||||||||||||||||
| 12 | , d_2_1_Core(0) | - | ||||||||||||||||||
| 13 | , d_3_0_Core(0) | - | ||||||||||||||||||
| 14 | , d_3_1_Core(0) | - | ||||||||||||||||||
| 15 | , d_3_2_Core(0) | - | ||||||||||||||||||
| 16 | , d_3_3_Core(0) | - | ||||||||||||||||||
| 17 | , d_4_0_Core(0) | - | ||||||||||||||||||
| 18 | , d_4_1_Core(0) | - | ||||||||||||||||||
| 19 | , d_4_2_Core(0) | - | ||||||||||||||||||
| 20 | , d_4_3_Core(0) | - | ||||||||||||||||||
| 21 | , d_4_4_Core(0) | - | ||||||||||||||||||
| 22 | , d_4_5_Core(0) | - | ||||||||||||||||||
| 23 | { | - | ||||||||||||||||||
| 24 | } never executed: end of block | 0 | ||||||||||||||||||
| 25 | - | |||||||||||||||||||
| 26 | QOpenGLFunctions_4_5_Core::~QOpenGLFunctions_4_5_Core() | - | ||||||||||||||||||
| 27 | { | - | ||||||||||||||||||
| 28 | if (d_1_0_Core
| 0 | ||||||||||||||||||
| 29 | d_1_0_Core->refs.deref(); never executed: d_1_0_Core->refs.deref(); | 0 | ||||||||||||||||||
| 30 | ((!(d_1_0_Core->refs.load())) ? qt_assert("d_1_0_Core->refs.load()",__FILE__,95) : qt_noop()); | - | ||||||||||||||||||
| 31 | if (d_1_1_Core
| 0 | ||||||||||||||||||
| 32 | d_1_1_Core->refs.deref(); never executed: d_1_1_Core->refs.deref(); | 0 | ||||||||||||||||||
| 33 | ((!(d_1_1_Core->refs.load())) ? qt_assert("d_1_1_Core->refs.load()",__FILE__,98) : qt_noop()); | - | ||||||||||||||||||
| 34 | if (d_1_2_Core
| 0 | ||||||||||||||||||
| 35 | d_1_2_Core->refs.deref(); never executed: d_1_2_Core->refs.deref(); | 0 | ||||||||||||||||||
| 36 | ((!(d_1_2_Core->refs.load())) ? qt_assert("d_1_2_Core->refs.load()",__FILE__,101) : qt_noop()); | - | ||||||||||||||||||
| 37 | if (d_1_3_Core
| 0 | ||||||||||||||||||
| 38 | d_1_3_Core->refs.deref(); never executed: d_1_3_Core->refs.deref(); | 0 | ||||||||||||||||||
| 39 | ((!(d_1_3_Core->refs.load())) ? qt_assert("d_1_3_Core->refs.load()",__FILE__,104) : qt_noop()); | - | ||||||||||||||||||
| 40 | if (d_1_4_Core
| 0 | ||||||||||||||||||
| 41 | d_1_4_Core->refs.deref(); never executed: d_1_4_Core->refs.deref(); | 0 | ||||||||||||||||||
| 42 | ((!(d_1_4_Core->refs.load())) ? qt_assert("d_1_4_Core->refs.load()",__FILE__,107) : qt_noop()); | - | ||||||||||||||||||
| 43 | if (d_1_5_Core
| 0 | ||||||||||||||||||
| 44 | d_1_5_Core->refs.deref(); never executed: d_1_5_Core->refs.deref(); | 0 | ||||||||||||||||||
| 45 | ((!(d_1_5_Core->refs.load())) ? qt_assert("d_1_5_Core->refs.load()",__FILE__,110) : qt_noop()); | - | ||||||||||||||||||
| 46 | if (d_2_0_Core
| 0 | ||||||||||||||||||
| 47 | d_2_0_Core->refs.deref(); never executed: d_2_0_Core->refs.deref(); | 0 | ||||||||||||||||||
| 48 | ((!(d_2_0_Core->refs.load())) ? qt_assert("d_2_0_Core->refs.load()",__FILE__,113) : qt_noop()); | - | ||||||||||||||||||
| 49 | if (d_2_1_Core
| 0 | ||||||||||||||||||
| 50 | d_2_1_Core->refs.deref(); never executed: d_2_1_Core->refs.deref(); | 0 | ||||||||||||||||||
| 51 | ((!(d_2_1_Core->refs.load())) ? qt_assert("d_2_1_Core->refs.load()",__FILE__,116) : qt_noop()); | - | ||||||||||||||||||
| 52 | if (d_3_0_Core
| 0 | ||||||||||||||||||
| 53 | d_3_0_Core->refs.deref(); never executed: d_3_0_Core->refs.deref(); | 0 | ||||||||||||||||||
| 54 | ((!(d_3_0_Core->refs.load())) ? qt_assert("d_3_0_Core->refs.load()",__FILE__,119) : qt_noop()); | - | ||||||||||||||||||
| 55 | if (d_3_1_Core
| 0 | ||||||||||||||||||
| 56 | d_3_1_Core->refs.deref(); never executed: d_3_1_Core->refs.deref(); | 0 | ||||||||||||||||||
| 57 | ((!(d_3_1_Core->refs.load())) ? qt_assert("d_3_1_Core->refs.load()",__FILE__,122) : qt_noop()); | - | ||||||||||||||||||
| 58 | if (d_3_2_Core
| 0 | ||||||||||||||||||
| 59 | d_3_2_Core->refs.deref(); never executed: d_3_2_Core->refs.deref(); | 0 | ||||||||||||||||||
| 60 | ((!(d_3_2_Core->refs.load())) ? qt_assert("d_3_2_Core->refs.load()",__FILE__,125) : qt_noop()); | - | ||||||||||||||||||
| 61 | if (d_3_3_Core
| 0 | ||||||||||||||||||
| 62 | d_3_3_Core->refs.deref(); never executed: d_3_3_Core->refs.deref(); | 0 | ||||||||||||||||||
| 63 | ((!(d_3_3_Core->refs.load())) ? qt_assert("d_3_3_Core->refs.load()",__FILE__,128) : qt_noop()); | - | ||||||||||||||||||
| 64 | if (d_4_0_Core
| 0 | ||||||||||||||||||
| 65 | d_4_0_Core->refs.deref(); never executed: d_4_0_Core->refs.deref(); | 0 | ||||||||||||||||||
| 66 | ((!(d_4_0_Core->refs.load())) ? qt_assert("d_4_0_Core->refs.load()",__FILE__,131) : qt_noop()); | - | ||||||||||||||||||
| 67 | if (d_4_1_Core
| 0 | ||||||||||||||||||
| 68 | d_4_1_Core->refs.deref(); never executed: d_4_1_Core->refs.deref(); | 0 | ||||||||||||||||||
| 69 | ((!(d_4_1_Core->refs.load())) ? qt_assert("d_4_1_Core->refs.load()",__FILE__,134) : qt_noop()); | - | ||||||||||||||||||
| 70 | if (d_4_2_Core
| 0 | ||||||||||||||||||
| 71 | d_4_2_Core->refs.deref(); never executed: d_4_2_Core->refs.deref(); | 0 | ||||||||||||||||||
| 72 | ((!(d_4_2_Core->refs.load())) ? qt_assert("d_4_2_Core->refs.load()",__FILE__,137) : qt_noop()); | - | ||||||||||||||||||
| 73 | if (d_4_3_Core
| 0 | ||||||||||||||||||
| 74 | d_4_3_Core->refs.deref(); never executed: d_4_3_Core->refs.deref(); | 0 | ||||||||||||||||||
| 75 | ((!(d_4_3_Core->refs.load())) ? qt_assert("d_4_3_Core->refs.load()",__FILE__,140) : qt_noop()); | - | ||||||||||||||||||
| 76 | if (d_4_4_Core
| 0 | ||||||||||||||||||
| 77 | d_4_4_Core->refs.deref(); never executed: d_4_4_Core->refs.deref(); | 0 | ||||||||||||||||||
| 78 | ((!(d_4_4_Core->refs.load())) ? qt_assert("d_4_4_Core->refs.load()",__FILE__,143) : qt_noop()); | - | ||||||||||||||||||
| 79 | if (d_4_5_Core
| 0 | ||||||||||||||||||
| 80 | d_4_5_Core->refs.deref(); never executed: d_4_5_Core->refs.deref(); | 0 | ||||||||||||||||||
| 81 | ((!(d_4_5_Core->refs.load())) ? qt_assert("d_4_5_Core->refs.load()",__FILE__,146) : qt_noop()); | - | ||||||||||||||||||
| 82 | } never executed: end of block | 0 | ||||||||||||||||||
| 83 | - | |||||||||||||||||||
| 84 | bool QOpenGLFunctions_4_5_Core::initializeOpenGLFunctions() | - | ||||||||||||||||||
| 85 | { | - | ||||||||||||||||||
| 86 | if ( isInitialized()
| 0 | ||||||||||||||||||
| 87 | return never executed: true;return true;never executed: return true; | 0 | ||||||||||||||||||
| 88 | - | |||||||||||||||||||
| 89 | QOpenGLContext* context = QOpenGLContext::currentContext(); | - | ||||||||||||||||||
| 90 | - | |||||||||||||||||||
| 91 | - | |||||||||||||||||||
| 92 | - | |||||||||||||||||||
| 93 | if (((owningContext()
| 0 | ||||||||||||||||||
| 94 | && QOpenGLFunctions_4_5_Core::isContextCompatible(context)
| 0 | ||||||||||||||||||
| 95 | { | - | ||||||||||||||||||
| 96 | - | |||||||||||||||||||
| 97 | - | |||||||||||||||||||
| 98 | QOpenGLVersionFunctionsBackend* d = 0; | - | ||||||||||||||||||
| 99 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); | - | ||||||||||||||||||
| 100 | d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d); | - | ||||||||||||||||||
| 101 | d->refs.ref(); | - | ||||||||||||||||||
| 102 | - | |||||||||||||||||||
| 103 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus()); | - | ||||||||||||||||||
| 104 | d_1_1_Core = static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d); | - | ||||||||||||||||||
| 105 | d->refs.ref(); | - | ||||||||||||||||||
| 106 | - | |||||||||||||||||||
| 107 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus()); | - | ||||||||||||||||||
| 108 | d_1_2_Core = static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d); | - | ||||||||||||||||||
| 109 | d->refs.ref(); | - | ||||||||||||||||||
| 110 | - | |||||||||||||||||||
| 111 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus()); | - | ||||||||||||||||||
| 112 | d_1_3_Core = static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d); | - | ||||||||||||||||||
| 113 | d->refs.ref(); | - | ||||||||||||||||||
| 114 | - | |||||||||||||||||||
| 115 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus()); | - | ||||||||||||||||||
| 116 | d_1_4_Core = static_cast<QOpenGLFunctions_1_4_CoreBackend*>(d); | - | ||||||||||||||||||
| 117 | d->refs.ref(); | - | ||||||||||||||||||
| 118 | - | |||||||||||||||||||
| 119 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus()); | - | ||||||||||||||||||
| 120 | d_1_5_Core = static_cast<QOpenGLFunctions_1_5_CoreBackend*>(d); | - | ||||||||||||||||||
| 121 | d->refs.ref(); | - | ||||||||||||||||||
| 122 | - | |||||||||||||||||||
| 123 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus()); | - | ||||||||||||||||||
| 124 | d_2_0_Core = static_cast<QOpenGLFunctions_2_0_CoreBackend*>(d); | - | ||||||||||||||||||
| 125 | d->refs.ref(); | - | ||||||||||||||||||
| 126 | - | |||||||||||||||||||
| 127 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus()); | - | ||||||||||||||||||
| 128 | d_2_1_Core = static_cast<QOpenGLFunctions_2_1_CoreBackend*>(d); | - | ||||||||||||||||||
| 129 | d->refs.ref(); | - | ||||||||||||||||||
| 130 | - | |||||||||||||||||||
| 131 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus()); | - | ||||||||||||||||||
| 132 | d_3_0_Core = static_cast<QOpenGLFunctions_3_0_CoreBackend*>(d); | - | ||||||||||||||||||
| 133 | d->refs.ref(); | - | ||||||||||||||||||
| 134 | - | |||||||||||||||||||
| 135 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus()); | - | ||||||||||||||||||
| 136 | d_3_1_Core = static_cast<QOpenGLFunctions_3_1_CoreBackend*>(d); | - | ||||||||||||||||||
| 137 | d->refs.ref(); | - | ||||||||||||||||||
| 138 | - | |||||||||||||||||||
| 139 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus()); | - | ||||||||||||||||||
| 140 | d_3_2_Core = static_cast<QOpenGLFunctions_3_2_CoreBackend*>(d); | - | ||||||||||||||||||
| 141 | d->refs.ref(); | - | ||||||||||||||||||
| 142 | - | |||||||||||||||||||
| 143 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus()); | - | ||||||||||||||||||
| 144 | d_3_3_Core = static_cast<QOpenGLFunctions_3_3_CoreBackend*>(d); | - | ||||||||||||||||||
| 145 | d->refs.ref(); | - | ||||||||||||||||||
| 146 | - | |||||||||||||||||||
| 147 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_0_CoreBackend::versionStatus()); | - | ||||||||||||||||||
| 148 | d_4_0_Core = static_cast<QOpenGLFunctions_4_0_CoreBackend*>(d); | - | ||||||||||||||||||
| 149 | d->refs.ref(); | - | ||||||||||||||||||
| 150 | - | |||||||||||||||||||
| 151 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_1_CoreBackend::versionStatus()); | - | ||||||||||||||||||
| 152 | d_4_1_Core = static_cast<QOpenGLFunctions_4_1_CoreBackend*>(d); | - | ||||||||||||||||||
| 153 | d->refs.ref(); | - | ||||||||||||||||||
| 154 | - | |||||||||||||||||||
| 155 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_2_CoreBackend::versionStatus()); | - | ||||||||||||||||||
| 156 | d_4_2_Core = static_cast<QOpenGLFunctions_4_2_CoreBackend*>(d); | - | ||||||||||||||||||
| 157 | d->refs.ref(); | - | ||||||||||||||||||
| 158 | - | |||||||||||||||||||
| 159 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_3_CoreBackend::versionStatus()); | - | ||||||||||||||||||
| 160 | d_4_3_Core = static_cast<QOpenGLFunctions_4_3_CoreBackend*>(d); | - | ||||||||||||||||||
| 161 | d->refs.ref(); | - | ||||||||||||||||||
| 162 | - | |||||||||||||||||||
| 163 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_4_CoreBackend::versionStatus()); | - | ||||||||||||||||||
| 164 | d_4_4_Core = static_cast<QOpenGLFunctions_4_4_CoreBackend*>(d); | - | ||||||||||||||||||
| 165 | d->refs.ref(); | - | ||||||||||||||||||
| 166 | - | |||||||||||||||||||
| 167 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_5_CoreBackend::versionStatus()); | - | ||||||||||||||||||
| 168 | d_4_5_Core = static_cast<QOpenGLFunctions_4_5_CoreBackend*>(d); | - | ||||||||||||||||||
| 169 | d->refs.ref(); | - | ||||||||||||||||||
| 170 | - | |||||||||||||||||||
| 171 | QAbstractOpenGLFunctions::initializeOpenGLFunctions(); | - | ||||||||||||||||||
| 172 | } never executed: end of block | 0 | ||||||||||||||||||
| 173 | return never executed: isInitialized();return isInitialized();never executed: return isInitialized(); | 0 | ||||||||||||||||||
| 174 | } | - | ||||||||||||||||||
| 175 | - | |||||||||||||||||||
| 176 | bool QOpenGLFunctions_4_5_Core::isContextCompatible(QOpenGLContext *context) | - | ||||||||||||||||||
| 177 | { | - | ||||||||||||||||||
| 178 | ((!(context)) ? qt_assert("context",__FILE__,243) : qt_noop()); | - | ||||||||||||||||||
| 179 | QSurfaceFormat f = context->format(); | - | ||||||||||||||||||
| 180 | const QPair<int, int> v = qMakePair(f.majorVersion(), f.minorVersion()); | - | ||||||||||||||||||
| 181 | if (v < qMakePair(4, 5)
| 0 | ||||||||||||||||||
| 182 | return never executed: false;return false;never executed: return false; | 0 | ||||||||||||||||||
| 183 | - | |||||||||||||||||||
| 184 | return never executed: true;return true;never executed: return true; | 0 | ||||||||||||||||||
| 185 | } | - | ||||||||||||||||||
| 186 | - | |||||||||||||||||||
| 187 | QOpenGLVersionProfile QOpenGLFunctions_4_5_Core::versionProfile() | - | ||||||||||||||||||
| 188 | { | - | ||||||||||||||||||
| 189 | QOpenGLVersionProfile v; | - | ||||||||||||||||||
| 190 | v.setVersion(4, 5); | - | ||||||||||||||||||
| 191 | v.setProfile(QSurfaceFormat::CoreProfile); | - | ||||||||||||||||||
| 192 | return never executed: v;return v;never executed: return v; | 0 | ||||||||||||||||||
| 193 | } | - | ||||||||||||||||||
| 194 | - | |||||||||||||||||||
| 195 | - | |||||||||||||||||||
| Switch to Source code | Preprocessed file |