Line | Source | Count |
1 | | - |
2 | | - |
3 | | - |
4 | | - |
5 | | - |
6 | | - |
7 | | - |
8 | | - |
9 | | - |
10 | | - |
11 | | - |
12 | | - |
13 | | - |
14 | | - |
15 | | - |
16 | | - |
17 | | - |
18 | | - |
19 | | - |
20 | | - |
21 | | - |
22 | | - |
23 | | - |
24 | | - |
25 | | - |
26 | | - |
27 | | - |
28 | | - |
29 | | - |
30 | | - |
31 | | - |
32 | | - |
33 | | - |
34 | | - |
35 | | - |
36 | | - |
37 | | - |
38 | | - |
39 | | - |
40 | | - |
41 | | - |
42 | | - |
43 | #include "qopenglfunctions_1_5.h" | - |
44 | #include "qopenglcontext.h" | - |
45 | | - |
46 | QT_BEGIN_NAMESPACE | - |
47 | | - |
48 | | - |
49 | | - |
50 | | - |
51 | | - |
52 | | - |
53 | | - |
54 | | - |
55 | | - |
56 | | - |
57 | | - |
58 | | - |
59 | | - |
60 | | - |
61 | | - |
62 | QOpenGLFunctions_1_5::QOpenGLFunctions_1_5() | - |
63 | : QAbstractOpenGLFunctions() | - |
64 | , d_1_0_Core(0) | - |
65 | , d_1_1_Core(0) | - |
66 | , d_1_2_Core(0) | - |
67 | , d_1_3_Core(0) | - |
68 | , d_1_4_Core(0) | - |
69 | , d_1_5_Core(0) | - |
70 | , d_1_0_Deprecated(0) | - |
71 | , d_1_1_Deprecated(0) | - |
72 | , d_1_2_Deprecated(0) | - |
73 | , d_1_3_Deprecated(0) | - |
74 | , d_1_4_Deprecated(0) | - |
75 | { | - |
76 | } never executed: end of block | 0 |
77 | | - |
78 | QOpenGLFunctions_1_5::~QOpenGLFunctions_1_5() | - |
79 | { | - |
80 | if (d_1_0_Core && !d_1_0_Core->refs.deref()) {TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
81 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Core->context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); | - |
82 | delete d_1_0_Core; | - |
83 | } never executed: end of block | 0 |
84 | if (d_1_1_Core && !d_1_1_Core->refs.deref()) {TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
85 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Core->context, QOpenGLFunctions_1_1_CoreBackend::versionStatus()); | - |
86 | delete d_1_1_Core; | - |
87 | } never executed: end of block | 0 |
88 | if (d_1_2_Core && !d_1_2_Core->refs.deref()) {TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
89 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Core->context, QOpenGLFunctions_1_2_CoreBackend::versionStatus()); | - |
90 | delete d_1_2_Core; | - |
91 | } never executed: end of block | 0 |
92 | if (d_1_3_Core && !d_1_3_Core->refs.deref()) {TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
93 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Core->context, QOpenGLFunctions_1_3_CoreBackend::versionStatus()); | - |
94 | delete d_1_3_Core; | - |
95 | } never executed: end of block | 0 |
96 | if (d_1_4_Core && !d_1_4_Core->refs.deref()) {TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
97 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Core->context, QOpenGLFunctions_1_4_CoreBackend::versionStatus()); | - |
98 | delete d_1_4_Core; | - |
99 | } never executed: end of block | 0 |
100 | if (d_1_5_Core && !d_1_5_Core->refs.deref()) {TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
101 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_5_Core->context, QOpenGLFunctions_1_5_CoreBackend::versionStatus()); | - |
102 | delete d_1_5_Core; | - |
103 | } never executed: end of block | 0 |
104 | if (d_1_0_Deprecated && !d_1_0_Deprecated->refs.deref()) {TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
105 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Deprecated->context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus()); | - |
106 | delete d_1_0_Deprecated; | - |
107 | } never executed: end of block | 0 |
108 | if (d_1_1_Deprecated && !d_1_1_Deprecated->refs.deref()) {TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
109 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Deprecated->context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus()); | - |
110 | delete d_1_1_Deprecated; | - |
111 | } never executed: end of block | 0 |
112 | if (d_1_2_Deprecated && !d_1_2_Deprecated->refs.deref()) {TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
113 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Deprecated->context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus()); | - |
114 | delete d_1_2_Deprecated; | - |
115 | } never executed: end of block | 0 |
116 | if (d_1_3_Deprecated && !d_1_3_Deprecated->refs.deref()) {TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
117 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Deprecated->context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus()); | - |
118 | delete d_1_3_Deprecated; | - |
119 | } never executed: end of block | 0 |
120 | if (d_1_4_Deprecated && !d_1_4_Deprecated->refs.deref()) {TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
121 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Deprecated->context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus()); | - |
122 | delete d_1_4_Deprecated; | - |
123 | } never executed: end of block | 0 |
124 | } never executed: end of block | 0 |
125 | | - |
126 | bool QOpenGLFunctions_1_5::initializeOpenGLFunctions() | - |
127 | { | - |
128 | if ( isInitialized() )TRUE | never evaluated | FALSE | never evaluated |
| 0 |
129 | return true; never executed: return true; | 0 |
130 | | - |
131 | QOpenGLContext* context = QOpenGLContext::currentContext(); | - |
132 | | - |
133 | | - |
134 | | - |
135 | if (((owningContext() && owningContext() == context) || !owningContext())TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
136 | && QOpenGLFunctions_1_5::isContextCompatible(context))TRUE | never evaluated | FALSE | never evaluated |
| 0 |
137 | { | - |
138 | | - |
139 | | - |
140 | QOpenGLVersionFunctionsBackend* d = 0; | - |
141 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); | - |
142 | if (!d) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
143 | d = new QOpenGLFunctions_1_0_CoreBackend(context); | - |
144 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus(), d); | - |
145 | } never executed: end of block | 0 |
146 | d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d); | - |
147 | d->refs.ref(); | - |
148 | | - |
149 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus()); | - |
150 | if (!d) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
151 | d = new QOpenGLFunctions_1_1_CoreBackend(context); | - |
152 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus(), d); | - |
153 | } never executed: end of block | 0 |
154 | d_1_1_Core = static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d); | - |
155 | d->refs.ref(); | - |
156 | | - |
157 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus()); | - |
158 | if (!d) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
159 | d = new QOpenGLFunctions_1_2_CoreBackend(context); | - |
160 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus(), d); | - |
161 | } never executed: end of block | 0 |
162 | d_1_2_Core = static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d); | - |
163 | d->refs.ref(); | - |
164 | | - |
165 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus()); | - |
166 | if (!d) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
167 | d = new QOpenGLFunctions_1_3_CoreBackend(context); | - |
168 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus(), d); | - |
169 | } never executed: end of block | 0 |
170 | d_1_3_Core = static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d); | - |
171 | d->refs.ref(); | - |
172 | | - |
173 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus()); | - |
174 | if (!d) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
175 | d = new QOpenGLFunctions_1_4_CoreBackend(context); | - |
176 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus(), d); | - |
177 | } never executed: end of block | 0 |
178 | d_1_4_Core = static_cast<QOpenGLFunctions_1_4_CoreBackend*>(d); | - |
179 | d->refs.ref(); | - |
180 | | - |
181 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus()); | - |
182 | if (!d) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
183 | d = new QOpenGLFunctions_1_5_CoreBackend(context); | - |
184 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus(), d); | - |
185 | } never executed: end of block | 0 |
186 | d_1_5_Core = static_cast<QOpenGLFunctions_1_5_CoreBackend*>(d); | - |
187 | d->refs.ref(); | - |
188 | | - |
189 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus()); | - |
190 | if (!d) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
191 | d = new QOpenGLFunctions_1_0_DeprecatedBackend(context); | - |
192 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus(), d); | - |
193 | } never executed: end of block | 0 |
194 | d_1_0_Deprecated = static_cast<QOpenGLFunctions_1_0_DeprecatedBackend*>(d); | - |
195 | d->refs.ref(); | - |
196 | | - |
197 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus()); | - |
198 | if (!d) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
199 | d = new QOpenGLFunctions_1_1_DeprecatedBackend(context); | - |
200 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus(), d); | - |
201 | } never executed: end of block | 0 |
202 | d_1_1_Deprecated = static_cast<QOpenGLFunctions_1_1_DeprecatedBackend*>(d); | - |
203 | d->refs.ref(); | - |
204 | | - |
205 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus()); | - |
206 | if (!d) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
207 | d = new QOpenGLFunctions_1_2_DeprecatedBackend(context); | - |
208 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus(), d); | - |
209 | } never executed: end of block | 0 |
210 | d_1_2_Deprecated = static_cast<QOpenGLFunctions_1_2_DeprecatedBackend*>(d); | - |
211 | d->refs.ref(); | - |
212 | | - |
213 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus()); | - |
214 | if (!d) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
215 | d = new QOpenGLFunctions_1_3_DeprecatedBackend(context); | - |
216 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus(), d); | - |
217 | } never executed: end of block | 0 |
218 | d_1_3_Deprecated = static_cast<QOpenGLFunctions_1_3_DeprecatedBackend*>(d); | - |
219 | d->refs.ref(); | - |
220 | | - |
221 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus()); | - |
222 | if (!d) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
223 | d = new QOpenGLFunctions_1_4_DeprecatedBackend(context); | - |
224 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus(), d); | - |
225 | } never executed: end of block | 0 |
226 | d_1_4_Deprecated = static_cast<QOpenGLFunctions_1_4_DeprecatedBackend*>(d); | - |
227 | d->refs.ref(); | - |
228 | | - |
229 | QAbstractOpenGLFunctions::initializeOpenGLFunctions(); | - |
230 | } never executed: end of block | 0 |
231 | return isInitialized(); never executed: return isInitialized(); | 0 |
232 | } | - |
233 | | - |
234 | bool QOpenGLFunctions_1_5::isContextCompatible(QOpenGLContext *context) | - |
235 | { | - |
236 | Q_ASSERT(context); | - |
237 | QSurfaceFormat f = context->format(); | - |
238 | const QPair<int, int> v = qMakePair(f.majorVersion(), f.minorVersion()); | - |
239 | if (v < qMakePair(1, 5))TRUE | never evaluated | FALSE | never evaluated |
| 0 |
240 | return false; never executed: return false; | 0 |
241 | | - |
242 | if (f.profile() == QSurfaceFormat::CoreProfile)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
243 | return false; never executed: return false; | 0 |
244 | | - |
245 | return true; never executed: return true; | 0 |
246 | } | - |
247 | | - |
248 | QOpenGLVersionProfile QOpenGLFunctions_1_5::versionProfile() | - |
249 | { | - |
250 | QOpenGLVersionProfile v; | - |
251 | v.setVersion(1, 5); | - |
252 | return v; never executed: return v; | 0 |
253 | } | - |
254 | | - |
255 | QT_END_NAMESPACE | - |
| | |