Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/gui/opengl/qopenglfunctions_1_4.cpp |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | - | |||||||||||||||||||
2 | - | |||||||||||||||||||
3 | QOpenGLFunctions_1_4::QOpenGLFunctions_1_4() | - | ||||||||||||||||||
4 | : QAbstractOpenGLFunctions() | - | ||||||||||||||||||
5 | , d_1_0_Core(0) | - | ||||||||||||||||||
6 | , d_1_1_Core(0) | - | ||||||||||||||||||
7 | , d_1_2_Core(0) | - | ||||||||||||||||||
8 | , d_1_3_Core(0) | - | ||||||||||||||||||
9 | , d_1_4_Core(0) | - | ||||||||||||||||||
10 | , d_1_0_Deprecated(0) | - | ||||||||||||||||||
11 | , d_1_1_Deprecated(0) | - | ||||||||||||||||||
12 | , d_1_2_Deprecated(0) | - | ||||||||||||||||||
13 | , d_1_3_Deprecated(0) | - | ||||||||||||||||||
14 | , d_1_4_Deprecated(0) | - | ||||||||||||||||||
15 | { | - | ||||||||||||||||||
16 | } | - | ||||||||||||||||||
17 | - | |||||||||||||||||||
18 | QOpenGLFunctions_1_4::~QOpenGLFunctions_1_4() | - | ||||||||||||||||||
19 | { | - | ||||||||||||||||||
20 | if (d_1_0_Core&& !
| 0 | ||||||||||||||||||
21 | d_1_0_Core->refs.deref()) { never executed: d_1_0_Core->refs.deref(); | 0 | ||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend( never executed: d_1_0_Core->refs.deref(); never executed: ();d_1_0_Core->refs.deref(); never executed: d_1_0_Core->refs.deref(); | ||||||||||||||||||||
22 | ((!(d_1_0_Core->contextrefs.load())) ? qt_assert("d_1_0_Core->refs.load()",QOpenGLFunctions_1_0_CoreBackend::versionStatus__FILE__,87) : qt_noop()); | - | ||||||||||||||||||
23 | delete d_1_0_Core; | 0 | ||||||||||||||||||
}if (d_1_1_Core&& !
| ||||||||||||||||||||
24 | d_1_1_Core->refs.deref()) { never executed: d_1_1_Core->refs.deref(); | 0 | ||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend( never executed: d_1_1_Core->refs.deref(); never executed: ();d_1_1_Core->refs.deref(); never executed: d_1_1_Core->refs.deref(); | ||||||||||||||||||||
25 | ((!(d_1_1_Core->contextrefs.load())) ? qt_assert("d_1_1_Core->refs.load()",QOpenGLFunctions_1_1_CoreBackend::versionStatus__FILE__,90) : qt_noop()); | - | ||||||||||||||||||
26 | delete d_1_1_Core; | 0 | ||||||||||||||||||
}if (d_1_2_Core&& !
| ||||||||||||||||||||
27 | d_1_2_Core->refs.deref()) { never executed: d_1_2_Core->refs.deref(); | 0 | ||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend( never executed: d_1_2_Core->refs.deref(); never executed: ();d_1_2_Core->refs.deref(); never executed: d_1_2_Core->refs.deref(); | ||||||||||||||||||||
28 | ((!(d_1_2_Core->contextrefs.load())) ? qt_assert("d_1_2_Core->refs.load()",QOpenGLFunctions_1_2_CoreBackend::versionStatus__FILE__,93) : qt_noop()); | - | ||||||||||||||||||
29 | delete d_1_2_Core; | 0 | ||||||||||||||||||
}if (d_1_3_Core&& !
| ||||||||||||||||||||
30 | d_1_3_Core->refs.deref()) { never executed: d_1_3_Core->refs.deref(); | 0 | ||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend( never executed: d_1_3_Core->refs.deref(); never executed: ();d_1_3_Core->refs.deref(); never executed: d_1_3_Core->refs.deref(); | ||||||||||||||||||||
31 | ((!(d_1_3_Core->contextrefs.load())) ? qt_assert("d_1_3_Core->refs.load()",QOpenGLFunctions_1_3_CoreBackend::versionStatus__FILE__,96) : qt_noop()); | - | ||||||||||||||||||
32 | delete d_1_3_Core; | 0 | ||||||||||||||||||
}if (d_1_4_Core&& !
| ||||||||||||||||||||
33 | d_1_4_Core->refs.deref()) { never executed: d_1_4_Core->refs.deref(); | 0 | ||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend( never executed: d_1_4_Core->refs.deref(); never executed: ();d_1_4_Core->refs.deref(); never executed: d_1_4_Core->refs.deref(); | ||||||||||||||||||||
34 | ((!(d_1_4_Core->contextrefs.load())) ? qt_assert("d_1_4_Core->refs.load()",QOpenGLFunctions_1_4_CoreBackend::versionStatus__FILE__,99) : qt_noop()); | - | ||||||||||||||||||
35 | delete d_1_4_Core; | 0 | ||||||||||||||||||
}if (d_1_0_Deprecated&& !
| ||||||||||||||||||||
36 | d_1_0_Deprecated->refs.deref()) { never executed: d_1_0_Deprecated->refs.deref(); | 0 | ||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend( never executed: d_1_0_Deprecated->refs.deref(); never executed: ();d_1_0_Deprecated->refs.deref(); never executed: d_1_0_Deprecated->refs.deref(); | ||||||||||||||||||||
37 | ((!(d_1_0_Deprecated->contextrefs.load())) ? qt_assert("d_1_0_Deprecated->refs.load()",QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus__FILE__,102) : qt_noop()); | - | ||||||||||||||||||
38 | delete d_1_0_Deprecated; | 0 | ||||||||||||||||||
}if (d_1_1_Deprecated&& !
| ||||||||||||||||||||
39 | d_1_1_Deprecated->refs.deref()) { never executed: d_1_1_Deprecated->refs.deref(); | 0 | ||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend( never executed: d_1_1_Deprecated->refs.deref(); never executed: ();d_1_1_Deprecated->refs.deref(); never executed: d_1_1_Deprecated->refs.deref(); | ||||||||||||||||||||
40 | ((!(d_1_1_Deprecated->contextrefs.load())) ? qt_assert("d_1_1_Deprecated->refs.load()",QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus__FILE__,105) : qt_noop()); | - | ||||||||||||||||||
41 | delete d_1_1_Deprecated; | 0 | ||||||||||||||||||
}if (d_1_2_Deprecated&& !
| ||||||||||||||||||||
42 | d_1_2_Deprecated->refs.deref()) { never executed: d_1_2_Deprecated->refs.deref(); | 0 | ||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend( never executed: d_1_2_Deprecated->refs.deref(); never executed: ();d_1_2_Deprecated->refs.deref(); never executed: d_1_2_Deprecated->refs.deref(); | ||||||||||||||||||||
43 | ((!(d_1_2_Deprecated->contextrefs.load())) ? qt_assert("d_1_2_Deprecated->refs.load()",QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus__FILE__,108) : qt_noop()); | - | ||||||||||||||||||
44 | delete d_1_2_Deprecated; | 0 | ||||||||||||||||||
}if (d_1_3_Deprecated&& !
| ||||||||||||||||||||
45 | d_1_3_Deprecated->refs.deref()) { never executed: d_1_3_Deprecated->refs.deref(); | 0 | ||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend( never executed: d_1_3_Deprecated->refs.deref(); never executed: ();d_1_3_Deprecated->refs.deref(); never executed: d_1_3_Deprecated->refs.deref(); | ||||||||||||||||||||
46 | ((!(d_1_3_Deprecated->contextrefs.load())) ? qt_assert("d_1_3_Deprecated->refs.load()",QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus__FILE__,111) : qt_noop()); | - | ||||||||||||||||||
47 | delete d_1_3_Deprecated; | 0 | ||||||||||||||||||
}if (d_1_4_Deprecated&& !
| ||||||||||||||||||||
48 | d_1_4_Deprecated->refs.deref()) { never executed: d_1_4_Deprecated->refs.deref(); | 0 | ||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend( never executed: d_1_4_Deprecated->refs.deref(); never executed: ();d_1_4_Deprecated->refs.deref(); never executed: d_1_4_Deprecated->refs.deref(); | ||||||||||||||||||||
49 | ((!(d_1_4_Deprecated->contextrefs.load())) ? qt_assert("d_1_4_Deprecated->refs.load()",QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus__FILE__,114) : qt_noop()); | - | ||||||||||||||||||
delete d_1_4_Deprecated; | ||||||||||||||||||||
}} never executed: end of block | ||||||||||||||||||||
51 | - | |||||||||||||||||||
52 | bool QOpenGLFunctions_1_4::initializeOpenGLFunctions() | - | ||||||||||||||||||
53 | { | - | ||||||||||||||||||
54 | if ( isInitialized()
| 0 | ||||||||||||||||||
55 | return never executed: true;return true; never executed: return true; | 0 | ||||||||||||||||||
56 | - | |||||||||||||||||||
57 | QOpenGLContext* context = QOpenGLContext::currentContext(); | - | ||||||||||||||||||
58 | - | |||||||||||||||||||
59 | - | |||||||||||||||||||
60 | - | |||||||||||||||||||
61 | if (((owningContext()
| 0 | ||||||||||||||||||
62 | && QOpenGLFunctions_1_4::isContextCompatible(context)
| 0 | ||||||||||||||||||
63 | { | - | ||||||||||||||||||
64 | - | |||||||||||||||||||
65 | - | |||||||||||||||||||
66 | QOpenGLVersionFunctionsBackend* d = 0; | - | ||||||||||||||||||
67 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); | - | ||||||||||||||||||
68 | if (!d) { | - | ||||||||||||||||||
d = new QOpenGLFunctions_1_0_CoreBackend(context); | ||||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus(), d); | ||||||||||||||||||||
}d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d); | ||||||||||||||||||||
69 | d->refs.ref(); | - | ||||||||||||||||||
70 | - | |||||||||||||||||||
71 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus()); | - | ||||||||||||||||||
72 | if (!d) { | - | ||||||||||||||||||
d = new QOpenGLFunctions_1_1_CoreBackend(context); | ||||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus(), d); | ||||||||||||||||||||
}d_1_1_Core = static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d); | ||||||||||||||||||||
73 | d->refs.ref(); | - | ||||||||||||||||||
74 | - | |||||||||||||||||||
75 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus()); | - | ||||||||||||||||||
76 | if (!d) { | - | ||||||||||||||||||
d = new QOpenGLFunctions_1_2_CoreBackend(context); | ||||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus(), d); | ||||||||||||||||||||
}d_1_2_Core = static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d); | ||||||||||||||||||||
77 | d->refs.ref(); | - | ||||||||||||||||||
78 | - | |||||||||||||||||||
79 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus()); | - | ||||||||||||||||||
80 | if (!d) { | - | ||||||||||||||||||
d = new QOpenGLFunctions_1_3_CoreBackend(context); | ||||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus(), d); | ||||||||||||||||||||
}d_1_3_Core = static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d); | ||||||||||||||||||||
81 | d->refs.ref(); | - | ||||||||||||||||||
82 | - | |||||||||||||||||||
83 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus()); | - | ||||||||||||||||||
84 | if (!d) { | - | ||||||||||||||||||
d = new QOpenGLFunctions_1_4_CoreBackend(context); | ||||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus(), d); | ||||||||||||||||||||
}d_1_4_Core = static_cast<QOpenGLFunctions_1_4_CoreBackend*>(d); | ||||||||||||||||||||
85 | d->refs.ref(); | - | ||||||||||||||||||
86 | - | |||||||||||||||||||
87 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus()); | - | ||||||||||||||||||
88 | if (!d) { | - | ||||||||||||||||||
d = new QOpenGLFunctions_1_0_DeprecatedBackend(context); | ||||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus(), d); | ||||||||||||||||||||
}d_1_0_Deprecated = static_cast<QOpenGLFunctions_1_0_DeprecatedBackend*>(d); | ||||||||||||||||||||
89 | d->refs.ref(); | - | ||||||||||||||||||
90 | - | |||||||||||||||||||
91 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus()); | - | ||||||||||||||||||
92 | if (!d) { | - | ||||||||||||||||||
d = new QOpenGLFunctions_1_1_DeprecatedBackend(context); | ||||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus(), d); | ||||||||||||||||||||
}d_1_1_Deprecated = static_cast<QOpenGLFunctions_1_1_DeprecatedBackend*>(d); | ||||||||||||||||||||
93 | d->refs.ref(); | - | ||||||||||||||||||
94 | - | |||||||||||||||||||
95 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus()); | - | ||||||||||||||||||
96 | if (!d) { | - | ||||||||||||||||||
d = new QOpenGLFunctions_1_2_DeprecatedBackend(context); | ||||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus(), d); | ||||||||||||||||||||
}d_1_2_Deprecated = static_cast<QOpenGLFunctions_1_2_DeprecatedBackend*>(d); | ||||||||||||||||||||
97 | d->refs.ref(); | - | ||||||||||||||||||
98 | - | |||||||||||||||||||
99 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus()); | - | ||||||||||||||||||
100 | if (!d) { | - | ||||||||||||||||||
d = new QOpenGLFunctions_1_3_DeprecatedBackend(context); | ||||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus(), d); | ||||||||||||||||||||
}d_1_3_Deprecated = static_cast<QOpenGLFunctions_1_3_DeprecatedBackend*>(d); | ||||||||||||||||||||
101 | d->refs.ref(); | - | ||||||||||||||||||
102 | - | |||||||||||||||||||
103 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus()); | - | ||||||||||||||||||
104 | if (!d) { | - | ||||||||||||||||||
d = new QOpenGLFunctions_1_4_DeprecatedBackend(context); | ||||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus(), d); | ||||||||||||||||||||
}d_1_4_Deprecated = static_cast<QOpenGLFunctions_1_4_DeprecatedBackend*>(d); | ||||||||||||||||||||
105 | d->refs.ref(); | - | ||||||||||||||||||
106 | - | |||||||||||||||||||
107 | QAbstractOpenGLFunctions::initializeOpenGLFunctions(); | - | ||||||||||||||||||
108 | } never executed: end of block | 0 | ||||||||||||||||||
109 | return never executed: isInitialized();return isInitialized(); never executed: return isInitialized(); | 0 | ||||||||||||||||||
110 | } | - | ||||||||||||||||||
111 | - | |||||||||||||||||||
112 | bool QOpenGLFunctions_1_4::isContextCompatible(QOpenGLContext *context) | - | ||||||||||||||||||
113 | { | - | ||||||||||||||||||
114 | ((!(context)) ? qt_assert("context",__FILE__,223179) : qt_noop()); | - | ||||||||||||||||||
115 | QSurfaceFormat f = context->format(); | - | ||||||||||||||||||
116 | const QPair<int, int> v = qMakePair(f.majorVersion(), f.minorVersion()); | - | ||||||||||||||||||
117 | if (v < qMakePair(1, 4)) | - | ||||||||||||||||||
118 | return false; | - | ||||||||||||||||||
119 | - | |||||||||||||||||||
120 | if (f.profile() == QSurfaceFormat::CoreProfile) | - | ||||||||||||||||||
121 | return false; | - | ||||||||||||||||||
122 | - | |||||||||||||||||||
123 | return true; | - | ||||||||||||||||||
124 | } | - | ||||||||||||||||||
125 | - | |||||||||||||||||||
126 | QOpenGLVersionProfile QOpenGLFunctions_1_4::versionProfile() | - | ||||||||||||||||||
127 | { | - | ||||||||||||||||||
128 | QOpenGLVersionProfile v; | - | ||||||||||||||||||
129 | v.setVersion(1, 4); | - | ||||||||||||||||||
130 | return v; | - | ||||||||||||||||||
131 | } | - | ||||||||||||||||||
132 | - | |||||||||||||||||||
133 | - | |||||||||||||||||||
Switch to Source code | Preprocessed file |