qopenglfunctions_4_0_core.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/gui/opengl/qopenglfunctions_4_0_core.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3QOpenGLFunctions_4_0_Core::QOpenGLFunctions_4_0_Core()-
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_3_3_Core(0)-
17 , d_4_0_Core(0)-
18{-
19}
never executed: end of block
0
20-
21QOpenGLFunctions_4_0_Core::~QOpenGLFunctions_4_0_Core()-
22{-
23 if (d_1_0_Core
d_1_0_CoreDescription
TRUEnever evaluated
FALSEnever evaluated
&& !d_1_0_Core->refs.deref()
!d_1_0_Core->refs.deref()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
24 QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Core->context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());-
25 delete d_1_0_Core;-
26 }
never executed: end of block
0
27 if (d_1_1_Core
d_1_1_CoreDescription
TRUEnever evaluated
FALSEnever evaluated
&& !d_1_1_Core->refs.deref()
!d_1_1_Core->refs.deref()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
28 QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Core->context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());-
29 delete d_1_1_Core;-
30 }
never executed: end of block
0
31 if (d_1_2_Core
d_1_2_CoreDescription
TRUEnever evaluated
FALSEnever evaluated
&& !d_1_2_Core->refs.deref()
!d_1_2_Core->refs.deref()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
32 QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Core->context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());-
33 delete d_1_2_Core;-
34 }
never executed: end of block
0
35 if (d_1_3_Core
d_1_3_CoreDescription
TRUEnever evaluated
FALSEnever evaluated
&& !d_1_3_Core->refs.deref()
!d_1_3_Core->refs.deref()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
36 QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Core->context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());-
37 delete d_1_3_Core;-
38 }
never executed: end of block
0
39 if (d_1_4_Core
d_1_4_CoreDescription
TRUEnever evaluated
FALSEnever evaluated
&& !d_1_4_Core->refs.deref()
!d_1_4_Core->refs.deref()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
40 QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_4_Core->context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());-
41 delete d_1_4_Core;-
42 }
never executed: end of block
0
43 if (d_1_5_Core
d_1_5_CoreDescription
TRUEnever evaluated
FALSEnever evaluated
&& !d_1_5_Core->refs.deref()
!d_1_5_Core->refs.deref()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
44 QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_5_Core->context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());-
45 delete d_1_5_Core;-
46 }
never executed: end of block
0
47 if (d_2_0_Core
d_2_0_CoreDescription
TRUEnever evaluated
FALSEnever evaluated
&& !d_2_0_Core->refs.deref()
!d_2_0_Core->refs.deref()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
48 QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_0_Core->context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());-
49 delete d_2_0_Core;-
50 }
never executed: end of block
0
51 if (d_2_1_Core
d_2_1_CoreDescription
TRUEnever evaluated
FALSEnever evaluated
&& !d_2_1_Core->refs.deref()
!d_2_1_Core->refs.deref()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
52 QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_2_1_Core->context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());-
53 delete d_2_1_Core;-
54 }
never executed: end of block
0
55 if (d_3_0_Core
d_3_0_CoreDescription
TRUEnever evaluated
FALSEnever evaluated
&& !d_3_0_Core->refs.deref()
!d_3_0_Core->refs.deref()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
56 QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_0_Core->context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());-
57 delete d_3_0_Core;-
58 }
never executed: end of block
0
59 if (d_3_1_Core
d_3_1_CoreDescription
TRUEnever evaluated
FALSEnever evaluated
&& !d_3_1_Core->refs.deref()
!d_3_1_Core->refs.deref()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
60 QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_1_Core->context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());-
61 delete d_3_1_Core;-
62 }
never executed: end of block
0
63 if (d_3_2_Core
d_3_2_CoreDescription
TRUEnever evaluated
FALSEnever evaluated
&& !d_3_2_Core->refs.deref()
!d_3_2_Core->refs.deref()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
64 QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_2_Core->context, QOpenGLFunctions_3_2_CoreBackend::versionStatus());-
65 delete d_3_2_Core;-
66 }
never executed: end of block
0
67 if (d_3_3_Core
d_3_3_CoreDescription
TRUEnever evaluated
FALSEnever evaluated
&& !d_3_3_Core->refs.deref()
!d_3_3_Core->refs.deref()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
68 QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_3_3_Core->context, QOpenGLFunctions_3_3_CoreBackend::versionStatus());-
69 delete d_3_3_Core;-
70 }
never executed: end of block
0
71 if (d_4_0_Core
d_4_0_CoreDescription
TRUEnever evaluated
FALSEnever evaluated
&& !d_4_0_Core->refs.deref()
!d_4_0_Core->refs.deref()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
72 QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_4_0_Core->context, QOpenGLFunctions_4_0_CoreBackend::versionStatus());-
73 delete d_4_0_Core;-
74 }
never executed: end of block
0
75}
never executed: end of block
0
76-
77bool QOpenGLFunctions_4_0_Core::initializeOpenGLFunctions()-
78{-
79 if ( isInitialized()
isInitialized()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
80 return
never executed: return true;
true;
never executed: return true;
0
81-
82 QOpenGLContext* context = QOpenGLContext::currentContext();-
83-
84-
85-
86 if (((owningContext()
owningContext()Description
TRUEnever evaluated
FALSEnever evaluated
&& owningContext() == context
owningContext() == contextDescription
TRUEnever evaluated
FALSEnever evaluated
) || !owningContext()
!owningContext()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
87 && QOpenGLFunctions_4_0_Core::isContextCompatible(context)
QOpenGLFunctio...tible(context)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
88 {-
89-
90-
91 QOpenGLVersionFunctionsBackend* d = 0;-
92 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus());-
93 if (!d
!dDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
94 d = new QOpenGLFunctions_1_0_CoreBackend(context);-
95 QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus(), d);-
96 }
never executed: end of block
0
97 d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d);-
98 d->refs.ref();-
99-
100 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus());-
101 if (!d
!dDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
102 d = new QOpenGLFunctions_1_1_CoreBackend(context);-
103 QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus(), d);-
104 }
never executed: end of block
0
105 d_1_1_Core = static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d);-
106 d->refs.ref();-
107-
108 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus());-
109 if (!d
!dDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
110 d = new QOpenGLFunctions_1_2_CoreBackend(context);-
111 QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus(), d);-
112 }
never executed: end of block
0
113 d_1_2_Core = static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d);-
114 d->refs.ref();-
115-
116 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus());-
117 if (!d
!dDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
118 d = new QOpenGLFunctions_1_3_CoreBackend(context);-
119 QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus(), d);-
120 }
never executed: end of block
0
121 d_1_3_Core = static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d);-
122 d->refs.ref();-
123-
124 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus());-
125 if (!d
!dDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
126 d = new QOpenGLFunctions_1_4_CoreBackend(context);-
127 QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus(), d);-
128 }
never executed: end of block
0
129 d_1_4_Core = static_cast<QOpenGLFunctions_1_4_CoreBackend*>(d);-
130 d->refs.ref();-
131-
132 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus());-
133 if (!d
!dDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
134 d = new QOpenGLFunctions_1_5_CoreBackend(context);-
135 QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus(), d);-
136 }
never executed: end of block
0
137 d_1_5_Core = static_cast<QOpenGLFunctions_1_5_CoreBackend*>(d);-
138 d->refs.ref();-
139-
140 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus());-
141 if (!d
!dDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
142 d = new QOpenGLFunctions_2_0_CoreBackend(context);-
143 QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus(), d);-
144 }
never executed: end of block
0
145 d_2_0_Core = static_cast<QOpenGLFunctions_2_0_CoreBackend*>(d);-
146 d->refs.ref();-
147-
148 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus());-
149 if (!d
!dDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
150 d = new QOpenGLFunctions_2_1_CoreBackend(context);-
151 QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus(), d);-
152 }
never executed: end of block
0
153 d_2_1_Core = static_cast<QOpenGLFunctions_2_1_CoreBackend*>(d);-
154 d->refs.ref();-
155-
156 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus());-
157 if (!d
!dDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
158 d = new QOpenGLFunctions_3_0_CoreBackend(context);-
159 QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus(), d);-
160 }
never executed: end of block
0
161 d_3_0_Core = static_cast<QOpenGLFunctions_3_0_CoreBackend*>(d);-
162 d->refs.ref();-
163-
164 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus());-
165 if (!d
!dDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
166 d = new QOpenGLFunctions_3_1_CoreBackend(context);-
167 QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus(), d);-
168 }
never executed: end of block
0
169 d_3_1_Core = static_cast<QOpenGLFunctions_3_1_CoreBackend*>(d);-
170 d->refs.ref();-
171-
172 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus());-
173 if (!d
!dDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
174 d = new QOpenGLFunctions_3_2_CoreBackend(context);-
175 QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus(), d);-
176 }
never executed: end of block
0
177 d_3_2_Core = static_cast<QOpenGLFunctions_3_2_CoreBackend*>(d);-
178 d->refs.ref();-
179-
180 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus());-
181 if (!d
!dDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
182 d = new QOpenGLFunctions_3_3_CoreBackend(context);-
183 QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus(), d);-
184 }
never executed: end of block
0
185 d_3_3_Core = static_cast<QOpenGLFunctions_3_3_CoreBackend*>(d);-
186 d->refs.ref();-
187-
188 d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_0_CoreBackend::versionStatus());-
189 if (!d
!dDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
190 d = new QOpenGLFunctions_4_0_CoreBackend(context);-
191 QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_0_CoreBackend::versionStatus(), d);-
192 }
never executed: end of block
0
193 d_4_0_Core = static_cast<QOpenGLFunctions_4_0_CoreBackend*>(d);-
194 d->refs.ref();-
195-
196 QAbstractOpenGLFunctions::initializeOpenGLFunctions();-
197 }
never executed: end of block
0
198 return
never executed: return isInitialized();
isInitialized();
never executed: return isInitialized();
0
199}-
200-
201bool QOpenGLFunctions_4_0_Core::isContextCompatible(QOpenGLContext *context)-
202{-
203 ((!(context)) ? qt_assert("context",__FILE__,262) : qt_noop());-
204 QSurfaceFormat f = context->format();-
205 const QPair<int, int> v = qMakePair(f.majorVersion(), f.minorVersion());-
206 if (v < qMakePair(4, 0)
v < qMakePair(4, 0)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
207 return
never executed: return false;
false;
never executed: return false;
0
208-
209 return
never executed: return true;
true;
never executed: return true;
0
210}-
211-
212QOpenGLVersionProfile QOpenGLFunctions_4_0_Core::versionProfile()-
213{-
214 QOpenGLVersionProfile v;-
215 v.setVersion(4, 0);-
216 v.setProfile(QSurfaceFormat::CoreProfile);-
217 return
never executed: return v;
v;
never executed: return v;
0
218}-
219-
220-
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial 4.3.0-BETA-master-30-08-2018-4cb69e9