| 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 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Core->context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); | - | ||||||||||||||||||
| 14 | delete d_1_0_Core; | - | ||||||||||||||||||
| 15 | } never executed: end of block | 0 | ||||||||||||||||||
| 16 | if (d_1_0_Deprecated
| 0 | ||||||||||||||||||
| 17 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Deprecated->context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus()); | - | ||||||||||||||||||
| 18 | delete d_1_0_Deprecated; | - | ||||||||||||||||||
| 19 | } never executed: end of block | 0 | ||||||||||||||||||
| 20 | } never executed: end of block | 0 | ||||||||||||||||||
| 21 | - | |||||||||||||||||||
| 22 | bool QOpenGLFunctions_1_0::initializeOpenGLFunctions() | - | ||||||||||||||||||
| 23 | { | - | ||||||||||||||||||
| 24 | if ( isInitialized()
| 0 | ||||||||||||||||||
| 25 | return never executed: true;return true;never executed: return true; | 0 | ||||||||||||||||||
| 26 | - | |||||||||||||||||||
| 27 | QOpenGLContext* context = QOpenGLContext::currentContext(); | - | ||||||||||||||||||
| 28 | - | |||||||||||||||||||
| 29 | - | |||||||||||||||||||
| 30 | - | |||||||||||||||||||
| 31 | if (((owningContext()
| 0 | ||||||||||||||||||
| 32 | && QOpenGLFunctions_1_0::isContextCompatible(context)
| 0 | ||||||||||||||||||
| 33 | { | - | ||||||||||||||||||
| 34 | - | |||||||||||||||||||
| 35 | - | |||||||||||||||||||
| 36 | QOpenGLVersionFunctionsBackend* d = 0; | - | ||||||||||||||||||
| 37 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); | - | ||||||||||||||||||
| 38 | if (!d
| 0 | ||||||||||||||||||
| 39 | d = new QOpenGLFunctions_1_0_CoreBackend(context); | - | ||||||||||||||||||
| 40 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus(), d); | - | ||||||||||||||||||
| 41 | } never executed: end of block | 0 | ||||||||||||||||||
| 42 | d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d); | - | ||||||||||||||||||
| 43 | d->refs.ref(); | - | ||||||||||||||||||
| 44 | - | |||||||||||||||||||
| 45 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus()); | - | ||||||||||||||||||
| 46 | if (!d
| 0 | ||||||||||||||||||
| 47 | d = new QOpenGLFunctions_1_0_DeprecatedBackend(context); | - | ||||||||||||||||||
| 48 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus(), d); | - | ||||||||||||||||||
| 49 | } never executed: end of block | 0 | ||||||||||||||||||
| 50 | d_1_0_Deprecated = static_cast<QOpenGLFunctions_1_0_DeprecatedBackend*>(d); | - | ||||||||||||||||||
| 51 | d->refs.ref(); | - | ||||||||||||||||||
| 52 | - | |||||||||||||||||||
| 53 | QAbstractOpenGLFunctions::initializeOpenGLFunctions(); | - | ||||||||||||||||||
| 54 | } never executed: end of block | 0 | ||||||||||||||||||
| 55 | return never executed: isInitialized();return isInitialized();never executed: return isInitialized(); | 0 | ||||||||||||||||||
| 56 | } | - | ||||||||||||||||||
| 57 | - | |||||||||||||||||||
| 58 | bool QOpenGLFunctions_1_0::isContextCompatible(QOpenGLContext *context) | - | ||||||||||||||||||
| 59 | { | - | ||||||||||||||||||
| 60 | ((!(context)) ? qt_assert("context",__FILE__,119) : qt_noop()); | - | ||||||||||||||||||
| 61 | QSurfaceFormat f = context->format(); | - | ||||||||||||||||||
| 62 | const QPair<int, int> v = qMakePair(f.majorVersion(), f.minorVersion()); | - | ||||||||||||||||||
| 63 | if (v < qMakePair(1, 0)
| 0 | ||||||||||||||||||
| 64 | return never executed: false;return false;never executed: return false; | 0 | ||||||||||||||||||
| 65 | - | |||||||||||||||||||
| 66 | if (f.profile() == QSurfaceFormat::CoreProfile
| 0 | ||||||||||||||||||
| 67 | return never executed: false;return false;never executed: return false; | 0 | ||||||||||||||||||
| 68 | - | |||||||||||||||||||
| 69 | return never executed: true;return true;never executed: return true; | 0 | ||||||||||||||||||
| 70 | } | - | ||||||||||||||||||
| 71 | - | |||||||||||||||||||
| 72 | QOpenGLVersionProfile QOpenGLFunctions_1_0::versionProfile() | - | ||||||||||||||||||
| 73 | { | - | ||||||||||||||||||
| 74 | QOpenGLVersionProfile v; | - | ||||||||||||||||||
| 75 | v.setVersion(1, 0); | - | ||||||||||||||||||
| 76 | return never executed: v;return v;never executed: return v; | 0 | ||||||||||||||||||
| 77 | } | - | ||||||||||||||||||
| 78 | - | |||||||||||||||||||
| 79 | - | |||||||||||||||||||
| Switch to Source code | Preprocessed file |