| Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/gui/opengl/qopenglfunctions_1_2.cpp |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||||||||
| 2 | - | |||||||||||||||||||
| 3 | QOpenGLFunctions_1_2::QOpenGLFunctions_1_2() | - | ||||||||||||||||||
| 4 | : QAbstractOpenGLFunctions() | - | ||||||||||||||||||
| 5 | , d_1_0_Core(0) | - | ||||||||||||||||||
| 6 | , d_1_1_Core(0) | - | ||||||||||||||||||
| 7 | , d_1_2_Core(0) | - | ||||||||||||||||||
| 8 | , d_1_0_Deprecated(0) | - | ||||||||||||||||||
| 9 | , d_1_1_Deprecated(0) | - | ||||||||||||||||||
| 10 | , d_1_2_Deprecated(0) | - | ||||||||||||||||||
| 11 | { | - | ||||||||||||||||||
| 12 | } never executed: end of block | 0 | ||||||||||||||||||
| 13 | - | |||||||||||||||||||
| 14 | QOpenGLFunctions_1_2::~QOpenGLFunctions_1_2() | - | ||||||||||||||||||
| 15 | { | - | ||||||||||||||||||
| 16 | if (d_1_0_Core
| 0 | ||||||||||||||||||
| 17 | d_1_0_Core->refs.deref(); never executed: d_1_0_Core->refs.deref(); | 0 | ||||||||||||||||||
| 18 | ((!(d_1_0_Core->refs.load())) ? qt_assert("d_1_0_Core->refs.load()",__FILE__,83) : qt_noop()); | - | ||||||||||||||||||
| 19 | if (d_1_1_Core
| 0 | ||||||||||||||||||
| 20 | d_1_1_Core->refs.deref(); never executed: d_1_1_Core->refs.deref(); | 0 | ||||||||||||||||||
| 21 | ((!(d_1_1_Core->refs.load())) ? qt_assert("d_1_1_Core->refs.load()",__FILE__,86) : qt_noop()); | - | ||||||||||||||||||
| 22 | if (d_1_2_Core
| 0 | ||||||||||||||||||
| 23 | d_1_2_Core->refs.deref(); never executed: d_1_2_Core->refs.deref(); | 0 | ||||||||||||||||||
| 24 | ((!(d_1_2_Core->refs.load())) ? qt_assert("d_1_2_Core->refs.load()",__FILE__,89) : qt_noop()); | - | ||||||||||||||||||
| 25 | if (d_1_0_Deprecated
| 0 | ||||||||||||||||||
| 26 | d_1_0_Deprecated->refs.deref(); never executed: d_1_0_Deprecated->refs.deref(); | 0 | ||||||||||||||||||
| 27 | ((!(d_1_0_Deprecated->refs.load())) ? qt_assert("d_1_0_Deprecated->refs.load()",__FILE__,92) : qt_noop()); | - | ||||||||||||||||||
| 28 | if (d_1_1_Deprecated
| 0 | ||||||||||||||||||
| 29 | d_1_1_Deprecated->refs.deref(); never executed: d_1_1_Deprecated->refs.deref(); | 0 | ||||||||||||||||||
| 30 | ((!(d_1_1_Deprecated->refs.load())) ? qt_assert("d_1_1_Deprecated->refs.load()",__FILE__,95) : qt_noop()); | - | ||||||||||||||||||
| 31 | if (d_1_2_Deprecated
| 0 | ||||||||||||||||||
| 32 | d_1_2_Deprecated->refs.deref(); never executed: d_1_2_Deprecated->refs.deref(); | 0 | ||||||||||||||||||
| 33 | ((!(d_1_2_Deprecated->refs.load())) ? qt_assert("d_1_2_Deprecated->refs.load()",__FILE__,98) : qt_noop()); | - | ||||||||||||||||||
| 34 | } never executed: end of block | 0 | ||||||||||||||||||
| 35 | - | |||||||||||||||||||
| 36 | bool QOpenGLFunctions_1_2::initializeOpenGLFunctions() | - | ||||||||||||||||||
| 37 | { | - | ||||||||||||||||||
| 38 | if ( isInitialized()
| 0 | ||||||||||||||||||
| 39 | return never executed: true;return true;never executed: return true; | 0 | ||||||||||||||||||
| 40 | - | |||||||||||||||||||
| 41 | QOpenGLContext* context = QOpenGLContext::currentContext(); | - | ||||||||||||||||||
| 42 | - | |||||||||||||||||||
| 43 | - | |||||||||||||||||||
| 44 | - | |||||||||||||||||||
| 45 | if (((owningContext()
| 0 | ||||||||||||||||||
| 46 | && QOpenGLFunctions_1_2::isContextCompatible(context)
| 0 | ||||||||||||||||||
| 47 | { | - | ||||||||||||||||||
| 48 | - | |||||||||||||||||||
| 49 | - | |||||||||||||||||||
| 50 | QOpenGLVersionFunctionsBackend* d = 0; | - | ||||||||||||||||||
| 51 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); | - | ||||||||||||||||||
| 52 | d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d); | - | ||||||||||||||||||
| 53 | d->refs.ref(); | - | ||||||||||||||||||
| 54 | - | |||||||||||||||||||
| 55 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus()); | - | ||||||||||||||||||
| 56 | d_1_1_Core = static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d); | - | ||||||||||||||||||
| 57 | d->refs.ref(); | - | ||||||||||||||||||
| 58 | - | |||||||||||||||||||
| 59 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus()); | - | ||||||||||||||||||
| 60 | d_1_2_Core = static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d); | - | ||||||||||||||||||
| 61 | d->refs.ref(); | - | ||||||||||||||||||
| 62 | - | |||||||||||||||||||
| 63 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus()); | - | ||||||||||||||||||
| 64 | d_1_0_Deprecated = static_cast<QOpenGLFunctions_1_0_DeprecatedBackend*>(d); | - | ||||||||||||||||||
| 65 | d->refs.ref(); | - | ||||||||||||||||||
| 66 | - | |||||||||||||||||||
| 67 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus()); | - | ||||||||||||||||||
| 68 | d_1_1_Deprecated = static_cast<QOpenGLFunctions_1_1_DeprecatedBackend*>(d); | - | ||||||||||||||||||
| 69 | d->refs.ref(); | - | ||||||||||||||||||
| 70 | - | |||||||||||||||||||
| 71 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus()); | - | ||||||||||||||||||
| 72 | d_1_2_Deprecated = static_cast<QOpenGLFunctions_1_2_DeprecatedBackend*>(d); | - | ||||||||||||||||||
| 73 | d->refs.ref(); | - | ||||||||||||||||||
| 74 | - | |||||||||||||||||||
| 75 | QAbstractOpenGLFunctions::initializeOpenGLFunctions(); | - | ||||||||||||||||||
| 76 | } never executed: end of block | 0 | ||||||||||||||||||
| 77 | return never executed: isInitialized();return isInitialized();never executed: return isInitialized(); | 0 | ||||||||||||||||||
| 78 | } | - | ||||||||||||||||||
| 79 | - | |||||||||||||||||||
| 80 | bool QOpenGLFunctions_1_2::isContextCompatible(QOpenGLContext *context) | - | ||||||||||||||||||
| 81 | { | - | ||||||||||||||||||
| 82 | ((!(context)) ? qt_assert("context",__FILE__,147) : qt_noop()); | - | ||||||||||||||||||
| 83 | QSurfaceFormat f = context->format(); | - | ||||||||||||||||||
| 84 | const QPair<int, int> v = qMakePair(f.majorVersion(), f.minorVersion()); | - | ||||||||||||||||||
| 85 | if (v < qMakePair(1, 2)
| 0 | ||||||||||||||||||
| 86 | return never executed: false;return false;never executed: return false; | 0 | ||||||||||||||||||
| 87 | - | |||||||||||||||||||
| 88 | if (f.profile() == QSurfaceFormat::CoreProfile
| 0 | ||||||||||||||||||
| 89 | return never executed: false;return false;never executed: return false; | 0 | ||||||||||||||||||
| 90 | - | |||||||||||||||||||
| 91 | return never executed: true;return true;never executed: return true; | 0 | ||||||||||||||||||
| 92 | } | - | ||||||||||||||||||
| 93 | - | |||||||||||||||||||
| 94 | QOpenGLVersionProfile QOpenGLFunctions_1_2::versionProfile() | - | ||||||||||||||||||
| 95 | { | - | ||||||||||||||||||
| 96 | QOpenGLVersionProfile v; | - | ||||||||||||||||||
| 97 | v.setVersion(1, 2); | - | ||||||||||||||||||
| 98 | return never executed: v;return v;never executed: return v; | 0 | ||||||||||||||||||
| 99 | } | - | ||||||||||||||||||
| 100 | - | |||||||||||||||||||
| 101 | - | |||||||||||||||||||
| Switch to Source code | Preprocessed file |