Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/gui/opengl/qopenglfunctions_4_0_compatibility.cpp |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | - | |||||||||||||||||||
2 | - | |||||||||||||||||||
3 | QOpenGLFunctions_4_0_Compatibility::QOpenGLFunctions_4_0_Compatibility() | - | ||||||||||||||||||
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_4_Core(0) | - | ||||||||||||||||||
10 | , d_1_5_Core(0) | - | ||||||||||||||||||
11 | , d_2_0_Core(0) | - | ||||||||||||||||||
12 | , d_2_1_Core(0) | - | ||||||||||||||||||
13 | , d_3_0_Core(0) | - | ||||||||||||||||||
14 | , d_3_1_Core(0) | - | ||||||||||||||||||
15 | , d_3_2_Core(0) | - | ||||||||||||||||||
16 | , d_3_3_Core(0) | - | ||||||||||||||||||
17 | , d_4_0_Core(0) | - | ||||||||||||||||||
18 | , d_1_0_Deprecated(0) | - | ||||||||||||||||||
19 | , d_1_1_Deprecated(0) | - | ||||||||||||||||||
20 | , d_1_2_Deprecated(0) | - | ||||||||||||||||||
21 | , d_1_3_Deprecated(0) | - | ||||||||||||||||||
22 | , d_1_4_Deprecated(0) | - | ||||||||||||||||||
23 | , m_reserved_2_0_Deprecated(nullptr) | - | ||||||||||||||||||
24 | , d_3_3_Deprecated(0) | - | ||||||||||||||||||
25 | { | - | ||||||||||||||||||
26 | } | - | ||||||||||||||||||
27 | - | |||||||||||||||||||
28 | QOpenGLFunctions_4_0_Compatibility::~QOpenGLFunctions_4_0_Compatibility() | - | ||||||||||||||||||
29 | { | - | ||||||||||||||||||
30 | if (d_1_0_Core&& !
| 0 | ||||||||||||||||||
31 | d_1_0_Core->refs.deref()) { never executed: d_1_0_Core->refs.deref(); | 0 | ||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend( never executed: d_1_0_Core->refs.deref(); never executed: ();d_1_0_Core->refs.deref(); never executed: d_1_0_Core->refs.deref(); | ||||||||||||||||||||
32 | ((!(d_1_0_Core->contextrefs.load())) ? qt_assert("d_1_0_Core->refs.load()",QOpenGLFunctions_1_0_CoreBackend::versionStatus__FILE__,97) : qt_noop()); | - | ||||||||||||||||||
33 | delete d_1_0_Core; | 0 | ||||||||||||||||||
}if (d_1_1_Core&& !
| ||||||||||||||||||||
34 | d_1_1_Core->refs.deref()) { never executed: d_1_1_Core->refs.deref(); | 0 | ||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend( never executed: d_1_1_Core->refs.deref(); never executed: ();d_1_1_Core->refs.deref(); never executed: d_1_1_Core->refs.deref(); | ||||||||||||||||||||
35 | ((!(d_1_1_Core->contextrefs.load())) ? qt_assert("d_1_1_Core->refs.load()",QOpenGLFunctions_1_1_CoreBackend::versionStatus__FILE__,100) : qt_noop()); | - | ||||||||||||||||||
36 | delete d_1_1_Core; | 0 | ||||||||||||||||||
}if (d_1_2_Core&& !
| ||||||||||||||||||||
37 | d_1_2_Core->refs.deref()) { never executed: d_1_2_Core->refs.deref(); | 0 | ||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend( never executed: d_1_2_Core->refs.deref(); never executed: ();d_1_2_Core->refs.deref(); never executed: d_1_2_Core->refs.deref(); | ||||||||||||||||||||
38 | ((!(d_1_2_Core->contextrefs.load())) ? qt_assert("d_1_2_Core->refs.load()",QOpenGLFunctions_1_2_CoreBackend::versionStatus__FILE__,103) : qt_noop()); | - | ||||||||||||||||||
39 | delete d_1_2_Core; | 0 | ||||||||||||||||||
}if (d_1_3_Core&& !
| ||||||||||||||||||||
40 | d_1_3_Core->refs.deref()) { never executed: d_1_3_Core->refs.deref(); | 0 | ||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend( never executed: d_1_3_Core->refs.deref(); never executed: ();d_1_3_Core->refs.deref(); never executed: d_1_3_Core->refs.deref(); | ||||||||||||||||||||
41 | ((!(d_1_3_Core->contextrefs.load())) ? qt_assert("d_1_3_Core->refs.load()",QOpenGLFunctions_1_3_CoreBackend::versionStatus__FILE__,106) : qt_noop()); | - | ||||||||||||||||||
42 | delete d_1_3_Core; | 0 | ||||||||||||||||||
}if (d_1_4_Core&& !
| ||||||||||||||||||||
43 | d_1_4_Core->refs.deref()) { never executed: d_1_4_Core->refs.deref(); | 0 | ||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend( never executed: d_1_4_Core->refs.deref(); never executed: ();d_1_4_Core->refs.deref(); never executed: d_1_4_Core->refs.deref(); | ||||||||||||||||||||
44 | ((!(d_1_4_Core->contextrefs.load())) ? qt_assert("d_1_4_Core->refs.load()",QOpenGLFunctions_1_4_CoreBackend::versionStatus__FILE__,109) : qt_noop()); | - | ||||||||||||||||||
45 | delete d_1_4_Core; | 0 | ||||||||||||||||||
}if (d_1_5_Core&& !
| ||||||||||||||||||||
46 | d_1_5_Core->refs.deref()) { never executed: d_1_5_Core->refs.deref(); | 0 | ||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend( never executed: d_1_5_Core->refs.deref(); never executed: ();d_1_5_Core->refs.deref(); never executed: d_1_5_Core->refs.deref(); | ||||||||||||||||||||
47 | ((!(d_1_5_Core->contextrefs.load())) ? qt_assert("d_1_5_Core->refs.load()",QOpenGLFunctions_1_5_CoreBackend::versionStatus__FILE__,112) : qt_noop()); | - | ||||||||||||||||||
48 | delete d_1_5_Core; | 0 | ||||||||||||||||||
}if (d_2_0_Core&& !
| ||||||||||||||||||||
49 | d_2_0_Core->refs.deref()) { never executed: d_2_0_Core->refs.deref(); | 0 | ||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend( never executed: d_2_0_Core->refs.deref(); never executed: ();d_2_0_Core->refs.deref(); never executed: d_2_0_Core->refs.deref(); | ||||||||||||||||||||
50 | ((!(d_2_0_Core->contextrefs.load())) ? qt_assert("d_2_0_Core->refs.load()",QOpenGLFunctions_2_0_CoreBackend::versionStatus__FILE__,115) : qt_noop()); | - | ||||||||||||||||||
51 | delete d_2_0_Core; | 0 | ||||||||||||||||||
}if (d_2_1_Core&& !
| ||||||||||||||||||||
52 | d_2_1_Core->refs.deref()) { never executed: d_2_1_Core->refs.deref(); | 0 | ||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend( never executed: d_2_1_Core->refs.deref(); never executed: ();d_2_1_Core->refs.deref(); never executed: d_2_1_Core->refs.deref(); | ||||||||||||||||||||
53 | ((!(d_2_1_Core->contextrefs.load())) ? qt_assert("d_2_1_Core->refs.load()",QOpenGLFunctions_2_1_CoreBackend::versionStatus__FILE__,118) : qt_noop()); | - | ||||||||||||||||||
54 | delete d_2_1_Core; | 0 | ||||||||||||||||||
}if (d_3_0_Core&& !
| ||||||||||||||||||||
55 | d_3_0_Core->refs.deref()) { never executed: d_3_0_Core->refs.deref(); | 0 | ||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend( never executed: d_3_0_Core->refs.deref(); never executed: ();d_3_0_Core->refs.deref(); never executed: d_3_0_Core->refs.deref(); | ||||||||||||||||||||
56 | ((!(d_3_0_Core->contextrefs.load())) ? qt_assert("d_3_0_Core->refs.load()",QOpenGLFunctions_3_0_CoreBackend::versionStatus__FILE__,121) : qt_noop()); | - | ||||||||||||||||||
57 | delete d_3_0_Core; | 0 | ||||||||||||||||||
}if (d_3_1_Core&& !
| ||||||||||||||||||||
58 | d_3_1_Core->refs.deref()) { never executed: d_3_1_Core->refs.deref(); | 0 | ||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend( never executed: d_3_1_Core->refs.deref(); never executed: ();d_3_1_Core->refs.deref(); never executed: d_3_1_Core->refs.deref(); | ||||||||||||||||||||
59 | ((!(d_3_1_Core->contextrefs.load())) ? qt_assert("d_3_1_Core->refs.load()",QOpenGLFunctions_3_1_CoreBackend::versionStatus__FILE__,124) : qt_noop()); | - | ||||||||||||||||||
60 | delete d_3_1_Core; | 0 | ||||||||||||||||||
}if (d_3_2_Core&& !
| ||||||||||||||||||||
61 | d_3_2_Core->refs.deref()) { never executed: d_3_2_Core->refs.deref(); | 0 | ||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend( never executed: d_3_2_Core->refs.deref(); never executed: ();d_3_2_Core->refs.deref(); never executed: d_3_2_Core->refs.deref(); | ||||||||||||||||||||
62 | ((!(d_3_2_Core->contextrefs.load())) ? qt_assert("d_3_2_Core->refs.load()",QOpenGLFunctions_3_2_CoreBackend::versionStatus__FILE__,127) : qt_noop()); | - | ||||||||||||||||||
63 | delete d_3_2_Core; | 0 | ||||||||||||||||||
}if (d_3_3_Core&& !
| ||||||||||||||||||||
64 | d_3_3_Core->refs.deref()) { never executed: d_3_3_Core->refs.deref(); | 0 | ||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend( never executed: d_3_3_Core->refs.deref(); never executed: ();d_3_3_Core->refs.deref(); never executed: d_3_3_Core->refs.deref(); | ||||||||||||||||||||
65 | ((!(d_3_3_Core->contextrefs.load())) ? qt_assert("d_3_3_Core->refs.load()",QOpenGLFunctions_3_3_CoreBackend::versionStatus__FILE__,130) : qt_noop()); | - | ||||||||||||||||||
66 | delete d_3_3_Core; | 0 | ||||||||||||||||||
}if (d_4_0_Core&& !
| ||||||||||||||||||||
67 | d_4_0_Core->refs.deref()) { never executed: d_4_0_Core->refs.deref(); | 0 | ||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend( never executed: d_4_0_Core->refs.deref(); never executed: ();d_4_0_Core->refs.deref(); never executed: d_4_0_Core->refs.deref(); | ||||||||||||||||||||
68 | ((!(d_4_0_Core->contextrefs.load())) ? qt_assert("d_4_0_Core->refs.load()",QOpenGLFunctions_4_0_CoreBackend::versionStatus__FILE__,133) : qt_noop()); | - | ||||||||||||||||||
69 | delete d_4_0_Core; | 0 | ||||||||||||||||||
}if (d_1_0_Deprecated&& !
| ||||||||||||||||||||
70 | d_1_0_Deprecated->refs.deref()) { never executed: d_1_0_Deprecated->refs.deref(); | 0 | ||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend( never executed: d_1_0_Deprecated->refs.deref(); never executed: ();d_1_0_Deprecated->refs.deref(); never executed: d_1_0_Deprecated->refs.deref(); | ||||||||||||||||||||
71 | ((!(d_1_0_Deprecated->contextrefs.load())) ? qt_assert("d_1_0_Deprecated->refs.load()",QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus__FILE__,136) : qt_noop()); | - | ||||||||||||||||||
72 | delete d_1_0_Deprecated; | 0 | ||||||||||||||||||
}if (d_1_1_Deprecated&& !
| ||||||||||||||||||||
73 | d_1_1_Deprecated->refs.deref()) { never executed: d_1_1_Deprecated->refs.deref(); | 0 | ||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend( never executed: d_1_1_Deprecated->refs.deref(); never executed: ();d_1_1_Deprecated->refs.deref(); never executed: d_1_1_Deprecated->refs.deref(); | ||||||||||||||||||||
74 | ((!(d_1_1_Deprecated->contextrefs.load())) ? qt_assert("d_1_1_Deprecated->refs.load()",QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus__FILE__,139) : qt_noop()); | - | ||||||||||||||||||
75 | delete d_1_1_Deprecated; | 0 | ||||||||||||||||||
}if (d_1_2_Deprecated&& !
| ||||||||||||||||||||
76 | d_1_2_Deprecated->refs.deref()) { never executed: d_1_2_Deprecated->refs.deref(); | 0 | ||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend( never executed: d_1_2_Deprecated->refs.deref(); never executed: ();d_1_2_Deprecated->refs.deref(); never executed: d_1_2_Deprecated->refs.deref(); | ||||||||||||||||||||
77 | ((!(d_1_2_Deprecated->contextrefs.load())) ? qt_assert("d_1_2_Deprecated->refs.load()",QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus__FILE__,142) : qt_noop()); | - | ||||||||||||||||||
78 | delete d_1_2_Deprecated; | 0 | ||||||||||||||||||
}if (d_1_3_Deprecated&& !
| ||||||||||||||||||||
79 | d_1_3_Deprecated->refs.deref()) { never executed: d_1_3_Deprecated->refs.deref(); | 0 | ||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend( never executed: d_1_3_Deprecated->refs.deref(); never executed: ();d_1_3_Deprecated->refs.deref(); never executed: d_1_3_Deprecated->refs.deref(); | ||||||||||||||||||||
80 | ((!(d_1_3_Deprecated->contextrefs.load())) ? qt_assert("d_1_3_Deprecated->refs.load()",QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus__FILE__,145) : qt_noop()); | - | ||||||||||||||||||
81 | delete d_1_3_Deprecated; | 0 | ||||||||||||||||||
}if (d_1_4_Deprecated&& !
| ||||||||||||||||||||
82 | d_1_4_Deprecated->refs.deref()) { never executed: d_1_4_Deprecated->refs.deref(); | 0 | ||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend( never executed: d_1_4_Deprecated->refs.deref(); never executed: ();d_1_4_Deprecated->refs.deref(); never executed: d_1_4_Deprecated->refs.deref(); | ||||||||||||||||||||
83 | ((!(d_1_4_Deprecated->contextrefs.load())) ? qt_assert("d_1_4_Deprecated->refs.load()",QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus__FILE__,148) : qt_noop()); | - | ||||||||||||||||||
84 | delete d_1_4_Deprecated; | 0 | ||||||||||||||||||
}if (d_3_3_Deprecated&& !
| ||||||||||||||||||||
85 | d_3_3_Deprecated->refs.deref()) { never executed: d_3_3_Deprecated->refs.deref(); | 0 | ||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::removeFunctionsBackend( never executed: d_3_3_Deprecated->refs.deref(); never executed: ();d_3_3_Deprecated->refs.deref(); never executed: d_3_3_Deprecated->refs.deref(); | ||||||||||||||||||||
86 | ((!(d_3_3_Deprecated->contextrefs.load())) ? qt_assert("d_3_3_Deprecated->refs.load()",QOpenGLFunctions_3_3_DeprecatedBackend::versionStatus__FILE__,151) : qt_noop()); | - | ||||||||||||||||||
delete d_3_3_Deprecated; | ||||||||||||||||||||
}} never executed: end of block | ||||||||||||||||||||
88 | - | |||||||||||||||||||
89 | bool QOpenGLFunctions_4_0_Compatibility::initializeOpenGLFunctions() | - | ||||||||||||||||||
90 | { | - | ||||||||||||||||||
91 | if ( isInitialized()
| 0 | ||||||||||||||||||
92 | return never executed: true;return true; never executed: return true; | 0 | ||||||||||||||||||
93 | - | |||||||||||||||||||
94 | QOpenGLContext* context = QOpenGLContext::currentContext(); | - | ||||||||||||||||||
95 | - | |||||||||||||||||||
96 | - | |||||||||||||||||||
97 | - | |||||||||||||||||||
98 | if (((owningContext()
| 0 | ||||||||||||||||||
99 | && QOpenGLFunctions_4_0_Compatibility::isContextCompatible(context)
| 0 | ||||||||||||||||||
100 | { | - | ||||||||||||||||||
101 | - | |||||||||||||||||||
102 | - | |||||||||||||||||||
103 | QOpenGLVersionFunctionsBackend* d = 0; | - | ||||||||||||||||||
104 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus()); | - | ||||||||||||||||||
105 | if (!d) { | - | ||||||||||||||||||
d = new QOpenGLFunctions_1_0_CoreBackend(context); | ||||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_CoreBackend::versionStatus(), d); | ||||||||||||||||||||
}d_1_0_Core = static_cast<QOpenGLFunctions_1_0_CoreBackend*>(d); | ||||||||||||||||||||
106 | d->refs.ref(); | - | ||||||||||||||||||
107 | - | |||||||||||||||||||
108 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus()); | - | ||||||||||||||||||
109 | if (!d) { | - | ||||||||||||||||||
d = new QOpenGLFunctions_1_1_CoreBackend(context); | ||||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_CoreBackend::versionStatus(), d); | ||||||||||||||||||||
}d_1_1_Core = static_cast<QOpenGLFunctions_1_1_CoreBackend*>(d); | ||||||||||||||||||||
110 | d->refs.ref(); | - | ||||||||||||||||||
111 | - | |||||||||||||||||||
112 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus()); | - | ||||||||||||||||||
113 | if (!d) { | - | ||||||||||||||||||
d = new QOpenGLFunctions_1_2_CoreBackend(context); | ||||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_CoreBackend::versionStatus(), d); | ||||||||||||||||||||
}d_1_2_Core = static_cast<QOpenGLFunctions_1_2_CoreBackend*>(d); | ||||||||||||||||||||
114 | d->refs.ref(); | - | ||||||||||||||||||
115 | - | |||||||||||||||||||
116 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus()); | - | ||||||||||||||||||
117 | if (!d) { | - | ||||||||||||||||||
d = new QOpenGLFunctions_1_3_CoreBackend(context); | ||||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_CoreBackend::versionStatus(), d); | ||||||||||||||||||||
}d_1_3_Core = static_cast<QOpenGLFunctions_1_3_CoreBackend*>(d); | ||||||||||||||||||||
118 | d->refs.ref(); | - | ||||||||||||||||||
119 | - | |||||||||||||||||||
120 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus()); | - | ||||||||||||||||||
121 | if (!d) { | - | ||||||||||||||||||
d = new QOpenGLFunctions_1_4_CoreBackend(context); | ||||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_CoreBackend::versionStatus(), d); | ||||||||||||||||||||
}d_1_4_Core = static_cast<QOpenGLFunctions_1_4_CoreBackend*>(d); | ||||||||||||||||||||
122 | d->refs.ref(); | - | ||||||||||||||||||
123 | - | |||||||||||||||||||
124 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus()); | - | ||||||||||||||||||
125 | if (!d) { | - | ||||||||||||||||||
d = new QOpenGLFunctions_1_5_CoreBackend(context); | ||||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_5_CoreBackend::versionStatus(), d); | ||||||||||||||||||||
}d_1_5_Core = static_cast<QOpenGLFunctions_1_5_CoreBackend*>(d); | ||||||||||||||||||||
126 | d->refs.ref(); | - | ||||||||||||||||||
127 | - | |||||||||||||||||||
128 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus()); | - | ||||||||||||||||||
129 | if (!d) { | - | ||||||||||||||||||
d = new QOpenGLFunctions_2_0_CoreBackend(context); | ||||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_0_CoreBackend::versionStatus(), d); | ||||||||||||||||||||
}d_2_0_Core = static_cast<QOpenGLFunctions_2_0_CoreBackend*>(d); | ||||||||||||||||||||
130 | d->refs.ref(); | - | ||||||||||||||||||
131 | - | |||||||||||||||||||
132 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus()); | - | ||||||||||||||||||
133 | if (!d) { | - | ||||||||||||||||||
d = new QOpenGLFunctions_2_1_CoreBackend(context); | ||||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_2_1_CoreBackend::versionStatus(), d); | ||||||||||||||||||||
}d_2_1_Core = static_cast<QOpenGLFunctions_2_1_CoreBackend*>(d); | ||||||||||||||||||||
134 | d->refs.ref(); | - | ||||||||||||||||||
135 | - | |||||||||||||||||||
136 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus()); | - | ||||||||||||||||||
137 | if (!d) { | - | ||||||||||||||||||
d = new QOpenGLFunctions_3_0_CoreBackend(context); | ||||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_0_CoreBackend::versionStatus(), d); | ||||||||||||||||||||
}d_3_0_Core = static_cast<QOpenGLFunctions_3_0_CoreBackend*>(d); | ||||||||||||||||||||
138 | d->refs.ref(); | - | ||||||||||||||||||
139 | - | |||||||||||||||||||
140 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus()); | - | ||||||||||||||||||
141 | if (!d) { | - | ||||||||||||||||||
d = new QOpenGLFunctions_3_1_CoreBackend(context); | ||||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_1_CoreBackend::versionStatus(), d); | ||||||||||||||||||||
}d_3_1_Core = static_cast<QOpenGLFunctions_3_1_CoreBackend*>(d); | ||||||||||||||||||||
142 | d->refs.ref(); | - | ||||||||||||||||||
143 | - | |||||||||||||||||||
144 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus()); | - | ||||||||||||||||||
145 | if (!d) { | - | ||||||||||||||||||
d = new QOpenGLFunctions_3_2_CoreBackend(context); | ||||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_2_CoreBackend::versionStatus(), d); | ||||||||||||||||||||
}d_3_2_Core = static_cast<QOpenGLFunctions_3_2_CoreBackend*>(d); | ||||||||||||||||||||
146 | d->refs.ref(); | - | ||||||||||||||||||
147 | - | |||||||||||||||||||
148 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus()); | - | ||||||||||||||||||
149 | if (!d) { | - | ||||||||||||||||||
d = new QOpenGLFunctions_3_3_CoreBackend(context); | ||||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_3_CoreBackend::versionStatus(), d); | ||||||||||||||||||||
}d_3_3_Core = static_cast<QOpenGLFunctions_3_3_CoreBackend*>(d); | ||||||||||||||||||||
150 | d->refs.ref(); | - | ||||||||||||||||||
151 | - | |||||||||||||||||||
152 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_4_0_CoreBackend::versionStatus()); | - | ||||||||||||||||||
153 | if (!d) { | - | ||||||||||||||||||
d = new QOpenGLFunctions_4_0_CoreBackend(context); | ||||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_4_0_CoreBackend::versionStatus(), d); | ||||||||||||||||||||
}d_4_0_Core = static_cast<QOpenGLFunctions_4_0_CoreBackend*>(d); | ||||||||||||||||||||
154 | d->refs.ref(); | - | ||||||||||||||||||
155 | - | |||||||||||||||||||
156 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus()); | - | ||||||||||||||||||
157 | if (!d) { | - | ||||||||||||||||||
d = new QOpenGLFunctions_1_0_DeprecatedBackend(context); | ||||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_0_DeprecatedBackend::versionStatus(), d); | ||||||||||||||||||||
}d_1_0_Deprecated = static_cast<QOpenGLFunctions_1_0_DeprecatedBackend*>(d); | ||||||||||||||||||||
158 | d->refs.ref(); | - | ||||||||||||||||||
159 | - | |||||||||||||||||||
160 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus()); | - | ||||||||||||||||||
161 | if (!d) { | - | ||||||||||||||||||
d = new QOpenGLFunctions_1_1_DeprecatedBackend(context); | ||||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_1_DeprecatedBackend::versionStatus(), d); | ||||||||||||||||||||
}d_1_1_Deprecated = static_cast<QOpenGLFunctions_1_1_DeprecatedBackend*>(d); | ||||||||||||||||||||
162 | d->refs.ref(); | - | ||||||||||||||||||
163 | - | |||||||||||||||||||
164 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus()); | - | ||||||||||||||||||
165 | if (!d) { | - | ||||||||||||||||||
d = new QOpenGLFunctions_1_2_DeprecatedBackend(context); | ||||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_2_DeprecatedBackend::versionStatus(), d); | ||||||||||||||||||||
}d_1_2_Deprecated = static_cast<QOpenGLFunctions_1_2_DeprecatedBackend*>(d); | ||||||||||||||||||||
166 | d->refs.ref(); | - | ||||||||||||||||||
167 | - | |||||||||||||||||||
168 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus()); | - | ||||||||||||||||||
169 | if (!d) { | - | ||||||||||||||||||
d = new QOpenGLFunctions_1_3_DeprecatedBackend(context); | ||||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_3_DeprecatedBackend::versionStatus(), d); | ||||||||||||||||||||
}d_1_3_Deprecated = static_cast<QOpenGLFunctions_1_3_DeprecatedBackend*>(d); | ||||||||||||||||||||
170 | d->refs.ref(); | - | ||||||||||||||||||
171 | - | |||||||||||||||||||
172 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus()); | - | ||||||||||||||||||
173 | if (!d) { | - | ||||||||||||||||||
d = new QOpenGLFunctions_1_4_DeprecatedBackend(context); | ||||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_1_4_DeprecatedBackend::versionStatus(), d); | ||||||||||||||||||||
}d_1_4_Deprecated = static_cast<QOpenGLFunctions_1_4_DeprecatedBackend*>(d); | ||||||||||||||||||||
174 | d->refs.ref(); | - | ||||||||||||||||||
175 | - | |||||||||||||||||||
176 | d = QAbstractOpenGLFunctionsPrivate::functionsBackend(context, QOpenGLFunctions_3_3_DeprecatedBackend::versionStatus()); | - | ||||||||||||||||||
177 | if (!d) { | - | ||||||||||||||||||
d = new QOpenGLFunctions_3_3_DeprecatedBackend(context); | ||||||||||||||||||||
QAbstractOpenGLFunctionsPrivate::insertFunctionsBackend(context, QOpenGLFunctions_3_3_DeprecatedBackend::versionStatus(), d); | ||||||||||||||||||||
}d_3_3_Deprecated = static_cast<QOpenGLFunctions_3_3_DeprecatedBackend*>(d); | ||||||||||||||||||||
178 | d->refs.ref(); | - | ||||||||||||||||||
179 | - | |||||||||||||||||||
180 | QAbstractOpenGLFunctions::initializeOpenGLFunctions(); | - | ||||||||||||||||||
181 | } never executed: end of block | 0 | ||||||||||||||||||
182 | return never executed: isInitialized();return isInitialized(); never executed: return isInitialized(); | 0 | ||||||||||||||||||
183 | } | - | ||||||||||||||||||
184 | - | |||||||||||||||||||
185 | bool QOpenGLFunctions_4_0_Compatibility::isContextCompatible(QOpenGLContext *context) | - | ||||||||||||||||||
186 | { | - | ||||||||||||||||||
187 | ((!(context)) ? qt_assert("context",__FILE__,341252) : qt_noop()); | - | ||||||||||||||||||
188 | QSurfaceFormat f = context->format(); | - | ||||||||||||||||||
189 | const QPair<int, int> v = qMakePair(f.majorVersion(), f.minorVersion()); | - | ||||||||||||||||||
190 | if (v < qMakePair(4, 0)) | - | ||||||||||||||||||
191 | return false; | - | ||||||||||||||||||
192 | - | |||||||||||||||||||
193 | if (f.profile() == QSurfaceFormat::CoreProfile) | - | ||||||||||||||||||
194 | return false; | - | ||||||||||||||||||
195 | - | |||||||||||||||||||
196 | return true; | - | ||||||||||||||||||
197 | } | - | ||||||||||||||||||
198 | - | |||||||||||||||||||
199 | QOpenGLVersionProfile QOpenGLFunctions_4_0_Compatibility::versionProfile() | - | ||||||||||||||||||
200 | { | - | ||||||||||||||||||
201 | QOpenGLVersionProfile v; | - | ||||||||||||||||||
202 | v.setVersion(4, 0); | - | ||||||||||||||||||
203 | v.setProfile(QSurfaceFormat::CompatibilityProfile); | - | ||||||||||||||||||
204 | return v; | - | ||||||||||||||||||
205 | } | - | ||||||||||||||||||
206 | - | |||||||||||||||||||
207 | - | |||||||||||||||||||
Switch to Source code | Preprocessed file |