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