Line | Source | Count |
1 | | - |
2 | | - |
3 | QOpenGLFunctions_1_3::QOpenGLFunctions_1_3() | - |
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_0_Deprecated(0) | - |
10 | , d_1_1_Deprecated(0) | - |
11 | , d_1_2_Deprecated(0) | - |
12 | , d_1_3_Deprecated(0) | - |
13 | { | - |
14 | } never executed: end of block | 0 |
15 | | - |
16 | QOpenGLFunctions_1_3::~QOpenGLFunctions_1_3() | - |
17 | { | - |
18 | if (d_1_0_CoreTRUE | never evaluated | FALSE | never evaluated |
&& !d_1_0_Core->refs.deref()TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
19 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Core->context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); | - |
20 | delete d_1_0_Core; | - |
21 | } never executed: end of block | 0 |
22 | if (d_1_1_CoreTRUE | never evaluated | FALSE | never evaluated |
&& !d_1_1_Core->refs.deref()TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
23 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Core->context, QOpenGLFunctions_1_1_CoreBackend::versionStatus()); | - |
24 | delete d_1_1_Core; | - |
25 | } never executed: end of block | 0 |
26 | if (d_1_2_CoreTRUE | never evaluated | FALSE | never evaluated |
&& !d_1_2_Core->refs.deref()TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
27 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Core->context, QOpenGLFunctions_1_2_CoreBackend::versionStatus()); | - |
28 | delete d_1_2_Core; | - |
29 | } never executed: end of block | 0 |
30 | if (d_1_3_CoreTRUE | never evaluated | FALSE | never evaluated |
&& !d_1_3_Core->refs.deref()TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
31 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Core->context, QOpenGLFunctions_1_3_CoreBackend::versionStatus()); | - |
32 | delete d_1_3_Core; | - |
33 | } never executed: end of block | 0 |
34 | if (d_1_0_DeprecatedTRUE | never evaluated | FALSE | never evaluated |
&& !d_1_0_Deprecated->refs.deref()TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
35 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_0_Deprecated->context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus()); | - |
36 | delete d_1_0_Deprecated; | - |
37 | } never executed: end of block | 0 |
38 | if (d_1_1_DeprecatedTRUE | never evaluated | FALSE | never evaluated |
&& !d_1_1_Deprecated->refs.deref()TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
39 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_1_Deprecated->context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus()); | - |
40 | delete d_1_1_Deprecated; | - |
41 | } never executed: end of block | 0 |
42 | if (d_1_2_DeprecatedTRUE | never evaluated | FALSE | never evaluated |
&& !d_1_2_Deprecated->refs.deref()TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
43 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_2_Deprecated->context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus()); | - |
44 | delete d_1_2_Deprecated; | - |
45 | } never executed: end of block | 0 |
46 | if (d_1_3_DeprecatedTRUE | never evaluated | FALSE | never evaluated |
&& !d_1_3_Deprecated->refs.deref()TRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
47 | QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend(d_1_3_Deprecated->context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus()); | - |
48 | delete d_1_3_Deprecated; | - |
49 | } never executed: end of block | 0 |
50 | } never executed: end of block | 0 |
51 | | - |
52 | bool QOpenGLFunctions_1_3::initializeOpenGLFunctions() | - |
53 | { | - |
54 | if ( isInitialized()TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
55 | return never executed: return true; true;never executed: return true; | 0 |
56 | | - |
57 | QOpenGLContext* context = QOpenGLContext::currentContext(); | - |
58 | | - |
59 | | - |
60 | | - |
61 | if (((owningContext()TRUE | never evaluated | FALSE | never evaluated |
&& owningContext() == contextTRUE | never evaluated | FALSE | never evaluated |
) || !owningContext()TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
62 | && QOpenGLFunctions_1_3::isContextCompatible(context)TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
63 | { | - |
64 | | - |
65 | | - |
66 | QOpenGLVersionFunctionsBackend* d = 0; | - |
67 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); | - |
68 | if (!dTRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
69 | d = new QOpenGLFunctions_1_0_CoreBackend(context); | - |
70 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus(), d); | - |
71 | } never executed: end of block | 0 |
72 | d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d); | - |
73 | d->refs.ref(); | - |
74 | | - |
75 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus()); | - |
76 | if (!dTRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
77 | d = new QOpenGLFunctions_1_1_CoreBackend(context); | - |
78 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus(), d); | - |
79 | } never executed: end of block | 0 |
80 | d_1_1_Core = static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d); | - |
81 | d->refs.ref(); | - |
82 | | - |
83 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus()); | - |
84 | if (!dTRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
85 | d = new QOpenGLFunctions_1_2_CoreBackend(context); | - |
86 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus(), d); | - |
87 | } never executed: end of block | 0 |
88 | d_1_2_Core = static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d); | - |
89 | d->refs.ref(); | - |
90 | | - |
91 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus()); | - |
92 | if (!dTRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
93 | d = new QOpenGLFunctions_1_3_CoreBackend(context); | - |
94 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus(), d); | - |
95 | } never executed: end of block | 0 |
96 | d_1_3_Core = static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d); | - |
97 | d->refs.ref(); | - |
98 | | - |
99 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus()); | - |
100 | if (!dTRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
101 | d = new QOpenGLFunctions_1_0_DeprecatedBackend(context); | - |
102 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus(), d); | - |
103 | } never executed: end of block | 0 |
104 | d_1_0_Deprecated = static_cast<QOpenGLFunctions_1_0_DeprecatedBackend*>(d); | - |
105 | d->refs.ref(); | - |
106 | | - |
107 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus()); | - |
108 | if (!dTRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
109 | d = new QOpenGLFunctions_1_1_DeprecatedBackend(context); | - |
110 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus(), d); | - |
111 | } never executed: end of block | 0 |
112 | d_1_1_Deprecated = static_cast<QOpenGLFunctions_1_1_DeprecatedBackend*>(d); | - |
113 | d->refs.ref(); | - |
114 | | - |
115 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus()); | - |
116 | if (!dTRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
117 | d = new QOpenGLFunctions_1_2_DeprecatedBackend(context); | - |
118 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus(), d); | - |
119 | } never executed: end of block | 0 |
120 | d_1_2_Deprecated = static_cast<QOpenGLFunctions_1_2_DeprecatedBackend*>(d); | - |
121 | d->refs.ref(); | - |
122 | | - |
123 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus()); | - |
124 | if (!dTRUE | never evaluated | FALSE | never evaluated |
) { | 0 |
125 | d = new QOpenGLFunctions_1_3_DeprecatedBackend(context); | - |
126 | QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus(), d); | - |
127 | } never executed: end of block | 0 |
128 | d_1_3_Deprecated = static_cast<QOpenGLFunctions_1_3_DeprecatedBackend*>(d); | - |
129 | d->refs.ref(); | - |
130 | | - |
131 | QAbstractOpenGLFunctions::initializeOpenGLFunctions(); | - |
132 | } never executed: end of block | 0 |
133 | return never executed: return isInitialized(); isInitialized();never executed: return isInitialized(); | 0 |
134 | } | - |
135 | | - |
136 | bool QOpenGLFunctions_1_3::isContextCompatible(QOpenGLContext *context) | - |
137 | { | - |
138 | ((!(context)) ? qt_assert("context",__FILE__,197) : qt_noop()); | - |
139 | QSurfaceFormat f = context->format(); | - |
140 | const QPair<int, int> v = qMakePair(f.majorVersion(), f.minorVersion()); | - |
141 | if (v < qMakePair(1, 3)TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
142 | return never executed: return false; false;never executed: return false; | 0 |
143 | | - |
144 | if (f.profile() == QSurfaceFormat::CoreProfileTRUE | never evaluated | FALSE | never evaluated |
) | 0 |
145 | return never executed: return false; false;never executed: return false; | 0 |
146 | | - |
147 | return never executed: return true; true;never executed: return true; | 0 |
148 | } | - |
149 | | - |
150 | QOpenGLVersionProfile QOpenGLFunctions_1_3::versionProfile() | - |
151 | { | - |
152 | QOpenGLVersionProfile v; | - |
153 | v.setVersion(1, 3); | - |
154 | return never executed: return v; v;never executed: return v; | 0 |
155 | } | - |
156 | | - |
157 | | - |
| | |