Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/gui/opengl/qopenglfunctions_3_2_compatibility.cpp |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | - | |||||||||||||||||||
2 | - | |||||||||||||||||||
3 | QOpenGLFunctions_3_2_Compatibility::QOpenGLFunctions_3_2_Compatibility() | - | ||||||||||||||||||
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_5_Core(0) | - | ||||||||||||||||||
11 | , d_2_0_Core(0) | - | ||||||||||||||||||
12 | , d_2_1_Core(0) | - | ||||||||||||||||||
13 | , d_3_0_Core(0) | - | ||||||||||||||||||
14 | , d_3_1_Core(0) | - | ||||||||||||||||||
15 | , d_3_2_Core(0) | - | ||||||||||||||||||
16 | , d_1_0_Deprecated(0) | - | ||||||||||||||||||
17 | , d_1_1_Deprecated(0) | - | ||||||||||||||||||
18 | , d_1_2_Deprecated(0) | - | ||||||||||||||||||
19 | , d_1_3_Deprecated(0) | - | ||||||||||||||||||
20 | , d_1_4_Deprecated(0) | - | ||||||||||||||||||
21 | , m_reserved_2_0_Deprecated(nullptr) | - | ||||||||||||||||||
22 | , m_reserved_3_0_Deprecated(nullptr) | - | ||||||||||||||||||
23 | { | - | ||||||||||||||||||
24 | } | - | ||||||||||||||||||
25 | - | |||||||||||||||||||
26 | QOpenGLFunctions_3_2_Compatibility::~QOpenGLFunctions_3_2_Compatibility() | - | ||||||||||||||||||
27 | { | - | ||||||||||||||||||
28 | if (d_1_0_Core&& !
| 0 | ||||||||||||||||||
29 | 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(); | ||||||||||||||||||||
30 | ((!(d_1_0_Core->contextrefs.load())) ? qt_assert("d_1_0_Core->refs.load()",QOpenGLFunctions_1_0_CoreBackend::versionStatus__FILE__,95) : qt_noop()); | - | ||||||||||||||||||
31 | delete d_1_0_Core; | 0 | ||||||||||||||||||
}if (d_1_1_Core&& !
| ||||||||||||||||||||
32 | 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(); | ||||||||||||||||||||
33 | ((!(d_1_1_Core->contextrefs.load())) ? qt_assert("d_1_1_Core->refs.load()",QOpenGLFunctions_1_1_CoreBackend::versionStatus__FILE__,98) : qt_noop()); | - | ||||||||||||||||||
34 | delete d_1_1_Core; | 0 | ||||||||||||||||||
}if (d_1_2_Core&& !
| ||||||||||||||||||||
35 | 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(); | ||||||||||||||||||||
36 | ((!(d_1_2_Core->contextrefs.load())) ? qt_assert("d_1_2_Core->refs.load()",QOpenGLFunctions_1_2_CoreBackend::versionStatus__FILE__,101) : qt_noop()); | - | ||||||||||||||||||
37 | delete d_1_2_Core; | 0 | ||||||||||||||||||
}if (d_1_3_Core&& !
| ||||||||||||||||||||
38 | 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(); | ||||||||||||||||||||
39 | ((!(d_1_3_Core->contextrefs.load())) ? qt_assert("d_1_3_Core->refs.load()",QOpenGLFunctions_1_3_CoreBackend::versionStatus__FILE__,104) : qt_noop()); | - | ||||||||||||||||||
40 | delete d_1_3_Core; | 0 | ||||||||||||||||||
}if (d_1_4_Core&& !
| ||||||||||||||||||||
41 | 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(); | ||||||||||||||||||||
42 | ((!(d_1_4_Core->contextrefs.load())) ? qt_assert("d_1_4_Core->refs.load()",QOpenGLFunctions_1_4_CoreBackend::versionStatus__FILE__,107) : qt_noop()); | - | ||||||||||||||||||
43 | delete d_1_4_Core; | 0 | ||||||||||||||||||
}if (d_1_5_Core&& !
| ||||||||||||||||||||
44 | d_1_5_Core->refs.deref()) { never executed: d_1_5_Core->refs.deref(); | 0 | ||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend( never executed: d_1_5_Core->refs.deref(); never executed: ();d_1_5_Core->refs.deref(); never executed: d_1_5_Core->refs.deref(); | ||||||||||||||||||||
45 | ((!(d_1_5_Core->contextrefs.load())) ? qt_assert("d_1_5_Core->refs.load()",QOpenGLFunctions_1_5_CoreBackend::versionStatus__FILE__,110) : qt_noop()); | - | ||||||||||||||||||
46 | delete d_1_5_Core; | 0 | ||||||||||||||||||
}if (d_2_0_Core&& !
| ||||||||||||||||||||
47 | d_2_0_Core->refs.deref()) { never executed: d_2_0_Core->refs.deref(); | 0 | ||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend( never executed: d_2_0_Core->refs.deref(); never executed: ();d_2_0_Core->refs.deref(); never executed: d_2_0_Core->refs.deref(); | ||||||||||||||||||||
48 | ((!(d_2_0_Core->contextrefs.load())) ? qt_assert("d_2_0_Core->refs.load()",QOpenGLFunctions_2_0_CoreBackend::versionStatus__FILE__,113) : qt_noop()); | - | ||||||||||||||||||
49 | delete d_2_0_Core; | 0 | ||||||||||||||||||
}if (d_2_1_Core&& !
| ||||||||||||||||||||
50 | d_2_1_Core->refs.deref()) { never executed: d_2_1_Core->refs.deref(); | 0 | ||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend( never executed: d_2_1_Core->refs.deref(); never executed: ();d_2_1_Core->refs.deref(); never executed: d_2_1_Core->refs.deref(); | ||||||||||||||||||||
51 | ((!(d_2_1_Core->contextrefs.load())) ? qt_assert("d_2_1_Core->refs.load()",QOpenGLFunctions_2_1_CoreBackend::versionStatus__FILE__,116) : qt_noop()); | - | ||||||||||||||||||
52 | delete d_2_1_Core; | 0 | ||||||||||||||||||
}if (d_3_0_Core&& !
| ||||||||||||||||||||
53 | d_3_0_Core->refs.deref()) { never executed: d_3_0_Core->refs.deref(); | 0 | ||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend( never executed: d_3_0_Core->refs.deref(); never executed: ();d_3_0_Core->refs.deref(); never executed: d_3_0_Core->refs.deref(); | ||||||||||||||||||||
54 | ((!(d_3_0_Core->contextrefs.load())) ? qt_assert("d_3_0_Core->refs.load()",QOpenGLFunctions_3_0_CoreBackend::versionStatus__FILE__,119) : qt_noop()); | - | ||||||||||||||||||
55 | delete d_3_0_Core; | 0 | ||||||||||||||||||
}if (d_3_1_Core&& !
| ||||||||||||||||||||
56 | d_3_1_Core->refs.deref()) { never executed: d_3_1_Core->refs.deref(); | 0 | ||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend( never executed: d_3_1_Core->refs.deref(); never executed: ();d_3_1_Core->refs.deref(); never executed: d_3_1_Core->refs.deref(); | ||||||||||||||||||||
57 | ((!(d_3_1_Core->contextrefs.load())) ? qt_assert("d_3_1_Core->refs.load()",QOpenGLFunctions_3_1_CoreBackend::versionStatus__FILE__,122) : qt_noop()); | - | ||||||||||||||||||
58 | delete d_3_1_Core; | 0 | ||||||||||||||||||
}if (d_3_2_Core&& !
| ||||||||||||||||||||
59 | d_3_2_Core->refs.deref()) { never executed: d_3_2_Core->refs.deref(); | 0 | ||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend( never executed: d_3_2_Core->refs.deref(); never executed: ();d_3_2_Core->refs.deref(); never executed: d_3_2_Core->refs.deref(); | ||||||||||||||||||||
60 | ((!(d_3_2_Core->contextrefs.load())) ? qt_assert("d_3_2_Core->refs.load()",QOpenGLFunctions_3_2_CoreBackend::versionStatus__FILE__,125) : qt_noop()); | - | ||||||||||||||||||
61 | delete d_3_2_Core; | 0 | ||||||||||||||||||
}if (d_1_0_Deprecated&& !
| ||||||||||||||||||||
62 | 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(); | ||||||||||||||||||||
63 | ((!(d_1_0_Deprecated->contextrefs.load())) ? qt_assert("d_1_0_Deprecated->refs.load()",QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus__FILE__,128) : qt_noop()); | - | ||||||||||||||||||
64 | delete d_1_0_Deprecated; | 0 | ||||||||||||||||||
}if (d_1_1_Deprecated&& !
| ||||||||||||||||||||
65 | 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(); | ||||||||||||||||||||
66 | ((!(d_1_1_Deprecated->contextrefs.load())) ? qt_assert("d_1_1_Deprecated->refs.load()",QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus__FILE__,131) : qt_noop()); | - | ||||||||||||||||||
67 | delete d_1_1_Deprecated; | 0 | ||||||||||||||||||
}if (d_1_2_Deprecated&& !
| ||||||||||||||||||||
68 | 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(); | ||||||||||||||||||||
69 | ((!(d_1_2_Deprecated->contextrefs.load())) ? qt_assert("d_1_2_Deprecated->refs.load()",QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus__FILE__,134) : qt_noop()); | - | ||||||||||||||||||
70 | delete d_1_2_Deprecated; | 0 | ||||||||||||||||||
}if (d_1_3_Deprecated&& !
| ||||||||||||||||||||
71 | 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(); | ||||||||||||||||||||
72 | ((!(d_1_3_Deprecated->contextrefs.load())) ? qt_assert("d_1_3_Deprecated->refs.load()",QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus__FILE__,137) : qt_noop()); | - | ||||||||||||||||||
73 | delete d_1_3_Deprecated; | 0 | ||||||||||||||||||
}if (d_1_4_Deprecated&& !
| ||||||||||||||||||||
74 | 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(); | ||||||||||||||||||||
75 | ((!(d_1_4_Deprecated->contextrefs.load())) ? qt_assert("d_1_4_Deprecated->refs.load()",QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus__FILE__,140) : qt_noop()); | - | ||||||||||||||||||
delete d_1_4_Deprecated; | ||||||||||||||||||||
}} never executed: end of block | ||||||||||||||||||||
77 | - | |||||||||||||||||||
78 | bool QOpenGLFunctions_3_2_Compatibility::initializeOpenGLFunctions() | - | ||||||||||||||||||
79 | { | - | ||||||||||||||||||
80 | if ( isInitialized()
| 0 | ||||||||||||||||||
81 | return never executed: true;return true; never executed: return true; | 0 | ||||||||||||||||||
82 | - | |||||||||||||||||||
83 | QOpenGLContext* context = QOpenGLContext::currentContext(); | - | ||||||||||||||||||
84 | - | |||||||||||||||||||
85 | - | |||||||||||||||||||
86 | - | |||||||||||||||||||
87 | if (((owningContext()
| 0 | ||||||||||||||||||
88 | && QOpenGLFunctions_3_2_Compatibility::isContextCompatible(context)
| 0 | ||||||||||||||||||
89 | { | - | ||||||||||||||||||
90 | - | |||||||||||||||||||
91 | - | |||||||||||||||||||
92 | QOpenGLVersionFunctionsBackend* d = 0; | - | ||||||||||||||||||
93 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); | - | ||||||||||||||||||
94 | 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); | ||||||||||||||||||||
95 | d->refs.ref(); | - | ||||||||||||||||||
96 | - | |||||||||||||||||||
97 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus()); | - | ||||||||||||||||||
98 | 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); | ||||||||||||||||||||
99 | d->refs.ref(); | - | ||||||||||||||||||
100 | - | |||||||||||||||||||
101 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus()); | - | ||||||||||||||||||
102 | 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); | ||||||||||||||||||||
103 | d->refs.ref(); | - | ||||||||||||||||||
104 | - | |||||||||||||||||||
105 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus()); | - | ||||||||||||||||||
106 | 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); | ||||||||||||||||||||
107 | d->refs.ref(); | - | ||||||||||||||||||
108 | - | |||||||||||||||||||
109 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus()); | - | ||||||||||||||||||
110 | 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); | ||||||||||||||||||||
111 | d->refs.ref(); | - | ||||||||||||||||||
112 | - | |||||||||||||||||||
113 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus()); | - | ||||||||||||||||||
114 | if (!d) { | - | ||||||||||||||||||
d = new QOpenGLFunctions_1_5_CoreBackend(context); | ||||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus(), d); | ||||||||||||||||||||
}d_1_5_Core = static_cast<QOpenGLFunctions_1_5_CoreBackend*>(d); | ||||||||||||||||||||
115 | d->refs.ref(); | - | ||||||||||||||||||
116 | - | |||||||||||||||||||
117 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus()); | - | ||||||||||||||||||
118 | if (!d) { | - | ||||||||||||||||||
d = new QOpenGLFunctions_2_0_CoreBackend(context); | ||||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus(), d); | ||||||||||||||||||||
}d_2_0_Core = static_cast<QOpenGLFunctions_2_0_CoreBackend*>(d); | ||||||||||||||||||||
119 | d->refs.ref(); | - | ||||||||||||||||||
120 | - | |||||||||||||||||||
121 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus()); | - | ||||||||||||||||||
122 | if (!d) { | - | ||||||||||||||||||
d = new QOpenGLFunctions_2_1_CoreBackend(context); | ||||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus(), d); | ||||||||||||||||||||
}d_2_1_Core = static_cast<QOpenGLFunctions_2_1_CoreBackend*>(d); | ||||||||||||||||||||
123 | d->refs.ref(); | - | ||||||||||||||||||
124 | - | |||||||||||||||||||
125 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus()); | - | ||||||||||||||||||
126 | if (!d) { | - | ||||||||||||||||||
d = new QOpenGLFunctions_3_0_CoreBackend(context); | ||||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus(), d); | ||||||||||||||||||||
}d_3_0_Core = static_cast<QOpenGLFunctions_3_0_CoreBackend*>(d); | ||||||||||||||||||||
127 | d->refs.ref(); | - | ||||||||||||||||||
128 | - | |||||||||||||||||||
129 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus()); | - | ||||||||||||||||||
130 | if (!d) { | - | ||||||||||||||||||
d = new QOpenGLFunctions_3_1_CoreBackend(context); | ||||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus(), d); | ||||||||||||||||||||
}d_3_1_Core = static_cast<QOpenGLFunctions_3_1_CoreBackend*>(d); | ||||||||||||||||||||
131 | d->refs.ref(); | - | ||||||||||||||||||
132 | - | |||||||||||||||||||
133 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus()); | - | ||||||||||||||||||
134 | if (!d) { | - | ||||||||||||||||||
d = new QOpenGLFunctions_3_2_CoreBackend(context); | ||||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus(), d); | ||||||||||||||||||||
}d_3_2_Core = static_cast<QOpenGLFunctions_3_2_CoreBackend*>(d); | ||||||||||||||||||||
135 | d->refs.ref(); | - | ||||||||||||||||||
136 | - | |||||||||||||||||||
137 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus()); | - | ||||||||||||||||||
138 | 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); | ||||||||||||||||||||
139 | d->refs.ref(); | - | ||||||||||||||||||
140 | - | |||||||||||||||||||
141 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus()); | - | ||||||||||||||||||
142 | 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); | ||||||||||||||||||||
143 | d->refs.ref(); | - | ||||||||||||||||||
144 | - | |||||||||||||||||||
145 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus()); | - | ||||||||||||||||||
146 | 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); | ||||||||||||||||||||
147 | d->refs.ref(); | - | ||||||||||||||||||
148 | - | |||||||||||||||||||
149 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus()); | - | ||||||||||||||||||
150 | 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); | ||||||||||||||||||||
151 | d->refs.ref(); | - | ||||||||||||||||||
152 | - | |||||||||||||||||||
153 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus()); | - | ||||||||||||||||||
154 | 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); | ||||||||||||||||||||
155 | d->refs.ref(); | - | ||||||||||||||||||
156 | - | |||||||||||||||||||
157 | QAbstractOpenGLFunctions::initializeOpenGLFunctions(); | - | ||||||||||||||||||
158 | } never executed: end of block | 0 | ||||||||||||||||||
159 | return never executed: isInitialized();return isInitialized(); never executed: return isInitialized(); | 0 | ||||||||||||||||||
160 | } | - | ||||||||||||||||||
161 | - | |||||||||||||||||||
162 | bool QOpenGLFunctions_3_2_Compatibility::isContextCompatible(QOpenGLContext *context) | - | ||||||||||||||||||
163 | { | - | ||||||||||||||||||
164 | ((!(context)) ? qt_assert("context",__FILE__,303229) : qt_noop()); | - | ||||||||||||||||||
165 | QSurfaceFormat f = context->format(); | - | ||||||||||||||||||
166 | const QPair<int, int> v = qMakePair(f.majorVersion(), f.minorVersion()); | - | ||||||||||||||||||
167 | if (v < qMakePair(3, 2)) | - | ||||||||||||||||||
168 | return false; | - | ||||||||||||||||||
169 | - | |||||||||||||||||||
170 | if (f.profile() == QSurfaceFormat::CoreProfile) | - | ||||||||||||||||||
171 | return false; | - | ||||||||||||||||||
172 | - | |||||||||||||||||||
173 | return true; | - | ||||||||||||||||||
174 | } | - | ||||||||||||||||||
175 | - | |||||||||||||||||||
176 | QOpenGLVersionProfile QOpenGLFunctions_3_2_Compatibility::versionProfile() | - | ||||||||||||||||||
177 | { | - | ||||||||||||||||||
178 | QOpenGLVersionProfile v; | - | ||||||||||||||||||
179 | v.setVersion(3, 2); | - | ||||||||||||||||||
180 | v.setProfile(QSurfaceFormat::CompatibilityProfile); | - | ||||||||||||||||||
181 | return v; | - | ||||||||||||||||||
182 | } | - | ||||||||||||||||||
183 | - | |||||||||||||||||||
184 | - | |||||||||||||||||||
Switch to Source code | Preprocessed file |