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_3.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_3::QOpenGLFunctions_1_3() | - |
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_0_Deprecated(0) | - |
75 | , d_1_1_Deprecated(0) | - |
76 | , d_1_2_Deprecated(0) | - |
77 | , d_1_3_Deprecated(0) | - |
78 | { | - |
79 | } never executed: end of block | 0 |
80 | | - |
81 | QOpenGLFunctions_1_3::~QOpenGLFunctions_1_3() | - |
82 | { | - |
83 | if (d_1_0_Core)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
84 | d_1_0_Core->refs.deref(); never executed: d_1_0_Core->refs.deref(); | 0 |
85 | Q_ASSERT(d_1_0_Core->refs.load()); | - |
86 | if (d_1_1_Core)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
87 | d_1_1_Core->refs.deref(); never executed: d_1_1_Core->refs.deref(); | 0 |
88 | Q_ASSERT(d_1_1_Core->refs.load()); | - |
89 | if (d_1_2_Core)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
90 | d_1_2_Core->refs.deref(); never executed: d_1_2_Core->refs.deref(); | 0 |
91 | Q_ASSERT(d_1_2_Core->refs.load()); | - |
92 | if (d_1_3_Core)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
93 | d_1_3_Core->refs.deref(); never executed: d_1_3_Core->refs.deref(); | 0 |
94 | Q_ASSERT(d_1_3_Core->refs.load()); | - |
95 | if (d_1_0_Deprecated)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
96 | d_1_0_Deprecated->refs.deref(); never executed: d_1_0_Deprecated->refs.deref(); | 0 |
97 | Q_ASSERT(d_1_0_Deprecated->refs.load()); | - |
98 | if (d_1_1_Deprecated)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
99 | d_1_1_Deprecated->refs.deref(); never executed: d_1_1_Deprecated->refs.deref(); | 0 |
100 | Q_ASSERT(d_1_1_Deprecated->refs.load()); | - |
101 | if (d_1_2_Deprecated)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
102 | d_1_2_Deprecated->refs.deref(); never executed: d_1_2_Deprecated->refs.deref(); | 0 |
103 | Q_ASSERT(d_1_2_Deprecated->refs.load()); | - |
104 | if (d_1_3_Deprecated)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
105 | d_1_3_Deprecated->refs.deref(); never executed: d_1_3_Deprecated->refs.deref(); | 0 |
106 | Q_ASSERT(d_1_3_Deprecated->refs.load()); | - |
107 | } never executed: end of block | 0 |
108 | | - |
109 | bool QOpenGLFunctions_1_3::initializeOpenGLFunctions() | - |
110 | { | - |
111 | if ( isInitialized() )TRUE | never evaluated | FALSE | never evaluated |
| 0 |
112 | return true; never executed: return true; | 0 |
113 | | - |
114 | QOpenGLContext* context = QOpenGLContext::currentContext(); | - |
115 | | - |
116 | | - |
117 | | - |
118 | if (((owningContext() && owningContext() == context) || !owningContext())TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
119 | && QOpenGLFunctions_1_3::isContextCompatible(context))TRUE | never evaluated | FALSE | never evaluated |
| 0 |
120 | { | - |
121 | | - |
122 | | - |
123 | QOpenGLVersionFunctionsBackend* d = 0; | - |
124 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); | - |
125 | d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d); | - |
126 | d->refs.ref(); | - |
127 | | - |
128 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus()); | - |
129 | d_1_1_Core = static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d); | - |
130 | d->refs.ref(); | - |
131 | | - |
132 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus()); | - |
133 | d_1_2_Core = static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d); | - |
134 | d->refs.ref(); | - |
135 | | - |
136 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus()); | - |
137 | d_1_3_Core = static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d); | - |
138 | d->refs.ref(); | - |
139 | | - |
140 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus()); | - |
141 | d_1_0_Deprecated = static_cast<QOpenGLFunctions_1_0_DeprecatedBackend*>(d); | - |
142 | d->refs.ref(); | - |
143 | | - |
144 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus()); | - |
145 | d_1_1_Deprecated = static_cast<QOpenGLFunctions_1_1_DeprecatedBackend*>(d); | - |
146 | d->refs.ref(); | - |
147 | | - |
148 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus()); | - |
149 | d_1_2_Deprecated = static_cast<QOpenGLFunctions_1_2_DeprecatedBackend*>(d); | - |
150 | d->refs.ref(); | - |
151 | | - |
152 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus()); | - |
153 | d_1_3_Deprecated = static_cast<QOpenGLFunctions_1_3_DeprecatedBackend*>(d); | - |
154 | d->refs.ref(); | - |
155 | | - |
156 | QAbstractOpenGLFunctions::initializeOpenGLFunctions(); | - |
157 | } never executed: end of block | 0 |
158 | return isInitialized(); never executed: return isInitialized(); | 0 |
159 | } | - |
160 | | - |
161 | bool QOpenGLFunctions_1_3::isContextCompatible(QOpenGLContext *context) | - |
162 | { | - |
163 | Q_ASSERT(context); | - |
164 | QSurfaceFormat f = context->format(); | - |
165 | const QPair<int, int> v = qMakePair(f.majorVersion(), f.minorVersion()); | - |
166 | if (v < qMakePair(1, 3))TRUE | never evaluated | FALSE | never evaluated |
| 0 |
167 | return false; never executed: return false; | 0 |
168 | | - |
169 | if (f.profile() == QSurfaceFormat::CoreProfile)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
170 | return false; never executed: return false; | 0 |
171 | | - |
172 | return true; never executed: return true; | 0 |
173 | } | - |
174 | | - |
175 | QOpenGLVersionProfile QOpenGLFunctions_1_3::versionProfile() | - |
176 | { | - |
177 | QOpenGLVersionProfile v; | - |
178 | v.setVersion(1, 3); | - |
179 | return v; never executed: return v; | 0 |
180 | } | - |
181 | | - |
182 | QT_END_NAMESPACE | - |
| | |