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