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