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 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Core->context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); | - | ||||||||||||||||||
16 | delete d_1_0_Core; | - | ||||||||||||||||||
17 | } never executed: end of block | 0 | ||||||||||||||||||
18 | if (d_1_1_Core
| 0 | ||||||||||||||||||
19 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Core->context, QOpenGLFunctions_1_1_CoreBackend::versionStatus()); | - | ||||||||||||||||||
20 | delete d_1_1_Core; | - | ||||||||||||||||||
21 | } never executed: end of block | 0 | ||||||||||||||||||
22 | if (d_1_0_Deprecated
| 0 | ||||||||||||||||||
23 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Deprecated->context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus()); | - | ||||||||||||||||||
24 | delete d_1_0_Deprecated; | - | ||||||||||||||||||
25 | } never executed: end of block | 0 | ||||||||||||||||||
26 | if (d_1_1_Deprecated
| 0 | ||||||||||||||||||
27 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Deprecated->context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus()); | - | ||||||||||||||||||
28 | delete d_1_1_Deprecated; | - | ||||||||||||||||||
29 | } never executed: end of block | 0 | ||||||||||||||||||
30 | } never executed: end of block | 0 | ||||||||||||||||||
31 | - | |||||||||||||||||||
32 | bool QOpenGLFunctions_1_1::initializeOpenGLFunctions() | - | ||||||||||||||||||
33 | { | - | ||||||||||||||||||
34 | if ( isInitialized()
| 0 | ||||||||||||||||||
35 | return never executed: true;return true; never executed: return true; | 0 | ||||||||||||||||||
36 | - | |||||||||||||||||||
37 | QOpenGLContext* context = QOpenGLContext::currentContext(); | - | ||||||||||||||||||
38 | - | |||||||||||||||||||
39 | - | |||||||||||||||||||
40 | - | |||||||||||||||||||
41 | if (((owningContext()
| 0 | ||||||||||||||||||
42 | && QOpenGLFunctions_1_1::isContextCompatible(context)
| 0 | ||||||||||||||||||
43 | { | - | ||||||||||||||||||
44 | - | |||||||||||||||||||
45 | - | |||||||||||||||||||
46 | QOpenGLVersionFunctionsBackend* d = 0; | - | ||||||||||||||||||
47 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); | - | ||||||||||||||||||
48 | if (!d
| 0 | ||||||||||||||||||
49 | d = new QOpenGLFunctions_1_0_CoreBackend(context); | - | ||||||||||||||||||
50 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus(), d); | - | ||||||||||||||||||
51 | } never executed: end of block | 0 | ||||||||||||||||||
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 | if (!d
| 0 | ||||||||||||||||||
57 | d = new QOpenGLFunctions_1_1_CoreBackend(context); | - | ||||||||||||||||||
58 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus(), d); | - | ||||||||||||||||||
59 | } never executed: end of block | 0 | ||||||||||||||||||
60 | d_1_1_Core = static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d); | - | ||||||||||||||||||
61 | d->refs.ref(); | - | ||||||||||||||||||
62 | - | |||||||||||||||||||
63 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus()); | - | ||||||||||||||||||
64 | if (!d
| 0 | ||||||||||||||||||
65 | d = new QOpenGLFunctions_1_0_DeprecatedBackend(context); | - | ||||||||||||||||||
66 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus(), d); | - | ||||||||||||||||||
67 | } never executed: end of block | 0 | ||||||||||||||||||
68 | d_1_0_Deprecated = static_cast<QOpenGLFunctions_1_0_DeprecatedBackend*>(d); | - | ||||||||||||||||||
69 | d->refs.ref(); | - | ||||||||||||||||||
70 | - | |||||||||||||||||||
71 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus()); | - | ||||||||||||||||||
72 | if (!d
| 0 | ||||||||||||||||||
73 | d = new QOpenGLFunctions_1_1_DeprecatedBackend(context); | - | ||||||||||||||||||
74 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus(), d); | - | ||||||||||||||||||
75 | } never executed: end of block | 0 | ||||||||||||||||||
76 | d_1_1_Deprecated = static_cast<QOpenGLFunctions_1_1_DeprecatedBackend*>(d); | - | ||||||||||||||||||
77 | d->refs.ref(); | - | ||||||||||||||||||
78 | - | |||||||||||||||||||
79 | QAbstractOpenGLFunctions::initializeOpenGLFunctions(); | - | ||||||||||||||||||
80 | } never executed: end of block | 0 | ||||||||||||||||||
81 | return never executed: isInitialized();return isInitialized(); never executed: return isInitialized(); | 0 | ||||||||||||||||||
82 | } | - | ||||||||||||||||||
83 | - | |||||||||||||||||||
84 | bool QOpenGLFunctions_1_1::isContextCompatible(QOpenGLContext *context) | - | ||||||||||||||||||
85 | { | - | ||||||||||||||||||
86 | ((!(context)) ? qt_assert("context",__FILE__,145) : qt_noop()); | - | ||||||||||||||||||
87 | QSurfaceFormat f = context->format(); | - | ||||||||||||||||||
88 | const QPair<int, int> v = qMakePair(f.majorVersion(), f.minorVersion()); | - | ||||||||||||||||||
89 | if (v < qMakePair(1, 1)
| 0 | ||||||||||||||||||
90 | return never executed: false;return false; never executed: return false; | 0 | ||||||||||||||||||
91 | - | |||||||||||||||||||
92 | if (f.profile() == QSurfaceFormat::CoreProfile
| 0 | ||||||||||||||||||
93 | return never executed: false;return false; never executed: return false; | 0 | ||||||||||||||||||
94 | - | |||||||||||||||||||
95 | return never executed: true;return true; never executed: return true; | 0 | ||||||||||||||||||
96 | } | - | ||||||||||||||||||
97 | - | |||||||||||||||||||
98 | QOpenGLVersionProfile QOpenGLFunctions_1_1::versionProfile() | - | ||||||||||||||||||
99 | { | - | ||||||||||||||||||
100 | QOpenGLVersionProfile v; | - | ||||||||||||||||||
101 | v.setVersion(1, 1); | - | ||||||||||||||||||
102 | return never executed: v;return v; never executed: return v; | 0 | ||||||||||||||||||
103 | } | - | ||||||||||||||||||
104 | - | |||||||||||||||||||
105 | - | |||||||||||||||||||
Switch to Source code | Preprocessed file |