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_0.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_0::QOpenGLFunctions_1_0() | - |
69 | : QAbstractOpenGLFunctions() | - |
70 | , d_1_0_Core(0) | - |
71 | , d_1_0_Deprecated(0) | - |
72 | { | - |
73 | } never executed: end of block | 0 |
74 | | - |
75 | QOpenGLFunctions_1_0::~QOpenGLFunctions_1_0() | - |
76 | { | - |
77 | if (d_1_0_Core)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
78 | d_1_0_Core->refs.deref(); never executed: d_1_0_Core->refs.deref(); | 0 |
79 | Q_ASSERT(d_1_0_Core->refs.load()); | - |
80 | if (d_1_0_Deprecated)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
81 | d_1_0_Deprecated->refs.deref(); never executed: d_1_0_Deprecated->refs.deref(); | 0 |
82 | Q_ASSERT(d_1_0_Deprecated->refs.load()); | - |
83 | } never executed: end of block | 0 |
84 | | - |
85 | bool QOpenGLFunctions_1_0::initializeOpenGLFunctions() | - |
86 | { | - |
87 | if ( isInitialized() )TRUE | never evaluated | FALSE | never evaluated |
| 0 |
88 | return true; never executed: return true; | 0 |
89 | | - |
90 | QOpenGLContext* context = QOpenGLContext::currentContext(); | - |
91 | | - |
92 | | - |
93 | | - |
94 | if (((owningContext() && owningContext() == context) || !owningContext())TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
95 | && QOpenGLFunctions_1_0::isContextCompatible(context))TRUE | never evaluated | FALSE | never evaluated |
| 0 |
96 | { | - |
97 | | - |
98 | | - |
99 | QOpenGLVersionFunctionsBackend* d = 0; | - |
100 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); | - |
101 | d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d); | - |
102 | d->refs.ref(); | - |
103 | | - |
104 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus()); | - |
105 | d_1_0_Deprecated = static_cast<QOpenGLFunctions_1_0_DeprecatedBackend*>(d); | - |
106 | d->refs.ref(); | - |
107 | | - |
108 | QAbstractOpenGLFunctions::initializeOpenGLFunctions(); | - |
109 | } never executed: end of block | 0 |
110 | return isInitialized(); never executed: return isInitialized(); | 0 |
111 | } | - |
112 | | - |
113 | bool QOpenGLFunctions_1_0::isContextCompatible(QOpenGLContext *context) | - |
114 | { | - |
115 | Q_ASSERT(context); | - |
116 | QSurfaceFormat f = context->format(); | - |
117 | const QPair<int, int> v = qMakePair(f.majorVersion(), f.minorVersion()); | - |
118 | if (v < qMakePair(1, 0))TRUE | never evaluated | FALSE | never evaluated |
| 0 |
119 | return false; never executed: return false; | 0 |
120 | | - |
121 | if (f.profile() == QSurfaceFormat::CoreProfile)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
122 | return false; never executed: return false; | 0 |
123 | | - |
124 | return true; never executed: return true; | 0 |
125 | } | - |
126 | | - |
127 | QOpenGLVersionProfile QOpenGLFunctions_1_0::versionProfile() | - |
128 | { | - |
129 | QOpenGLVersionProfile v; | - |
130 | v.setVersion(1, 0); | - |
131 | return v; never executed: return v; | 0 |
132 | } | - |
133 | | - |
134 | QT_END_NAMESPACE | - |
| | |