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 | | - |
44 | | - |
45 | | - |
46 | | - |
47 | | - |
48 | | - |
49 | #include "qopenglfunctions_1_4.h" | - |
50 | #include "qopenglcontext.h" | - |
51 | | - |
52 | QT_BEGIN_NAMESPACE | - |
53 | | - |
54 | | - |
55 | | - |
56 | | - |
57 | | - |
58 | | - |
59 | | - |
60 | | - |
61 | | - |
62 | | - |
63 | | - |
64 | | - |
65 | | - |
66 | | - |
67 | | - |
68 | QOpenGLFunctions_1_4::QOpenGLFunctions_1_4() | - |
69 | : QAbstractOpenGLFunctions() | - |
70 | , d_1_0_Core(0) | - |
71 | , d_1_1_Core(0) | - |
72 | , d_1_2_Core(0) | - |
73 | , d_1_3_Core(0) | - |
74 | , d_1_4_Core(0) | - |
75 | , d_1_0_Deprecated(0) | - |
76 | , d_1_1_Deprecated(0) | - |
77 | , d_1_2_Deprecated(0) | - |
78 | , d_1_3_Deprecated(0) | - |
79 | , d_1_4_Deprecated(0) | - |
80 | { | - |
81 | } never executed: end of block | 0 |
82 | | - |
83 | QOpenGLFunctions_1_4::~QOpenGLFunctions_1_4() | - |
84 | { | - |
85 | if (d_1_0_Core)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
86 | d_1_0_Core->refs.deref(); never executed: d_1_0_Core->refs.deref(); | 0 |
87 | Q_ASSERT(d_1_0_Core->refs.load()); | - |
88 | if (d_1_1_Core)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
89 | d_1_1_Core->refs.deref(); never executed: d_1_1_Core->refs.deref(); | 0 |
90 | Q_ASSERT(d_1_1_Core->refs.load()); | - |
91 | if (d_1_2_Core)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
92 | d_1_2_Core->refs.deref(); never executed: d_1_2_Core->refs.deref(); | 0 |
93 | Q_ASSERT(d_1_2_Core->refs.load()); | - |
94 | if (d_1_3_Core)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
95 | d_1_3_Core->refs.deref(); never executed: d_1_3_Core->refs.deref(); | 0 |
96 | Q_ASSERT(d_1_3_Core->refs.load()); | - |
97 | if (d_1_4_Core)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
98 | d_1_4_Core->refs.deref(); never executed: d_1_4_Core->refs.deref(); | 0 |
99 | Q_ASSERT(d_1_4_Core->refs.load()); | - |
100 | if (d_1_0_Deprecated)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
101 | d_1_0_Deprecated->refs.deref(); never executed: d_1_0_Deprecated->refs.deref(); | 0 |
102 | Q_ASSERT(d_1_0_Deprecated->refs.load()); | - |
103 | if (d_1_1_Deprecated)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
104 | d_1_1_Deprecated->refs.deref(); never executed: d_1_1_Deprecated->refs.deref(); | 0 |
105 | Q_ASSERT(d_1_1_Deprecated->refs.load()); | - |
106 | if (d_1_2_Deprecated)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
107 | d_1_2_Deprecated->refs.deref(); never executed: d_1_2_Deprecated->refs.deref(); | 0 |
108 | Q_ASSERT(d_1_2_Deprecated->refs.load()); | - |
109 | if (d_1_3_Deprecated)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
110 | d_1_3_Deprecated->refs.deref(); never executed: d_1_3_Deprecated->refs.deref(); | 0 |
111 | Q_ASSERT(d_1_3_Deprecated->refs.load()); | - |
112 | if (d_1_4_Deprecated)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
113 | d_1_4_Deprecated->refs.deref(); never executed: d_1_4_Deprecated->refs.deref(); | 0 |
114 | Q_ASSERT(d_1_4_Deprecated->refs.load()); | - |
115 | } never executed: end of block | 0 |
116 | | - |
117 | bool QOpenGLFunctions_1_4::initializeOpenGLFunctions() | - |
118 | { | - |
119 | if ( isInitialized() )TRUE | never evaluated | FALSE | never evaluated |
| 0 |
120 | return true; never executed: return true; | 0 |
121 | | - |
122 | QOpenGLContext* context = QOpenGLContext::currentContext(); | - |
123 | | - |
124 | | - |
125 | | - |
126 | if (((owningContext() && owningContext() == context) || !owningContext())TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
127 | && QOpenGLFunctions_1_4::isContextCompatible(context))TRUE | never evaluated | FALSE | never evaluated |
| 0 |
128 | { | - |
129 | | - |
130 | | - |
131 | QOpenGLVersionFunctionsBackend* d = 0; | - |
132 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); | - |
133 | d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d); | - |
134 | d->refs.ref(); | - |
135 | | - |
136 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus()); | - |
137 | d_1_1_Core = static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d); | - |
138 | d->refs.ref(); | - |
139 | | - |
140 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus()); | - |
141 | d_1_2_Core = static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d); | - |
142 | d->refs.ref(); | - |
143 | | - |
144 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus()); | - |
145 | d_1_3_Core = static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d); | - |
146 | d->refs.ref(); | - |
147 | | - |
148 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus()); | - |
149 | d_1_4_Core = static_cast<QOpenGLFunctions_1_4_CoreBackend*>(d); | - |
150 | d->refs.ref(); | - |
151 | | - |
152 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus()); | - |
153 | d_1_0_Deprecated = static_cast<QOpenGLFunctions_1_0_DeprecatedBackend*>(d); | - |
154 | d->refs.ref(); | - |
155 | | - |
156 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus()); | - |
157 | d_1_1_Deprecated = static_cast<QOpenGLFunctions_1_1_DeprecatedBackend*>(d); | - |
158 | d->refs.ref(); | - |
159 | | - |
160 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus()); | - |
161 | d_1_2_Deprecated = static_cast<QOpenGLFunctions_1_2_DeprecatedBackend*>(d); | - |
162 | d->refs.ref(); | - |
163 | | - |
164 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus()); | - |
165 | d_1_3_Deprecated = static_cast<QOpenGLFunctions_1_3_DeprecatedBackend*>(d); | - |
166 | d->refs.ref(); | - |
167 | | - |
168 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus()); | - |
169 | d_1_4_Deprecated = static_cast<QOpenGLFunctions_1_4_DeprecatedBackend*>(d); | - |
170 | d->refs.ref(); | - |
171 | | - |
172 | QAbstractOpenGLFunctions::initializeOpenGLFunctions(); | - |
173 | } never executed: end of block | 0 |
174 | return isInitialized(); never executed: return isInitialized(); | 0 |
175 | } | - |
176 | | - |
177 | bool QOpenGLFunctions_1_4::isContextCompatible(QOpenGLContext *context) | - |
178 | { | - |
179 | Q_ASSERT(context); | - |
180 | QSurfaceFormat f = context->format(); | - |
181 | const QPair<int, int> v = qMakePair(f.majorVersion(), f.minorVersion()); | - |
182 | if (v < qMakePair(1, 4))TRUE | never evaluated | FALSE | never evaluated |
| 0 |
183 | return false; never executed: return false; | 0 |
184 | | - |
185 | if (f.profile() == QSurfaceFormat::CoreProfile)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
186 | return false; never executed: return false; | 0 |
187 | | - |
188 | return true; never executed: return true; | 0 |
189 | } | - |
190 | | - |
191 | QOpenGLVersionProfile QOpenGLFunctions_1_4::versionProfile() | - |
192 | { | - |
193 | QOpenGLVersionProfile v; | - |
194 | v.setVersion(1, 4); | - |
195 | return v; never executed: return v; | 0 |
196 | } | - |
197 | | - |
198 | QT_END_NAMESPACE | - |
| | |