qopengltexture.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/gui/opengl/qopengltexture.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8-
9-
10QOpenGLTexturePrivate::QOpenGLTexturePrivate(QOpenGLTexture::Target textureTarget,-
11 QOpenGLTexture *qq)-
12 : q_ptr(qq),-
13 context(0),-
14 target(textureTarget),-
15 textureId(0),-
16 format(QOpenGLTexture::NoFormat),-
17 formatClass(QOpenGLTexture::NoFormatClass),-
18 requestedMipLevels(1),-
19 mipLevels(-1),-
20 layers(1),-
21 faces(1),-
22 samples(0),-
23 fixedSamplePositions(true),-
24 baseLevel(0),-
25 maxLevel(1000),-
26 depthStencilMode(QOpenGLTexture::DepthMode),-
27 comparisonFunction(QOpenGLTexture::CompareLessEqual),-
28 comparisonMode(QOpenGLTexture::CompareNone),-
29 minFilter(QOpenGLTexture::Nearest),-
30 magFilter(QOpenGLTexture::Nearest),-
31 maxAnisotropy(1.0f),-
32 minLevelOfDetail(-1000.0f),-
33 maxLevelOfDetail(1000.0f),-
34 levelOfDetailBias(0.0f),-
35 textureView(false),-
36 autoGenerateMipMaps(true),-
37 storageAllocated(false),-
38 texFuncs(0),-
39 functions(0)-
40{-
41 dimensions[0] = dimensions[1] = dimensions[2] = 1;-
42-
43 switch (target) {-
44 case
never executed: case QOpenGLTexture::Target1D:
QOpenGLTexture::Target1D:
never executed: case QOpenGLTexture::Target1D:
0
45 bindingTarget = QOpenGLTexture::BindingTarget1D;-
46 break;
never executed: break;
0
47 case
never executed: case QOpenGLTexture::Target1DArray:
QOpenGLTexture::Target1DArray:
never executed: case QOpenGLTexture::Target1DArray:
0
48 bindingTarget = QOpenGLTexture::BindingTarget1DArray;-
49 break;
never executed: break;
0
50 case
never executed: case QOpenGLTexture::Target2D:
QOpenGLTexture::Target2D:
never executed: case QOpenGLTexture::Target2D:
0
51 bindingTarget = QOpenGLTexture::BindingTarget2D;-
52 break;
never executed: break;
0
53 case
never executed: case QOpenGLTexture::Target2DArray:
QOpenGLTexture::Target2DArray:
never executed: case QOpenGLTexture::Target2DArray:
0
54 bindingTarget = QOpenGLTexture::BindingTarget2DArray;-
55 break;
never executed: break;
0
56 case
never executed: case QOpenGLTexture::Target3D:
QOpenGLTexture::Target3D:
never executed: case QOpenGLTexture::Target3D:
0
57 bindingTarget = QOpenGLTexture::BindingTarget3D;-
58 break;
never executed: break;
0
59 case
never executed: case QOpenGLTexture::TargetCubeMap:
QOpenGLTexture::TargetCubeMap:
never executed: case QOpenGLTexture::TargetCubeMap:
0
60 bindingTarget = QOpenGLTexture::BindingTargetCubeMap;-
61 faces = 6;-
62 break;
never executed: break;
0
63 case
never executed: case QOpenGLTexture::TargetCubeMapArray:
QOpenGLTexture::TargetCubeMapArray:
never executed: case QOpenGLTexture::TargetCubeMapArray:
0
64 bindingTarget = QOpenGLTexture::BindingTargetCubeMapArray;-
65 faces = 6;-
66 break;
never executed: break;
0
67 case
never executed: case QOpenGLTexture::Target2DMultisample:
QOpenGLTexture::Target2DMultisample:
never executed: case QOpenGLTexture::Target2DMultisample:
0
68 bindingTarget = QOpenGLTexture::BindingTarget2DMultisample;-
69 break;
never executed: break;
0
70 case
never executed: case QOpenGLTexture::Target2DMultisampleArray:
QOpenGLTexture::Target2DMultisampleArray:
never executed: case QOpenGLTexture::Target2DMultisampleArray:
0
71 bindingTarget = QOpenGLTexture::BindingTarget2DMultisampleArray;-
72 break;
never executed: break;
0
73 case
never executed: case QOpenGLTexture::TargetRectangle:
QOpenGLTexture::TargetRectangle:
never executed: case QOpenGLTexture::TargetRectangle:
0
74 bindingTarget = QOpenGLTexture::BindingTargetRectangle;-
75 break;
never executed: break;
0
76 case
never executed: case QOpenGLTexture::TargetBuffer:
QOpenGLTexture::TargetBuffer:
never executed: case QOpenGLTexture::TargetBuffer:
0
77 bindingTarget = QOpenGLTexture::BindingTargetBuffer;-
78 break;
never executed: break;
0
79 }-
80-
81 swizzleMask[0] = QOpenGLTexture::RedValue;-
82 swizzleMask[1] = QOpenGLTexture::GreenValue;-
83 swizzleMask[2] = QOpenGLTexture::BlueValue;-
84 swizzleMask[3] = QOpenGLTexture::AlphaValue;-
85-
86 wrapModes[0] = wrapModes[1] = wrapModes[2] = target == QOpenGLTexture::TargetRectangle
target == QOpe...argetRectangleDescription
TRUEnever evaluated
FALSEnever evaluated
0
87 ? QOpenGLTexture::ClampToEdge : QOpenGLTexture::Repeat;-
88}
never executed: end of block
0
89-
90QOpenGLTexturePrivate::~QOpenGLTexturePrivate()-
91{-
92 destroy();-
93}
never executed: end of block
0
94-
95void QOpenGLTexturePrivate::initializeOpenGLFunctions()-
96{-
97-
98 if (texFuncs
texFuncsDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
99 return;
never executed: return;
0
100-
101-
102-
103-
104 texFuncs = context->textureFunctions();-
105 if (!texFuncs
!texFuncsDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
106 texFuncs = new QOpenGLTextureHelper(context);-
107 context->setTextureFunctions(texFuncs);-
108 }
never executed: end of block
0
109}
never executed: end of block
0
110-
111bool QOpenGLTexturePrivate::create()-
112{-
113 if (textureId != 0
textureId != 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
114 return
never executed: return true;
true;
never executed: return true;
0
115-
116 QOpenGLContext *ctx = QOpenGLContext::currentContext();-
117 if (!ctx
!ctxDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
118 QMessageLogger(__FILE__, 164, __PRETTY_FUNCTION__).warning("Requires a valid current OpenGL context.\n"-
119 "Texture has not been created");-
120 return
never executed: return false;
false;
never executed: return false;
0
121 }-
122 context = ctx;-
123 functions = ctx->functions();-
124-
125-
126 initializeOpenGLFunctions();-
127-
128-
129 QOpenGLTexture::Feature feature = QOpenGLTexture::ImmutableStorage;-
130 while (feature != QOpenGLTexture::MaxFeatureFlag
feature != QOp...MaxFeatureFlagDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
131 if (QOpenGLTexture::hasFeature(feature)
QOpenGLTexture...ature(feature)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
132 features |= feature;
never executed: features |= feature;
0
133 feature = static_cast<QOpenGLTexture::Feature>(feature << 1);-
134 }
never executed: end of block
0
135-
136 functions->glGenTextures(1, &textureId);-
137 return
never executed: return textureId != 0;
textureId != 0;
never executed: return textureId != 0;
0
138}-
139-
140void QOpenGLTexturePrivate::destroy()-
141{-
142 if (!textureId
!textureIdDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
143-
144 return;
never executed: return;
0
145 }-
146 QOpenGLContext *currentContext = QOpenGLContext::currentContext();-
147 if (!currentContext
!currentContextDescription
TRUEnever evaluated
FALSEnever evaluated
|| !QOpenGLContext::areSharing(currentContext, context)
!QOpenGLContex...text, context)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
148 QMessageLogger(__FILE__, 194, __PRETTY_FUNCTION__).warning("Texture is not valid in the current context.\n"-
149 "Texture has not been destroyed");-
150 return;
never executed: return;
0
151 }-
152-
153 functions->glDeleteTextures(1, &textureId);-
154-
155 context = 0;-
156 functions = 0;-
157 textureId = 0;-
158 format = QOpenGLTexture::NoFormat;-
159 formatClass = QOpenGLTexture::NoFormatClass;-
160 requestedMipLevels = 1;-
161 mipLevels = -1;-
162 layers = 1;-
163 faces = 1;-
164 samples = 0;-
165 fixedSamplePositions = true,-
166 baseLevel = 0;-
167 maxLevel = 1000;-
168 depthStencilMode = QOpenGLTexture::DepthMode;-
169 minFilter = QOpenGLTexture::Nearest;-
170 magFilter = QOpenGLTexture::Nearest;-
171 maxAnisotropy = 1.0f;-
172 minLevelOfDetail = -1000.0f;-
173 maxLevelOfDetail = 1000.0f;-
174 levelOfDetailBias = 0.0f;-
175 textureView = false;-
176 autoGenerateMipMaps = true;-
177 storageAllocated = false;-
178 texFuncs = 0;-
179-
180 swizzleMask[0] = QOpenGLTexture::RedValue;-
181 swizzleMask[1] = QOpenGLTexture::GreenValue;-
182 swizzleMask[2] = QOpenGLTexture::BlueValue;-
183 swizzleMask[3] = QOpenGLTexture::AlphaValue;-
184-
185 wrapModes[0] = wrapModes[1] = wrapModes[2] = target == QOpenGLTexture::TargetRectangle
target == QOpe...argetRectangleDescription
TRUEnever evaluated
FALSEnever evaluated
0
186 ? QOpenGLTexture::ClampToEdge : QOpenGLTexture::Repeat;-
187}
never executed: end of block
0
188-
189void QOpenGLTexturePrivate::bind()-
190{-
191 functions->glBindTexture(target, textureId);-
192}
never executed: end of block
0
193-
194void QOpenGLTexturePrivate::bind(uint unit, QOpenGLTexture::TextureUnitReset reset)-
195{-
196 GLint oldTextureUnit = 0;-
197 if (reset == QOpenGLTexture::ResetTextureUnit
reset == QOpen...setTextureUnitDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
198 functions->glGetIntegerv(0x84E0, &oldTextureUnit);
never executed: functions->glGetIntegerv(0x84E0, &oldTextureUnit);
0
199-
200 texFuncs->glActiveTexture(0x84C0 + unit);-
201 functions->glBindTexture(target, textureId);-
202-
203 if (reset == QOpenGLTexture::ResetTextureUnit
reset == QOpen...setTextureUnitDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
204 texFuncs->glActiveTexture(0x84C0 + oldTextureUnit);
never executed: texFuncs->glActiveTexture(0x84C0 + oldTextureUnit);
0
205}
never executed: end of block
0
206-
207void QOpenGLTexturePrivate::release()-
208{-
209 functions->glBindTexture(target, 0);-
210}
never executed: end of block
0
211-
212void QOpenGLTexturePrivate::release(uint unit, QOpenGLTexture::TextureUnitReset reset)-
213{-
214 GLint oldTextureUnit = 0;-
215 if (reset == QOpenGLTexture::ResetTextureUnit
reset == QOpen...setTextureUnitDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
216 functions->glGetIntegerv(0x84E0, &oldTextureUnit);
never executed: functions->glGetIntegerv(0x84E0, &oldTextureUnit);
0
217-
218 texFuncs->glActiveTexture(0x84C0 + unit);-
219 functions->glBindTexture(target, 0);-
220-
221 if (reset == QOpenGLTexture::ResetTextureUnit
reset == QOpen...setTextureUnitDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
222 texFuncs->glActiveTexture(0x84C0 + oldTextureUnit);
never executed: texFuncs->glActiveTexture(0x84C0 + oldTextureUnit);
0
223}
never executed: end of block
0
224-
225bool QOpenGLTexturePrivate::isBound() const-
226{-
227 GLint boundTextureId = 0;-
228 functions->glGetIntegerv(bindingTarget, &boundTextureId);-
229 return
never executed: return (static_cast<GLuint>(boundTextureId) == textureId);
(static_cast<GLuint>(boundTextureId) == textureId);
never executed: return (static_cast<GLuint>(boundTextureId) == textureId);
0
230}-
231-
232bool QOpenGLTexturePrivate::isBound(uint unit) const-
233{-
234 GLint oldTextureUnit = 0;-
235 functions->glGetIntegerv(0x84E0, &oldTextureUnit);-
236-
237 GLint boundTextureId = 0;-
238 texFuncs->glActiveTexture(0x84C0 + unit);-
239 functions->glGetIntegerv(bindingTarget, &boundTextureId);-
240 bool result = (static_cast<GLuint>(boundTextureId) == textureId);-
241-
242 texFuncs->glActiveTexture(0x84C0 + oldTextureUnit);-
243 return
never executed: return result;
result;
never executed: return result;
0
244}-
245-
246int QOpenGLTexturePrivate::evaluateMipLevels() const-
247{-
248 switch (target) {-
249 case
never executed: case QOpenGLTexture::Target1D:
QOpenGLTexture::Target1D:
never executed: case QOpenGLTexture::Target1D:
0
250 case
never executed: case QOpenGLTexture::Target1DArray:
QOpenGLTexture::Target1DArray:
never executed: case QOpenGLTexture::Target1DArray:
0
251 case
never executed: case QOpenGLTexture::Target2D:
QOpenGLTexture::Target2D:
never executed: case QOpenGLTexture::Target2D:
0
252 case
never executed: case QOpenGLTexture::Target2DArray:
QOpenGLTexture::Target2DArray:
never executed: case QOpenGLTexture::Target2DArray:
0
253 case
never executed: case QOpenGLTexture::Target3D:
QOpenGLTexture::Target3D:
never executed: case QOpenGLTexture::Target3D:
0
254 case
never executed: case QOpenGLTexture::TargetCubeMap:
QOpenGLTexture::TargetCubeMap:
never executed: case QOpenGLTexture::TargetCubeMap:
0
255 case
never executed: case QOpenGLTexture::TargetCubeMapArray:
QOpenGLTexture::TargetCubeMapArray:
never executed: case QOpenGLTexture::TargetCubeMapArray:
0
256 return
never executed: return qMin(maximumMipLevelCount(), qMax(1, requestedMipLevels));
qMin(maximumMipLevelCount(), qMax(1, requestedMipLevels));
never executed: return qMin(maximumMipLevelCount(), qMax(1, requestedMipLevels));
0
257-
258 case
never executed: case QOpenGLTexture::TargetRectangle:
QOpenGLTexture::TargetRectangle:
never executed: case QOpenGLTexture::TargetRectangle:
0
259 case
never executed: case QOpenGLTexture::Target2DMultisample:
QOpenGLTexture::Target2DMultisample:
never executed: case QOpenGLTexture::Target2DMultisample:
0
260 case
never executed: case QOpenGLTexture::Target2DMultisampleArray:
QOpenGLTexture::Target2DMultisampleArray:
never executed: case QOpenGLTexture::Target2DMultisampleArray:
0
261 case
never executed: case QOpenGLTexture::TargetBuffer:
QOpenGLTexture::TargetBuffer:
never executed: case QOpenGLTexture::TargetBuffer:
0
262 default
never executed: default:
:
never executed: default:
0
263 return
never executed: return 1;
1;
never executed: return 1;
0
264 }-
265}-
266-
267static bool isSizedTextureFormat(QOpenGLTexture::TextureFormat internalFormat)-
268{-
269 switch (internalFormat) {-
270 case
never executed: case QOpenGLTexture::NoFormat:
QOpenGLTexture::NoFormat:
never executed: case QOpenGLTexture::NoFormat:
0
271 return
never executed: return false;
false;
never executed: return false;
0
272-
273 case
never executed: case QOpenGLTexture::R8_UNorm:
QOpenGLTexture::R8_UNorm:
never executed: case QOpenGLTexture::R8_UNorm:
0
274 case
never executed: case QOpenGLTexture::RG8_UNorm:
QOpenGLTexture::RG8_UNorm:
never executed: case QOpenGLTexture::RG8_UNorm:
0
275 case
never executed: case QOpenGLTexture::RGB8_UNorm:
QOpenGLTexture::RGB8_UNorm:
never executed: case QOpenGLTexture::RGB8_UNorm:
0
276 case
never executed: case QOpenGLTexture::RGBA8_UNorm:
QOpenGLTexture::RGBA8_UNorm:
never executed: case QOpenGLTexture::RGBA8_UNorm:
0
277 case
never executed: case QOpenGLTexture::R16_UNorm:
QOpenGLTexture::R16_UNorm:
never executed: case QOpenGLTexture::R16_UNorm:
0
278 case
never executed: case QOpenGLTexture::RG16_UNorm:
QOpenGLTexture::RG16_UNorm:
never executed: case QOpenGLTexture::RG16_UNorm:
0
279 case
never executed: case QOpenGLTexture::RGB16_UNorm:
QOpenGLTexture::RGB16_UNorm:
never executed: case QOpenGLTexture::RGB16_UNorm:
0
280 case
never executed: case QOpenGLTexture::RGBA16_UNorm:
QOpenGLTexture::RGBA16_UNorm:
never executed: case QOpenGLTexture::RGBA16_UNorm:
0
281 case
never executed: case QOpenGLTexture::R8_SNorm:
QOpenGLTexture::R8_SNorm:
never executed: case QOpenGLTexture::R8_SNorm:
0
282 case
never executed: case QOpenGLTexture::RG8_SNorm:
QOpenGLTexture::RG8_SNorm:
never executed: case QOpenGLTexture::RG8_SNorm:
0
283 case
never executed: case QOpenGLTexture::RGB8_SNorm:
QOpenGLTexture::RGB8_SNorm:
never executed: case QOpenGLTexture::RGB8_SNorm:
0
284 case
never executed: case QOpenGLTexture::RGBA8_SNorm:
QOpenGLTexture::RGBA8_SNorm:
never executed: case QOpenGLTexture::RGBA8_SNorm:
0
285 case
never executed: case QOpenGLTexture::R16_SNorm:
QOpenGLTexture::R16_SNorm:
never executed: case QOpenGLTexture::R16_SNorm:
0
286 case
never executed: case QOpenGLTexture::RG16_SNorm:
QOpenGLTexture::RG16_SNorm:
never executed: case QOpenGLTexture::RG16_SNorm:
0
287 case
never executed: case QOpenGLTexture::RGB16_SNorm:
QOpenGLTexture::RGB16_SNorm:
never executed: case QOpenGLTexture::RGB16_SNorm:
0
288 case
never executed: case QOpenGLTexture::RGBA16_SNorm:
QOpenGLTexture::RGBA16_SNorm:
never executed: case QOpenGLTexture::RGBA16_SNorm:
0
289 case
never executed: case QOpenGLTexture::R8U:
QOpenGLTexture::R8U:
never executed: case QOpenGLTexture::R8U:
0
290 case
never executed: case QOpenGLTexture::RG8U:
QOpenGLTexture::RG8U:
never executed: case QOpenGLTexture::RG8U:
0
291 case
never executed: case QOpenGLTexture::RGB8U:
QOpenGLTexture::RGB8U:
never executed: case QOpenGLTexture::RGB8U:
0
292 case
never executed: case QOpenGLTexture::RGBA8U:
QOpenGLTexture::RGBA8U:
never executed: case QOpenGLTexture::RGBA8U:
0
293 case
never executed: case QOpenGLTexture::R16U:
QOpenGLTexture::R16U:
never executed: case QOpenGLTexture::R16U:
0
294 case
never executed: case QOpenGLTexture::RG16U:
QOpenGLTexture::RG16U:
never executed: case QOpenGLTexture::RG16U:
0
295 case
never executed: case QOpenGLTexture::RGB16U:
QOpenGLTexture::RGB16U:
never executed: case QOpenGLTexture::RGB16U:
0
296 case
never executed: case QOpenGLTexture::RGBA16U:
QOpenGLTexture::RGBA16U:
never executed: case QOpenGLTexture::RGBA16U:
0
297 case
never executed: case QOpenGLTexture::R32U:
QOpenGLTexture::R32U:
never executed: case QOpenGLTexture::R32U:
0
298 case
never executed: case QOpenGLTexture::RG32U:
QOpenGLTexture::RG32U:
never executed: case QOpenGLTexture::RG32U:
0
299 case
never executed: case QOpenGLTexture::RGB32U:
QOpenGLTexture::RGB32U:
never executed: case QOpenGLTexture::RGB32U:
0
300 case
never executed: case QOpenGLTexture::RGBA32U:
QOpenGLTexture::RGBA32U:
never executed: case QOpenGLTexture::RGBA32U:
0
301 case
never executed: case QOpenGLTexture::R8I:
QOpenGLTexture::R8I:
never executed: case QOpenGLTexture::R8I:
0
302 case
never executed: case QOpenGLTexture::RG8I:
QOpenGLTexture::RG8I:
never executed: case QOpenGLTexture::RG8I:
0
303 case
never executed: case QOpenGLTexture::RGB8I:
QOpenGLTexture::RGB8I:
never executed: case QOpenGLTexture::RGB8I:
0
304 case
never executed: case QOpenGLTexture::RGBA8I:
QOpenGLTexture::RGBA8I:
never executed: case QOpenGLTexture::RGBA8I:
0
305 case
never executed: case QOpenGLTexture::R16I:
QOpenGLTexture::R16I:
never executed: case QOpenGLTexture::R16I:
0
306 case
never executed: case QOpenGLTexture::RG16I:
QOpenGLTexture::RG16I:
never executed: case QOpenGLTexture::RG16I:
0
307 case
never executed: case QOpenGLTexture::RGB16I:
QOpenGLTexture::RGB16I:
never executed: case QOpenGLTexture::RGB16I:
0
308 case
never executed: case QOpenGLTexture::RGBA16I:
QOpenGLTexture::RGBA16I:
never executed: case QOpenGLTexture::RGBA16I:
0
309 case
never executed: case QOpenGLTexture::R32I:
QOpenGLTexture::R32I:
never executed: case QOpenGLTexture::R32I:
0
310 case
never executed: case QOpenGLTexture::RG32I:
QOpenGLTexture::RG32I:
never executed: case QOpenGLTexture::RG32I:
0
311 case
never executed: case QOpenGLTexture::RGB32I:
QOpenGLTexture::RGB32I:
never executed: case QOpenGLTexture::RGB32I:
0
312 case
never executed: case QOpenGLTexture::RGBA32I:
QOpenGLTexture::RGBA32I:
never executed: case QOpenGLTexture::RGBA32I:
0
313 case
never executed: case QOpenGLTexture::R16F:
QOpenGLTexture::R16F:
never executed: case QOpenGLTexture::R16F:
0
314 case
never executed: case QOpenGLTexture::RG16F:
QOpenGLTexture::RG16F:
never executed: case QOpenGLTexture::RG16F:
0
315 case
never executed: case QOpenGLTexture::RGB16F:
QOpenGLTexture::RGB16F:
never executed: case QOpenGLTexture::RGB16F:
0
316 case
never executed: case QOpenGLTexture::RGBA16F:
QOpenGLTexture::RGBA16F:
never executed: case QOpenGLTexture::RGBA16F:
0
317 case
never executed: case QOpenGLTexture::R32F:
QOpenGLTexture::R32F:
never executed: case QOpenGLTexture::R32F:
0
318 case
never executed: case QOpenGLTexture::RG32F:
QOpenGLTexture::RG32F:
never executed: case QOpenGLTexture::RG32F:
0
319 case
never executed: case QOpenGLTexture::RGB32F:
QOpenGLTexture::RGB32F:
never executed: case QOpenGLTexture::RGB32F:
0
320 case
never executed: case QOpenGLTexture::RGBA32F:
QOpenGLTexture::RGBA32F:
never executed: case QOpenGLTexture::RGBA32F:
0
321 case
never executed: case QOpenGLTexture::RGB9E5:
QOpenGLTexture::RGB9E5:
never executed: case QOpenGLTexture::RGB9E5:
0
322 case
never executed: case QOpenGLTexture::RG11B10F:
QOpenGLTexture::RG11B10F:
never executed: case QOpenGLTexture::RG11B10F:
0
323 case
never executed: case QOpenGLTexture::RG3B2:
QOpenGLTexture::RG3B2:
never executed: case QOpenGLTexture::RG3B2:
0
324 case
never executed: case QOpenGLTexture::R5G6B5:
QOpenGLTexture::R5G6B5:
never executed: case QOpenGLTexture::R5G6B5:
0
325 case
never executed: case QOpenGLTexture::RGB5A1:
QOpenGLTexture::RGB5A1:
never executed: case QOpenGLTexture::RGB5A1:
0
326 case
never executed: case QOpenGLTexture::RGBA4:
QOpenGLTexture::RGBA4:
never executed: case QOpenGLTexture::RGBA4:
0
327 case
never executed: case QOpenGLTexture::RGB10A2:
QOpenGLTexture::RGB10A2:
never executed: case QOpenGLTexture::RGB10A2:
0
328-
329 case
never executed: case QOpenGLTexture::D16:
QOpenGLTexture::D16:
never executed: case QOpenGLTexture::D16:
0
330 case
never executed: case QOpenGLTexture::D24:
QOpenGLTexture::D24:
never executed: case QOpenGLTexture::D24:
0
331 case
never executed: case QOpenGLTexture::D32:
QOpenGLTexture::D32:
never executed: case QOpenGLTexture::D32:
0
332 case
never executed: case QOpenGLTexture::D32F:
QOpenGLTexture::D32F:
never executed: case QOpenGLTexture::D32F:
0
333-
334 case
never executed: case QOpenGLTexture::D24S8:
QOpenGLTexture::D24S8:
never executed: case QOpenGLTexture::D24S8:
0
335 case
never executed: case QOpenGLTexture::D32FS8X24:
QOpenGLTexture::D32FS8X24:
never executed: case QOpenGLTexture::D32FS8X24:
0
336-
337 case
never executed: case QOpenGLTexture::S8:
QOpenGLTexture::S8:
never executed: case QOpenGLTexture::S8:
0
338-
339 case
never executed: case QOpenGLTexture::RGB_DXT1:
QOpenGLTexture::RGB_DXT1:
never executed: case QOpenGLTexture::RGB_DXT1:
0
340 case
never executed: case QOpenGLTexture::RGBA_DXT1:
QOpenGLTexture::RGBA_DXT1:
never executed: case QOpenGLTexture::RGBA_DXT1:
0
341 case
never executed: case QOpenGLTexture::RGBA_DXT3:
QOpenGLTexture::RGBA_DXT3:
never executed: case QOpenGLTexture::RGBA_DXT3:
0
342 case
never executed: case QOpenGLTexture::RGBA_DXT5:
QOpenGLTexture::RGBA_DXT5:
never executed: case QOpenGLTexture::RGBA_DXT5:
0
343 case
never executed: case QOpenGLTexture::R_ATI1N_UNorm:
QOpenGLTexture::R_ATI1N_UNorm:
never executed: case QOpenGLTexture::R_ATI1N_UNorm:
0
344 case
never executed: case QOpenGLTexture::R_ATI1N_SNorm:
QOpenGLTexture::R_ATI1N_SNorm:
never executed: case QOpenGLTexture::R_ATI1N_SNorm:
0
345 case
never executed: case QOpenGLTexture::RG_ATI2N_UNorm:
QOpenGLTexture::RG_ATI2N_UNorm:
never executed: case QOpenGLTexture::RG_ATI2N_UNorm:
0
346 case
never executed: case QOpenGLTexture::RG_ATI2N_SNorm:
QOpenGLTexture::RG_ATI2N_SNorm:
never executed: case QOpenGLTexture::RG_ATI2N_SNorm:
0
347 case
never executed: case QOpenGLTexture::RGB_BP_UNSIGNED_FLOAT:
QOpenGLTexture::RGB_BP_UNSIGNED_FLOAT:
never executed: case QOpenGLTexture::RGB_BP_UNSIGNED_FLOAT:
0
348 case
never executed: case QOpenGLTexture::RGB_BP_SIGNED_FLOAT:
QOpenGLTexture::RGB_BP_SIGNED_FLOAT:
never executed: case QOpenGLTexture::RGB_BP_SIGNED_FLOAT:
0
349 case
never executed: case QOpenGLTexture::RGB_BP_UNorm:
QOpenGLTexture::RGB_BP_UNorm:
never executed: case QOpenGLTexture::RGB_BP_UNorm:
0
350 case
never executed: case QOpenGLTexture::SRGB8:
QOpenGLTexture::SRGB8:
never executed: case QOpenGLTexture::SRGB8:
0
351 case
never executed: case QOpenGLTexture::SRGB8_Alpha8:
QOpenGLTexture::SRGB8_Alpha8:
never executed: case QOpenGLTexture::SRGB8_Alpha8:
0
352 case
never executed: case QOpenGLTexture::SRGB_DXT1:
QOpenGLTexture::SRGB_DXT1:
never executed: case QOpenGLTexture::SRGB_DXT1:
0
353 case
never executed: case QOpenGLTexture::SRGB_Alpha_DXT1:
QOpenGLTexture::SRGB_Alpha_DXT1:
never executed: case QOpenGLTexture::SRGB_Alpha_DXT1:
0
354 case
never executed: case QOpenGLTexture::SRGB_Alpha_DXT3:
QOpenGLTexture::SRGB_Alpha_DXT3:
never executed: case QOpenGLTexture::SRGB_Alpha_DXT3:
0
355 case
never executed: case QOpenGLTexture::SRGB_Alpha_DXT5:
QOpenGLTexture::SRGB_Alpha_DXT5:
never executed: case QOpenGLTexture::SRGB_Alpha_DXT5:
0
356 case
never executed: case QOpenGLTexture::SRGB_BP_UNorm:
QOpenGLTexture::SRGB_BP_UNorm:
never executed: case QOpenGLTexture::SRGB_BP_UNorm:
0
357 case
never executed: case QOpenGLTexture::R11_EAC_UNorm:
QOpenGLTexture::R11_EAC_UNorm:
never executed: case QOpenGLTexture::R11_EAC_UNorm:
0
358 case
never executed: case QOpenGLTexture::R11_EAC_SNorm:
QOpenGLTexture::R11_EAC_SNorm:
never executed: case QOpenGLTexture::R11_EAC_SNorm:
0
359 case
never executed: case QOpenGLTexture::RG11_EAC_UNorm:
QOpenGLTexture::RG11_EAC_UNorm:
never executed: case QOpenGLTexture::RG11_EAC_UNorm:
0
360 case
never executed: case QOpenGLTexture::RG11_EAC_SNorm:
QOpenGLTexture::RG11_EAC_SNorm:
never executed: case QOpenGLTexture::RG11_EAC_SNorm:
0
361 case
never executed: case QOpenGLTexture::RGB8_ETC2:
QOpenGLTexture::RGB8_ETC2:
never executed: case QOpenGLTexture::RGB8_ETC2:
0
362 case
never executed: case QOpenGLTexture::SRGB8_ETC2:
QOpenGLTexture::SRGB8_ETC2:
never executed: case QOpenGLTexture::SRGB8_ETC2:
0
363 case
never executed: case QOpenGLTexture::RGB8_PunchThrough_Alpha1_ETC2:
QOpenGLTexture::RGB8_PunchThrough_Alpha1_ETC2:
never executed: case QOpenGLTexture::RGB8_PunchThrough_Alpha1_ETC2:
0
364 case
never executed: case QOpenGLTexture::SRGB8_PunchThrough_Alpha1_ETC2:
QOpenGLTexture::SRGB8_PunchThrough_Alpha1_ETC2:
never executed: case QOpenGLTexture::SRGB8_PunchThrough_Alpha1_ETC2:
0
365 case
never executed: case QOpenGLTexture::RGBA8_ETC2_EAC:
QOpenGLTexture::RGBA8_ETC2_EAC:
never executed: case QOpenGLTexture::RGBA8_ETC2_EAC:
0
366 case
never executed: case QOpenGLTexture::SRGB8_Alpha8_ETC2_EAC:
QOpenGLTexture::SRGB8_Alpha8_ETC2_EAC:
never executed: case QOpenGLTexture::SRGB8_Alpha8_ETC2_EAC:
0
367 return
never executed: return true;
true;
never executed: return true;
0
368-
369 case
never executed: case QOpenGLTexture::RGB8_ETC1:
QOpenGLTexture::RGB8_ETC1:
never executed: case QOpenGLTexture::RGB8_ETC1:
0
370 return
never executed: return false;
false;
never executed: return false;
0
371-
372 case
never executed: case QOpenGLTexture::DepthFormat:
QOpenGLTexture::DepthFormat:
never executed: case QOpenGLTexture::DepthFormat:
0
373 case
never executed: case QOpenGLTexture::AlphaFormat:
QOpenGLTexture::AlphaFormat:
never executed: case QOpenGLTexture::AlphaFormat:
0
374-
375 case
never executed: case QOpenGLTexture::RGBFormat:
QOpenGLTexture::RGBFormat:
never executed: case QOpenGLTexture::RGBFormat:
0
376 case
never executed: case QOpenGLTexture::RGBAFormat:
QOpenGLTexture::RGBAFormat:
never executed: case QOpenGLTexture::RGBAFormat:
0
377-
378 case
never executed: case QOpenGLTexture::LuminanceFormat:
QOpenGLTexture::LuminanceFormat:
never executed: case QOpenGLTexture::LuminanceFormat:
0
379-
380 case
never executed: case QOpenGLTexture::LuminanceAlphaFormat:
QOpenGLTexture::LuminanceAlphaFormat:
never executed: case QOpenGLTexture::LuminanceAlphaFormat:
0
381 return
never executed: return false;
false;
never executed: return false;
0
382 }-
383-
384 do { ((!(false)) ? qt_assert_x("Q_UNREACHABLE()", "Q_UNREACHABLE was reached",__FILE__,430) : qt_noop()); __builtin_unreachable(); } while (0);-
385 return
never executed: return false;
false;
never executed: return false;
0
386}-
387-
388static bool isTextureTargetMultisample(QOpenGLTexture::Target target)-
389{-
390 switch (target) {-
391 case
never executed: case QOpenGLTexture::Target1D:
QOpenGLTexture::Target1D:
never executed: case QOpenGLTexture::Target1D:
0
392 case
never executed: case QOpenGLTexture::Target1DArray:
QOpenGLTexture::Target1DArray:
never executed: case QOpenGLTexture::Target1DArray:
0
393 case
never executed: case QOpenGLTexture::Target2D:
QOpenGLTexture::Target2D:
never executed: case QOpenGLTexture::Target2D:
0
394 case
never executed: case QOpenGLTexture::Target2DArray:
QOpenGLTexture::Target2DArray:
never executed: case QOpenGLTexture::Target2DArray:
0
395 case
never executed: case QOpenGLTexture::Target3D:
QOpenGLTexture::Target3D:
never executed: case QOpenGLTexture::Target3D:
0
396 case
never executed: case QOpenGLTexture::TargetCubeMap:
QOpenGLTexture::TargetCubeMap:
never executed: case QOpenGLTexture::TargetCubeMap:
0
397 case
never executed: case QOpenGLTexture::TargetCubeMapArray:
QOpenGLTexture::TargetCubeMapArray:
never executed: case QOpenGLTexture::TargetCubeMapArray:
0
398 return
never executed: return false;
false;
never executed: return false;
0
399-
400 case
never executed: case QOpenGLTexture::Target2DMultisample:
QOpenGLTexture::Target2DMultisample:
never executed: case QOpenGLTexture::Target2DMultisample:
0
401 case
never executed: case QOpenGLTexture::Target2DMultisampleArray:
QOpenGLTexture::Target2DMultisampleArray:
never executed: case QOpenGLTexture::Target2DMultisampleArray:
0
402 return
never executed: return true;
true;
never executed: return true;
0
403-
404 case
never executed: case QOpenGLTexture::TargetRectangle:
QOpenGLTexture::TargetRectangle:
never executed: case QOpenGLTexture::TargetRectangle:
0
405 case
never executed: case QOpenGLTexture::TargetBuffer:
QOpenGLTexture::TargetBuffer:
never executed: case QOpenGLTexture::TargetBuffer:
0
406 return
never executed: return false;
false;
never executed: return false;
0
407 }-
408-
409 do { ((!(false)) ? qt_assert_x("Q_UNREACHABLE()", "Q_UNREACHABLE was reached",__FILE__,455) : qt_noop()); __builtin_unreachable(); } while (0);-
410 return
never executed: return false;
false;
never executed: return false;
0
411}-
412-
413bool QOpenGLTexturePrivate::isUsingImmutableStorage() const-
414{-
415-
416-
417-
418 return
never executed: return isSizedTextureFormat(format) && (isTextureTargetMultisample(target) ? features.testFlag(QOpenGLTexture::ImmutableMultisampleStorage) : features.testFlag(QOpenGLTexture::ImmutableStorage));
isSizedTextureFormat(format)
never executed: return isSizedTextureFormat(format) && (isTextureTargetMultisample(target) ? features.testFlag(QOpenGLTexture::ImmutableMultisampleStorage) : features.testFlag(QOpenGLTexture::ImmutableStorage));
0
419 && (isTextureTargetMultisample(target)
never executed: return isSizedTextureFormat(format) && (isTextureTargetMultisample(target) ? features.testFlag(QOpenGLTexture::ImmutableMultisampleStorage) : features.testFlag(QOpenGLTexture::ImmutableStorage));
0
420 ? features.testFlag(QOpenGLTexture::ImmutableMultisampleStorage)
never executed: return isSizedTextureFormat(format) && (isTextureTargetMultisample(target) ? features.testFlag(QOpenGLTexture::ImmutableMultisampleStorage) : features.testFlag(QOpenGLTexture::ImmutableStorage));
0
421 : features.testFlag(QOpenGLTexture::ImmutableStorage));
never executed: return isSizedTextureFormat(format) && (isTextureTargetMultisample(target) ? features.testFlag(QOpenGLTexture::ImmutableMultisampleStorage) : features.testFlag(QOpenGLTexture::ImmutableStorage));
0
422}-
423-
424void QOpenGLTexturePrivate::allocateStorage(QOpenGLTexture::PixelFormat pixelFormat, QOpenGLTexture::PixelType pixelType)-
425{-
426-
427 mipLevels = evaluateMipLevels();-
428-
429 if (isUsingImmutableStorage()
isUsingImmutableStorage()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
430 allocateImmutableStorage();
never executed: allocateImmutableStorage();
0
431 else-
432 allocateMutableStorage(pixelFormat, pixelType);
never executed: allocateMutableStorage(pixelFormat, pixelType);
0
433}-
434-
435static QOpenGLTexture::PixelFormat pixelFormatCompatibleWithInternalFormat(QOpenGLTexture::TextureFormat internalFormat)-
436{-
437 switch (internalFormat) {-
438 case
never executed: case QOpenGLTexture::NoFormat:
QOpenGLTexture::NoFormat:
never executed: case QOpenGLTexture::NoFormat:
0
439 return
never executed: return QOpenGLTexture::NoSourceFormat;
QOpenGLTexture::NoSourceFormat;
never executed: return QOpenGLTexture::NoSourceFormat;
0
440-
441 case
never executed: case QOpenGLTexture::R8_UNorm:
QOpenGLTexture::R8_UNorm:
never executed: case QOpenGLTexture::R8_UNorm:
0
442 return
never executed: return QOpenGLTexture::Red;
QOpenGLTexture::Red;
never executed: return QOpenGLTexture::Red;
0
443-
444 case
never executed: case QOpenGLTexture::RG8_UNorm:
QOpenGLTexture::RG8_UNorm:
never executed: case QOpenGLTexture::RG8_UNorm:
0
445 return
never executed: return QOpenGLTexture::RG;
QOpenGLTexture::RG;
never executed: return QOpenGLTexture::RG;
0
446-
447 case
never executed: case QOpenGLTexture::RGB8_UNorm:
QOpenGLTexture::RGB8_UNorm:
never executed: case QOpenGLTexture::RGB8_UNorm:
0
448 return
never executed: return QOpenGLTexture::RGB;
QOpenGLTexture::RGB;
never executed: return QOpenGLTexture::RGB;
0
449-
450 case
never executed: case QOpenGLTexture::RGBA8_UNorm:
QOpenGLTexture::RGBA8_UNorm:
never executed: case QOpenGLTexture::RGBA8_UNorm:
0
451 return
never executed: return QOpenGLTexture::RGBA;
QOpenGLTexture::RGBA;
never executed: return QOpenGLTexture::RGBA;
0
452-
453 case
never executed: case QOpenGLTexture::R16_UNorm:
QOpenGLTexture::R16_UNorm:
never executed: case QOpenGLTexture::R16_UNorm:
0
454 return
never executed: return QOpenGLTexture::Red;
QOpenGLTexture::Red;
never executed: return QOpenGLTexture::Red;
0
455-
456 case
never executed: case QOpenGLTexture::RG16_UNorm:
QOpenGLTexture::RG16_UNorm:
never executed: case QOpenGLTexture::RG16_UNorm:
0
457 return
never executed: return QOpenGLTexture::RG;
QOpenGLTexture::RG;
never executed: return QOpenGLTexture::RG;
0
458-
459 case
never executed: case QOpenGLTexture::RGB16_UNorm:
QOpenGLTexture::RGB16_UNorm:
never executed: case QOpenGLTexture::RGB16_UNorm:
0
460 return
never executed: return QOpenGLTexture::RGB;
QOpenGLTexture::RGB;
never executed: return QOpenGLTexture::RGB;
0
461-
462 case
never executed: case QOpenGLTexture::RGBA16_UNorm:
QOpenGLTexture::RGBA16_UNorm:
never executed: case QOpenGLTexture::RGBA16_UNorm:
0
463 return
never executed: return QOpenGLTexture::RGBA;
QOpenGLTexture::RGBA;
never executed: return QOpenGLTexture::RGBA;
0
464-
465 case
never executed: case QOpenGLTexture::R8_SNorm:
QOpenGLTexture::R8_SNorm:
never executed: case QOpenGLTexture::R8_SNorm:
0
466 return
never executed: return QOpenGLTexture::Red;
QOpenGLTexture::Red;
never executed: return QOpenGLTexture::Red;
0
467-
468 case
never executed: case QOpenGLTexture::RG8_SNorm:
QOpenGLTexture::RG8_SNorm:
never executed: case QOpenGLTexture::RG8_SNorm:
0
469 return
never executed: return QOpenGLTexture::RG;
QOpenGLTexture::RG;
never executed: return QOpenGLTexture::RG;
0
470-
471 case
never executed: case QOpenGLTexture::RGB8_SNorm:
QOpenGLTexture::RGB8_SNorm:
never executed: case QOpenGLTexture::RGB8_SNorm:
0
472 return
never executed: return QOpenGLTexture::RGB;
QOpenGLTexture::RGB;
never executed: return QOpenGLTexture::RGB;
0
473-
474 case
never executed: case QOpenGLTexture::RGBA8_SNorm:
QOpenGLTexture::RGBA8_SNorm:
never executed: case QOpenGLTexture::RGBA8_SNorm:
0
475 return
never executed: return QOpenGLTexture::RGBA;
QOpenGLTexture::RGBA;
never executed: return QOpenGLTexture::RGBA;
0
476-
477 case
never executed: case QOpenGLTexture::R16_SNorm:
QOpenGLTexture::R16_SNorm:
never executed: case QOpenGLTexture::R16_SNorm:
0
478 return
never executed: return QOpenGLTexture::Red;
QOpenGLTexture::Red;
never executed: return QOpenGLTexture::Red;
0
479-
480 case
never executed: case QOpenGLTexture::RG16_SNorm:
QOpenGLTexture::RG16_SNorm:
never executed: case QOpenGLTexture::RG16_SNorm:
0
481 return
never executed: return QOpenGLTexture::RG;
QOpenGLTexture::RG;
never executed: return QOpenGLTexture::RG;
0
482-
483 case
never executed: case QOpenGLTexture::RGB16_SNorm:
QOpenGLTexture::RGB16_SNorm:
never executed: case QOpenGLTexture::RGB16_SNorm:
0
484 return
never executed: return QOpenGLTexture::RGB;
QOpenGLTexture::RGB;
never executed: return QOpenGLTexture::RGB;
0
485-
486 case
never executed: case QOpenGLTexture::RGBA16_SNorm:
QOpenGLTexture::RGBA16_SNorm:
never executed: case QOpenGLTexture::RGBA16_SNorm:
0
487 return
never executed: return QOpenGLTexture::RGBA;
QOpenGLTexture::RGBA;
never executed: return QOpenGLTexture::RGBA;
0
488-
489 case
never executed: case QOpenGLTexture::R8U:
QOpenGLTexture::R8U:
never executed: case QOpenGLTexture::R8U:
0
490 return
never executed: return QOpenGLTexture::Red_Integer;
QOpenGLTexture::Red_Integer;
never executed: return QOpenGLTexture::Red_Integer;
0
491-
492 case
never executed: case QOpenGLTexture::RG8U:
QOpenGLTexture::RG8U:
never executed: case QOpenGLTexture::RG8U:
0
493 return
never executed: return QOpenGLTexture::RG_Integer;
QOpenGLTexture::RG_Integer;
never executed: return QOpenGLTexture::RG_Integer;
0
494-
495 case
never executed: case QOpenGLTexture::RGB8U:
QOpenGLTexture::RGB8U:
never executed: case QOpenGLTexture::RGB8U:
0
496 return
never executed: return QOpenGLTexture::RGB_Integer;
QOpenGLTexture::RGB_Integer;
never executed: return QOpenGLTexture::RGB_Integer;
0
497-
498 case
never executed: case QOpenGLTexture::RGBA8U:
QOpenGLTexture::RGBA8U:
never executed: case QOpenGLTexture::RGBA8U:
0
499 return
never executed: return QOpenGLTexture::RGBA_Integer;
QOpenGLTexture::RGBA_Integer;
never executed: return QOpenGLTexture::RGBA_Integer;
0
500-
501 case
never executed: case QOpenGLTexture::R16U:
QOpenGLTexture::R16U:
never executed: case QOpenGLTexture::R16U:
0
502 return
never executed: return QOpenGLTexture::Red_Integer;
QOpenGLTexture::Red_Integer;
never executed: return QOpenGLTexture::Red_Integer;
0
503-
504 case
never executed: case QOpenGLTexture::RG16U:
QOpenGLTexture::RG16U:
never executed: case QOpenGLTexture::RG16U:
0
505 return
never executed: return QOpenGLTexture::RG_Integer;
QOpenGLTexture::RG_Integer;
never executed: return QOpenGLTexture::RG_Integer;
0
506-
507 case
never executed: case QOpenGLTexture::RGB16U:
QOpenGLTexture::RGB16U:
never executed: case QOpenGLTexture::RGB16U:
0
508 return
never executed: return QOpenGLTexture::RGB_Integer;
QOpenGLTexture::RGB_Integer;
never executed: return QOpenGLTexture::RGB_Integer;
0
509-
510 case
never executed: case QOpenGLTexture::RGBA16U:
QOpenGLTexture::RGBA16U:
never executed: case QOpenGLTexture::RGBA16U:
0
511 return
never executed: return QOpenGLTexture::RGBA_Integer;
QOpenGLTexture::RGBA_Integer;
never executed: return QOpenGLTexture::RGBA_Integer;
0
512-
513 case
never executed: case QOpenGLTexture::R32U:
QOpenGLTexture::R32U:
never executed: case QOpenGLTexture::R32U:
0
514 return
never executed: return QOpenGLTexture::Red_Integer;
QOpenGLTexture::Red_Integer;
never executed: return QOpenGLTexture::Red_Integer;
0
515-
516 case
never executed: case QOpenGLTexture::RG32U:
QOpenGLTexture::RG32U:
never executed: case QOpenGLTexture::RG32U:
0
517 return
never executed: return QOpenGLTexture::RG_Integer;
QOpenGLTexture::RG_Integer;
never executed: return QOpenGLTexture::RG_Integer;
0
518-
519 case
never executed: case QOpenGLTexture::RGB32U:
QOpenGLTexture::RGB32U:
never executed: case QOpenGLTexture::RGB32U:
0
520 return
never executed: return QOpenGLTexture::RGB_Integer;
QOpenGLTexture::RGB_Integer;
never executed: return QOpenGLTexture::RGB_Integer;
0
521-
522 case
never executed: case QOpenGLTexture::RGBA32U:
QOpenGLTexture::RGBA32U:
never executed: case QOpenGLTexture::RGBA32U:
0
523 return
never executed: return QOpenGLTexture::RGBA_Integer;
QOpenGLTexture::RGBA_Integer;
never executed: return QOpenGLTexture::RGBA_Integer;
0
524-
525 case
never executed: case QOpenGLTexture::R8I:
QOpenGLTexture::R8I:
never executed: case QOpenGLTexture::R8I:
0
526 return
never executed: return QOpenGLTexture::Red_Integer;
QOpenGLTexture::Red_Integer;
never executed: return QOpenGLTexture::Red_Integer;
0
527-
528 case
never executed: case QOpenGLTexture::RG8I:
QOpenGLTexture::RG8I:
never executed: case QOpenGLTexture::RG8I:
0
529 return
never executed: return QOpenGLTexture::RG_Integer;
QOpenGLTexture::RG_Integer;
never executed: return QOpenGLTexture::RG_Integer;
0
530-
531 case
never executed: case QOpenGLTexture::RGB8I:
QOpenGLTexture::RGB8I:
never executed: case QOpenGLTexture::RGB8I:
0
532 return
never executed: return QOpenGLTexture::RGB_Integer;
QOpenGLTexture::RGB_Integer;
never executed: return QOpenGLTexture::RGB_Integer;
0
533-
534 case
never executed: case QOpenGLTexture::RGBA8I:
QOpenGLTexture::RGBA8I:
never executed: case QOpenGLTexture::RGBA8I:
0
535 return
never executed: return QOpenGLTexture::RGBA_Integer;
QOpenGLTexture::RGBA_Integer;
never executed: return QOpenGLTexture::RGBA_Integer;
0
536-
537 case
never executed: case QOpenGLTexture::R16I:
QOpenGLTexture::R16I:
never executed: case QOpenGLTexture::R16I:
0
538 return
never executed: return QOpenGLTexture::Red_Integer;
QOpenGLTexture::Red_Integer;
never executed: return QOpenGLTexture::Red_Integer;
0
539-
540 case
never executed: case QOpenGLTexture::RG16I:
QOpenGLTexture::RG16I:
never executed: case QOpenGLTexture::RG16I:
0
541 return
never executed: return QOpenGLTexture::RG_Integer;
QOpenGLTexture::RG_Integer;
never executed: return QOpenGLTexture::RG_Integer;
0
542-
543 case
never executed: case QOpenGLTexture::RGB16I:
QOpenGLTexture::RGB16I:
never executed: case QOpenGLTexture::RGB16I:
0
544 return
never executed: return QOpenGLTexture::RGB_Integer;
QOpenGLTexture::RGB_Integer;
never executed: return QOpenGLTexture::RGB_Integer;
0
545-
546 case
never executed: case QOpenGLTexture::RGBA16I:
QOpenGLTexture::RGBA16I:
never executed: case QOpenGLTexture::RGBA16I:
0
547 return
never executed: return QOpenGLTexture::RGBA_Integer;
QOpenGLTexture::RGBA_Integer;
never executed: return QOpenGLTexture::RGBA_Integer;
0
548-
549 case
never executed: case QOpenGLTexture::R32I:
QOpenGLTexture::R32I:
never executed: case QOpenGLTexture::R32I:
0
550 return
never executed: return QOpenGLTexture::Red_Integer;
QOpenGLTexture::Red_Integer;
never executed: return QOpenGLTexture::Red_Integer;
0
551-
552 case
never executed: case QOpenGLTexture::RG32I:
QOpenGLTexture::RG32I:
never executed: case QOpenGLTexture::RG32I:
0
553 return
never executed: return QOpenGLTexture::RG_Integer;
QOpenGLTexture::RG_Integer;
never executed: return QOpenGLTexture::RG_Integer;
0
554-
555 case
never executed: case QOpenGLTexture::RGB32I:
QOpenGLTexture::RGB32I:
never executed: case QOpenGLTexture::RGB32I:
0
556 return
never executed: return QOpenGLTexture::RGB_Integer;
QOpenGLTexture::RGB_Integer;
never executed: return QOpenGLTexture::RGB_Integer;
0
557-
558 case
never executed: case QOpenGLTexture::RGBA32I:
QOpenGLTexture::RGBA32I:
never executed: case QOpenGLTexture::RGBA32I:
0
559 return
never executed: return QOpenGLTexture::RGBA_Integer;
QOpenGLTexture::RGBA_Integer;
never executed: return QOpenGLTexture::RGBA_Integer;
0
560-
561 case
never executed: case QOpenGLTexture::R16F:
QOpenGLTexture::R16F:
never executed: case QOpenGLTexture::R16F:
0
562 return
never executed: return QOpenGLTexture::Red;
QOpenGLTexture::Red;
never executed: return QOpenGLTexture::Red;
0
563-
564 case
never executed: case QOpenGLTexture::RG16F:
QOpenGLTexture::RG16F:
never executed: case QOpenGLTexture::RG16F:
0
565 return
never executed: return QOpenGLTexture::RG;
QOpenGLTexture::RG;
never executed: return QOpenGLTexture::RG;
0
566-
567 case
never executed: case QOpenGLTexture::RGB16F:
QOpenGLTexture::RGB16F:
never executed: case QOpenGLTexture::RGB16F:
0
568 return
never executed: return QOpenGLTexture::RGB;
QOpenGLTexture::RGB;
never executed: return QOpenGLTexture::RGB;
0
569-
570 case
never executed: case QOpenGLTexture::RGBA16F:
QOpenGLTexture::RGBA16F:
never executed: case QOpenGLTexture::RGBA16F:
0
571 return
never executed: return QOpenGLTexture::RGBA;
QOpenGLTexture::RGBA;
never executed: return QOpenGLTexture::RGBA;
0
572-
573 case
never executed: case QOpenGLTexture::R32F:
QOpenGLTexture::R32F:
never executed: case QOpenGLTexture::R32F:
0
574 return
never executed: return QOpenGLTexture::Red;
QOpenGLTexture::Red;
never executed: return QOpenGLTexture::Red;
0
575-
576 case
never executed: case QOpenGLTexture::RG32F:
QOpenGLTexture::RG32F:
never executed: case QOpenGLTexture::RG32F:
0
577 return
never executed: return QOpenGLTexture::RG;
QOpenGLTexture::RG;
never executed: return QOpenGLTexture::RG;
0
578-
579 case
never executed: case QOpenGLTexture::RGB32F:
QOpenGLTexture::RGB32F:
never executed: case QOpenGLTexture::RGB32F:
0
580 return
never executed: return QOpenGLTexture::RGB;
QOpenGLTexture::RGB;
never executed: return QOpenGLTexture::RGB;
0
581-
582 case
never executed: case QOpenGLTexture::RGBA32F:
QOpenGLTexture::RGBA32F:
never executed: case QOpenGLTexture::RGBA32F:
0
583 return
never executed: return QOpenGLTexture::RGBA;
QOpenGLTexture::RGBA;
never executed: return QOpenGLTexture::RGBA;
0
584-
585 case
never executed: case QOpenGLTexture::RGB9E5:
QOpenGLTexture::RGB9E5:
never executed: case QOpenGLTexture::RGB9E5:
0
586 return
never executed: return QOpenGLTexture::RGB;
QOpenGLTexture::RGB;
never executed: return QOpenGLTexture::RGB;
0
587-
588 case
never executed: case QOpenGLTexture::RG11B10F:
QOpenGLTexture::RG11B10F:
never executed: case QOpenGLTexture::RG11B10F:
0
589 return
never executed: return QOpenGLTexture::RGB;
QOpenGLTexture::RGB;
never executed: return QOpenGLTexture::RGB;
0
590-
591 case
never executed: case QOpenGLTexture::RG3B2:
QOpenGLTexture::RG3B2:
never executed: case QOpenGLTexture::RG3B2:
0
592 return
never executed: return QOpenGLTexture::RGB;
QOpenGLTexture::RGB;
never executed: return QOpenGLTexture::RGB;
0
593-
594 case
never executed: case QOpenGLTexture::R5G6B5:
QOpenGLTexture::R5G6B5:
never executed: case QOpenGLTexture::R5G6B5:
0
595 return
never executed: return QOpenGLTexture::RGB;
QOpenGLTexture::RGB;
never executed: return QOpenGLTexture::RGB;
0
596-
597 case
never executed: case QOpenGLTexture::RGB5A1:
QOpenGLTexture::RGB5A1:
never executed: case QOpenGLTexture::RGB5A1:
0
598 return
never executed: return QOpenGLTexture::RGBA;
QOpenGLTexture::RGBA;
never executed: return QOpenGLTexture::RGBA;
0
599-
600 case
never executed: case QOpenGLTexture::RGBA4:
QOpenGLTexture::RGBA4:
never executed: case QOpenGLTexture::RGBA4:
0
601 return
never executed: return QOpenGLTexture::RGBA;
QOpenGLTexture::RGBA;
never executed: return QOpenGLTexture::RGBA;
0
602-
603 case
never executed: case QOpenGLTexture::RGB10A2:
QOpenGLTexture::RGB10A2:
never executed: case QOpenGLTexture::RGB10A2:
0
604 return
never executed: return QOpenGLTexture::RGBA;
QOpenGLTexture::RGBA;
never executed: return QOpenGLTexture::RGBA;
0
605-
606 case
never executed: case QOpenGLTexture::D16:
QOpenGLTexture::D16:
never executed: case QOpenGLTexture::D16:
0
607 case
never executed: case QOpenGLTexture::D24:
QOpenGLTexture::D24:
never executed: case QOpenGLTexture::D24:
0
608 case
never executed: case QOpenGLTexture::D32:
QOpenGLTexture::D32:
never executed: case QOpenGLTexture::D32:
0
609 case
never executed: case QOpenGLTexture::D32F:
QOpenGLTexture::D32F:
never executed: case QOpenGLTexture::D32F:
0
610 return
never executed: return QOpenGLTexture::Depth;
QOpenGLTexture::Depth;
never executed: return QOpenGLTexture::Depth;
0
611-
612 case
never executed: case QOpenGLTexture::D24S8:
QOpenGLTexture::D24S8:
never executed: case QOpenGLTexture::D24S8:
0
613 case
never executed: case QOpenGLTexture::D32FS8X24:
QOpenGLTexture::D32FS8X24:
never executed: case QOpenGLTexture::D32FS8X24:
0
614 return
never executed: return QOpenGLTexture::DepthStencil;
QOpenGLTexture::DepthStencil;
never executed: return QOpenGLTexture::DepthStencil;
0
615-
616 case
never executed: case QOpenGLTexture::S8:
QOpenGLTexture::S8:
never executed: case QOpenGLTexture::S8:
0
617 return
never executed: return QOpenGLTexture::Stencil;
QOpenGLTexture::Stencil;
never executed: return QOpenGLTexture::Stencil;
0
618-
619 case
never executed: case QOpenGLTexture::RGB_DXT1:
QOpenGLTexture::RGB_DXT1:
never executed: case QOpenGLTexture::RGB_DXT1:
0
620 case
never executed: case QOpenGLTexture::RGBA_DXT1:
QOpenGLTexture::RGBA_DXT1:
never executed: case QOpenGLTexture::RGBA_DXT1:
0
621 case
never executed: case QOpenGLTexture::RGBA_DXT3:
QOpenGLTexture::RGBA_DXT3:
never executed: case QOpenGLTexture::RGBA_DXT3:
0
622 case
never executed: case QOpenGLTexture::RGBA_DXT5:
QOpenGLTexture::RGBA_DXT5:
never executed: case QOpenGLTexture::RGBA_DXT5:
0
623 case
never executed: case QOpenGLTexture::R_ATI1N_UNorm:
QOpenGLTexture::R_ATI1N_UNorm:
never executed: case QOpenGLTexture::R_ATI1N_UNorm:
0
624 case
never executed: case QOpenGLTexture::R_ATI1N_SNorm:
QOpenGLTexture::R_ATI1N_SNorm:
never executed: case QOpenGLTexture::R_ATI1N_SNorm:
0
625 case
never executed: case QOpenGLTexture::RG_ATI2N_UNorm:
QOpenGLTexture::RG_ATI2N_UNorm:
never executed: case QOpenGLTexture::RG_ATI2N_UNorm:
0
626 case
never executed: case QOpenGLTexture::RG_ATI2N_SNorm:
QOpenGLTexture::RG_ATI2N_SNorm:
never executed: case QOpenGLTexture::RG_ATI2N_SNorm:
0
627 case
never executed: case QOpenGLTexture::RGB_BP_UNSIGNED_FLOAT:
QOpenGLTexture::RGB_BP_UNSIGNED_FLOAT:
never executed: case QOpenGLTexture::RGB_BP_UNSIGNED_FLOAT:
0
628 case
never executed: case QOpenGLTexture::RGB_BP_SIGNED_FLOAT:
QOpenGLTexture::RGB_BP_SIGNED_FLOAT:
never executed: case QOpenGLTexture::RGB_BP_SIGNED_FLOAT:
0
629 case
never executed: case QOpenGLTexture::RGB_BP_UNorm:
QOpenGLTexture::RGB_BP_UNorm:
never executed: case QOpenGLTexture::RGB_BP_UNorm:
0
630 case
never executed: case QOpenGLTexture::SRGB8:
QOpenGLTexture::SRGB8:
never executed: case QOpenGLTexture::SRGB8:
0
631 case
never executed: case QOpenGLTexture::SRGB8_Alpha8:
QOpenGLTexture::SRGB8_Alpha8:
never executed: case QOpenGLTexture::SRGB8_Alpha8:
0
632 case
never executed: case QOpenGLTexture::SRGB_DXT1:
QOpenGLTexture::SRGB_DXT1:
never executed: case QOpenGLTexture::SRGB_DXT1:
0
633 case
never executed: case QOpenGLTexture::SRGB_Alpha_DXT1:
QOpenGLTexture::SRGB_Alpha_DXT1:
never executed: case QOpenGLTexture::SRGB_Alpha_DXT1:
0
634 case
never executed: case QOpenGLTexture::SRGB_Alpha_DXT3:
QOpenGLTexture::SRGB_Alpha_DXT3:
never executed: case QOpenGLTexture::SRGB_Alpha_DXT3:
0
635 case
never executed: case QOpenGLTexture::SRGB_Alpha_DXT5:
QOpenGLTexture::SRGB_Alpha_DXT5:
never executed: case QOpenGLTexture::SRGB_Alpha_DXT5:
0
636 case
never executed: case QOpenGLTexture::SRGB_BP_UNorm:
QOpenGLTexture::SRGB_BP_UNorm:
never executed: case QOpenGLTexture::SRGB_BP_UNorm:
0
637 case
never executed: case QOpenGLTexture::RGB8_ETC1:
QOpenGLTexture::RGB8_ETC1:
never executed: case QOpenGLTexture::RGB8_ETC1:
0
638 return
never executed: return QOpenGLTexture::RGBA;
QOpenGLTexture::RGBA;
never executed: return QOpenGLTexture::RGBA;
0
639-
640 case
never executed: case QOpenGLTexture::R11_EAC_UNorm:
QOpenGLTexture::R11_EAC_UNorm:
never executed: case QOpenGLTexture::R11_EAC_UNorm:
0
641 case
never executed: case QOpenGLTexture::R11_EAC_SNorm:
QOpenGLTexture::R11_EAC_SNorm:
never executed: case QOpenGLTexture::R11_EAC_SNorm:
0
642 return
never executed: return QOpenGLTexture::Red;
QOpenGLTexture::Red;
never executed: return QOpenGLTexture::Red;
0
643-
644 case
never executed: case QOpenGLTexture::RG11_EAC_UNorm:
QOpenGLTexture::RG11_EAC_UNorm:
never executed: case QOpenGLTexture::RG11_EAC_UNorm:
0
645 case
never executed: case QOpenGLTexture::RG11_EAC_SNorm:
QOpenGLTexture::RG11_EAC_SNorm:
never executed: case QOpenGLTexture::RG11_EAC_SNorm:
0
646 return
never executed: return QOpenGLTexture::RG;
QOpenGLTexture::RG;
never executed: return QOpenGLTexture::RG;
0
647-
648 case
never executed: case QOpenGLTexture::RGB8_ETC2:
QOpenGLTexture::RGB8_ETC2:
never executed: case QOpenGLTexture::RGB8_ETC2:
0
649 case
never executed: case QOpenGLTexture::SRGB8_ETC2:
QOpenGLTexture::SRGB8_ETC2:
never executed: case QOpenGLTexture::SRGB8_ETC2:
0
650 return
never executed: return QOpenGLTexture::RGB;
QOpenGLTexture::RGB;
never executed: return QOpenGLTexture::RGB;
0
651-
652 case
never executed: case QOpenGLTexture::RGB8_PunchThrough_Alpha1_ETC2:
QOpenGLTexture::RGB8_PunchThrough_Alpha1_ETC2:
never executed: case QOpenGLTexture::RGB8_PunchThrough_Alpha1_ETC2:
0
653 case
never executed: case QOpenGLTexture::SRGB8_PunchThrough_Alpha1_ETC2:
QOpenGLTexture::SRGB8_PunchThrough_Alpha1_ETC2:
never executed: case QOpenGLTexture::SRGB8_PunchThrough_Alpha1_ETC2:
0
654 return
never executed: return QOpenGLTexture::RGBA;
QOpenGLTexture::RGBA;
never executed: return QOpenGLTexture::RGBA;
0
655-
656 case
never executed: case QOpenGLTexture::RGBA8_ETC2_EAC:
QOpenGLTexture::RGBA8_ETC2_EAC:
never executed: case QOpenGLTexture::RGBA8_ETC2_EAC:
0
657 case
never executed: case QOpenGLTexture::SRGB8_Alpha8_ETC2_EAC:
QOpenGLTexture::SRGB8_Alpha8_ETC2_EAC:
never executed: case QOpenGLTexture::SRGB8_Alpha8_ETC2_EAC:
0
658 return
never executed: return QOpenGLTexture::RGBA;
QOpenGLTexture::RGBA;
never executed: return QOpenGLTexture::RGBA;
0
659-
660 case
never executed: case QOpenGLTexture::DepthFormat:
QOpenGLTexture::DepthFormat:
never executed: case QOpenGLTexture::DepthFormat:
0
661 return
never executed: return QOpenGLTexture::Depth;
QOpenGLTexture::Depth;
never executed: return QOpenGLTexture::Depth;
0
662-
663 case
never executed: case QOpenGLTexture::AlphaFormat:
QOpenGLTexture::AlphaFormat:
never executed: case QOpenGLTexture::AlphaFormat:
0
664 return
never executed: return QOpenGLTexture::Alpha;
QOpenGLTexture::Alpha;
never executed: return QOpenGLTexture::Alpha;
0
665-
666 case
never executed: case QOpenGLTexture::RGBFormat:
QOpenGLTexture::RGBFormat:
never executed: case QOpenGLTexture::RGBFormat:
0
667 case
never executed: case QOpenGLTexture::RGBAFormat:
QOpenGLTexture::RGBAFormat:
never executed: case QOpenGLTexture::RGBAFormat:
0
668 return
never executed: return QOpenGLTexture::RGBA;
QOpenGLTexture::RGBA;
never executed: return QOpenGLTexture::RGBA;
0
669-
670 case
never executed: case QOpenGLTexture::LuminanceFormat:
QOpenGLTexture::LuminanceFormat:
never executed: case QOpenGLTexture::LuminanceFormat:
0
671 return
never executed: return QOpenGLTexture::Luminance;
QOpenGLTexture::Luminance;
never executed: return QOpenGLTexture::Luminance;
0
672-
673 case
never executed: case QOpenGLTexture::LuminanceAlphaFormat:
QOpenGLTexture::LuminanceAlphaFormat:
never executed: case QOpenGLTexture::LuminanceAlphaFormat:
0
674 return
never executed: return QOpenGLTexture::LuminanceAlpha;
QOpenGLTexture::LuminanceAlpha;
never executed: return QOpenGLTexture::LuminanceAlpha;
0
675 }-
676-
677 do { ((!(false)) ? qt_assert_x("Q_UNREACHABLE()", "Q_UNREACHABLE was reached",__FILE__,723) : qt_noop()); __builtin_unreachable(); } while (0);-
678 return
never executed: return QOpenGLTexture::NoSourceFormat;
QOpenGLTexture::NoSourceFormat;
never executed: return QOpenGLTexture::NoSourceFormat;
0
679}-
680-
681static QOpenGLTexture::PixelType pixelTypeCompatibleWithInternalFormat(QOpenGLTexture::TextureFormat internalFormat)-
682{-
683 switch (internalFormat) {-
684 case
never executed: case QOpenGLTexture::NoFormat:
QOpenGLTexture::NoFormat:
never executed: case QOpenGLTexture::NoFormat:
0
685 return
never executed: return QOpenGLTexture::NoPixelType;
QOpenGLTexture::NoPixelType;
never executed: return QOpenGLTexture::NoPixelType;
0
686-
687 case
never executed: case QOpenGLTexture::R8_UNorm:
QOpenGLTexture::R8_UNorm:
never executed: case QOpenGLTexture::R8_UNorm:
0
688 case
never executed: case QOpenGLTexture::RG8_UNorm:
QOpenGLTexture::RG8_UNorm:
never executed: case QOpenGLTexture::RG8_UNorm:
0
689 case
never executed: case QOpenGLTexture::RGB8_UNorm:
QOpenGLTexture::RGB8_UNorm:
never executed: case QOpenGLTexture::RGB8_UNorm:
0
690 case
never executed: case QOpenGLTexture::RGBA8_UNorm:
QOpenGLTexture::RGBA8_UNorm:
never executed: case QOpenGLTexture::RGBA8_UNorm:
0
691 case
never executed: case QOpenGLTexture::R16_UNorm:
QOpenGLTexture::R16_UNorm:
never executed: case QOpenGLTexture::R16_UNorm:
0
692 case
never executed: case QOpenGLTexture::RG16_UNorm:
QOpenGLTexture::RG16_UNorm:
never executed: case QOpenGLTexture::RG16_UNorm:
0
693 case
never executed: case QOpenGLTexture::RGB16_UNorm:
QOpenGLTexture::RGB16_UNorm:
never executed: case QOpenGLTexture::RGB16_UNorm:
0
694 case
never executed: case QOpenGLTexture::RGBA16_UNorm:
QOpenGLTexture::RGBA16_UNorm:
never executed: case QOpenGLTexture::RGBA16_UNorm:
0
695 return
never executed: return QOpenGLTexture::UInt8;
QOpenGLTexture::UInt8;
never executed: return QOpenGLTexture::UInt8;
0
696-
697 case
never executed: case QOpenGLTexture::R8_SNorm:
QOpenGLTexture::R8_SNorm:
never executed: case QOpenGLTexture::R8_SNorm:
0
698 case
never executed: case QOpenGLTexture::RG8_SNorm:
QOpenGLTexture::RG8_SNorm:
never executed: case QOpenGLTexture::RG8_SNorm:
0
699 case
never executed: case QOpenGLTexture::RGB8_SNorm:
QOpenGLTexture::RGB8_SNorm:
never executed: case QOpenGLTexture::RGB8_SNorm:
0
700 case
never executed: case QOpenGLTexture::RGBA8_SNorm:
QOpenGLTexture::RGBA8_SNorm:
never executed: case QOpenGLTexture::RGBA8_SNorm:
0
701 case
never executed: case QOpenGLTexture::R16_SNorm:
QOpenGLTexture::R16_SNorm:
never executed: case QOpenGLTexture::R16_SNorm:
0
702 case
never executed: case QOpenGLTexture::RG16_SNorm:
QOpenGLTexture::RG16_SNorm:
never executed: case QOpenGLTexture::RG16_SNorm:
0
703 case
never executed: case QOpenGLTexture::RGB16_SNorm:
QOpenGLTexture::RGB16_SNorm:
never executed: case QOpenGLTexture::RGB16_SNorm:
0
704 case
never executed: case QOpenGLTexture::RGBA16_SNorm:
QOpenGLTexture::RGBA16_SNorm:
never executed: case QOpenGLTexture::RGBA16_SNorm:
0
705 return
never executed: return QOpenGLTexture::Int8;
QOpenGLTexture::Int8;
never executed: return QOpenGLTexture::Int8;
0
706-
707 case
never executed: case QOpenGLTexture::R8U:
QOpenGLTexture::R8U:
never executed: case QOpenGLTexture::R8U:
0
708 case
never executed: case QOpenGLTexture::RG8U:
QOpenGLTexture::RG8U:
never executed: case QOpenGLTexture::RG8U:
0
709 case
never executed: case QOpenGLTexture::RGB8U:
QOpenGLTexture::RGB8U:
never executed: case QOpenGLTexture::RGB8U:
0
710 case
never executed: case QOpenGLTexture::RGBA8U:
QOpenGLTexture::RGBA8U:
never executed: case QOpenGLTexture::RGBA8U:
0
711 case
never executed: case QOpenGLTexture::R16U:
QOpenGLTexture::R16U:
never executed: case QOpenGLTexture::R16U:
0
712 case
never executed: case QOpenGLTexture::RG16U:
QOpenGLTexture::RG16U:
never executed: case QOpenGLTexture::RG16U:
0
713 case
never executed: case QOpenGLTexture::RGB16U:
QOpenGLTexture::RGB16U:
never executed: case QOpenGLTexture::RGB16U:
0
714 case
never executed: case QOpenGLTexture::RGBA16U:
QOpenGLTexture::RGBA16U:
never executed: case QOpenGLTexture::RGBA16U:
0
715 case
never executed: case QOpenGLTexture::R32U:
QOpenGLTexture::R32U:
never executed: case QOpenGLTexture::R32U:
0
716 case
never executed: case QOpenGLTexture::RG32U:
QOpenGLTexture::RG32U:
never executed: case QOpenGLTexture::RG32U:
0
717 case
never executed: case QOpenGLTexture::RGB32U:
QOpenGLTexture::RGB32U:
never executed: case QOpenGLTexture::RGB32U:
0
718 case
never executed: case QOpenGLTexture::RGBA32U:
QOpenGLTexture::RGBA32U:
never executed: case QOpenGLTexture::RGBA32U:
0
719 return
never executed: return QOpenGLTexture::UInt8;
QOpenGLTexture::UInt8;
never executed: return QOpenGLTexture::UInt8;
0
720-
721 case
never executed: case QOpenGLTexture::R8I:
QOpenGLTexture::R8I:
never executed: case QOpenGLTexture::R8I:
0
722 case
never executed: case QOpenGLTexture::RG8I:
QOpenGLTexture::RG8I:
never executed: case QOpenGLTexture::RG8I:
0
723 case
never executed: case QOpenGLTexture::RGB8I:
QOpenGLTexture::RGB8I:
never executed: case QOpenGLTexture::RGB8I:
0
724 case
never executed: case QOpenGLTexture::RGBA8I:
QOpenGLTexture::RGBA8I:
never executed: case QOpenGLTexture::RGBA8I:
0
725 case
never executed: case QOpenGLTexture::R16I:
QOpenGLTexture::R16I:
never executed: case QOpenGLTexture::R16I:
0
726 case
never executed: case QOpenGLTexture::RG16I:
QOpenGLTexture::RG16I:
never executed: case QOpenGLTexture::RG16I:
0
727 case
never executed: case QOpenGLTexture::RGB16I:
QOpenGLTexture::RGB16I:
never executed: case QOpenGLTexture::RGB16I:
0
728 case
never executed: case QOpenGLTexture::RGBA16I:
QOpenGLTexture::RGBA16I:
never executed: case QOpenGLTexture::RGBA16I:
0
729 case
never executed: case QOpenGLTexture::R32I:
QOpenGLTexture::R32I:
never executed: case QOpenGLTexture::R32I:
0
730 case
never executed: case QOpenGLTexture::RG32I:
QOpenGLTexture::RG32I:
never executed: case QOpenGLTexture::RG32I:
0
731 case
never executed: case QOpenGLTexture::RGB32I:
QOpenGLTexture::RGB32I:
never executed: case QOpenGLTexture::RGB32I:
0
732 case
never executed: case QOpenGLTexture::RGBA32I:
QOpenGLTexture::RGBA32I:
never executed: case QOpenGLTexture::RGBA32I:
0
733 return
never executed: return QOpenGLTexture::Int8;
QOpenGLTexture::Int8;
never executed: return QOpenGLTexture::Int8;
0
734-
735 case
never executed: case QOpenGLTexture::R16F:
QOpenGLTexture::R16F:
never executed: case QOpenGLTexture::R16F:
0
736 case
never executed: case QOpenGLTexture::RG16F:
QOpenGLTexture::RG16F:
never executed: case QOpenGLTexture::RG16F:
0
737 case
never executed: case QOpenGLTexture::RGB16F:
QOpenGLTexture::RGB16F:
never executed: case QOpenGLTexture::RGB16F:
0
738 case
never executed: case QOpenGLTexture::RGBA16F:
QOpenGLTexture::RGBA16F:
never executed: case QOpenGLTexture::RGBA16F:
0
739 return
never executed: return QOpenGLTexture::Float16;
QOpenGLTexture::Float16;
never executed: return QOpenGLTexture::Float16;
0
740-
741 case
never executed: case QOpenGLTexture::R32F:
QOpenGLTexture::R32F:
never executed: case QOpenGLTexture::R32F:
0
742 case
never executed: case QOpenGLTexture::RG32F:
QOpenGLTexture::RG32F:
never executed: case QOpenGLTexture::RG32F:
0
743 case
never executed: case QOpenGLTexture::RGB32F:
QOpenGLTexture::RGB32F:
never executed: case QOpenGLTexture::RGB32F:
0
744 case
never executed: case QOpenGLTexture::RGBA32F:
QOpenGLTexture::RGBA32F:
never executed: case QOpenGLTexture::RGBA32F:
0
745 return
never executed: return QOpenGLTexture::Float32;
QOpenGLTexture::Float32;
never executed: return QOpenGLTexture::Float32;
0
746-
747 case
never executed: case QOpenGLTexture::RGB9E5:
QOpenGLTexture::RGB9E5:
never executed: case QOpenGLTexture::RGB9E5:
0
748 return
never executed: return QOpenGLTexture::UInt16_RGB5A1_Rev;
QOpenGLTexture::UInt16_RGB5A1_Rev;
never executed: return QOpenGLTexture::UInt16_RGB5A1_Rev;
0
749-
750 case
never executed: case QOpenGLTexture::RG11B10F:
QOpenGLTexture::RG11B10F:
never executed: case QOpenGLTexture::RG11B10F:
0
751 return
never executed: return QOpenGLTexture::UInt32_RG11B10F;
QOpenGLTexture::UInt32_RG11B10F;
never executed: return QOpenGLTexture::UInt32_RG11B10F;
0
752-
753 case
never executed: case QOpenGLTexture::RG3B2:
QOpenGLTexture::RG3B2:
never executed: case QOpenGLTexture::RG3B2:
0
754 return
never executed: return QOpenGLTexture::UInt8_RG3B2;
QOpenGLTexture::UInt8_RG3B2;
never executed: return QOpenGLTexture::UInt8_RG3B2;
0
755-
756 case
never executed: case QOpenGLTexture::R5G6B5:
QOpenGLTexture::R5G6B5:
never executed: case QOpenGLTexture::R5G6B5:
0
757 return
never executed: return QOpenGLTexture::UInt16_R5G6B5;
QOpenGLTexture::UInt16_R5G6B5;
never executed: return QOpenGLTexture::UInt16_R5G6B5;
0
758-
759 case
never executed: case QOpenGLTexture::RGB5A1:
QOpenGLTexture::RGB5A1:
never executed: case QOpenGLTexture::RGB5A1:
0
760 return
never executed: return QOpenGLTexture::UInt16_RGB5A1;
QOpenGLTexture::UInt16_RGB5A1;
never executed: return QOpenGLTexture::UInt16_RGB5A1;
0
761-
762 case
never executed: case QOpenGLTexture::RGBA4:
QOpenGLTexture::RGBA4:
never executed: case QOpenGLTexture::RGBA4:
0
763 return
never executed: return QOpenGLTexture::UInt16_RGBA4;
QOpenGLTexture::UInt16_RGBA4;
never executed: return QOpenGLTexture::UInt16_RGBA4;
0
764-
765 case
never executed: case QOpenGLTexture::RGB10A2:
QOpenGLTexture::RGB10A2:
never executed: case QOpenGLTexture::RGB10A2:
0
766 return
never executed: return QOpenGLTexture::UInt32_RGB10A2;
QOpenGLTexture::UInt32_RGB10A2;
never executed: return QOpenGLTexture::UInt32_RGB10A2;
0
767-
768 case
never executed: case QOpenGLTexture::D16:
QOpenGLTexture::D16:
never executed: case QOpenGLTexture::D16:
0
769 return
never executed: return QOpenGLTexture::UInt16;
QOpenGLTexture::UInt16;
never executed: return QOpenGLTexture::UInt16;
0
770-
771 case
never executed: case QOpenGLTexture::D24:
QOpenGLTexture::D24:
never executed: case QOpenGLTexture::D24:
0
772 case
never executed: case QOpenGLTexture::D32:
QOpenGLTexture::D32:
never executed: case QOpenGLTexture::D32:
0
773 return
never executed: return QOpenGLTexture::UInt32;
QOpenGLTexture::UInt32;
never executed: return QOpenGLTexture::UInt32;
0
774-
775 case
never executed: case QOpenGLTexture::D32F:
QOpenGLTexture::D32F:
never executed: case QOpenGLTexture::D32F:
0
776 return
never executed: return QOpenGLTexture::Float32;
QOpenGLTexture::Float32;
never executed: return QOpenGLTexture::Float32;
0
777-
778 case
never executed: case QOpenGLTexture::D24S8:
QOpenGLTexture::D24S8:
never executed: case QOpenGLTexture::D24S8:
0
779 return
never executed: return QOpenGLTexture::UInt32_D24S8;
QOpenGLTexture::UInt32_D24S8;
never executed: return QOpenGLTexture::UInt32_D24S8;
0
780-
781 case
never executed: case QOpenGLTexture::D32FS8X24:
QOpenGLTexture::D32FS8X24:
never executed: case QOpenGLTexture::D32FS8X24:
0
782 return
never executed: return QOpenGLTexture::Float32_D32_UInt32_S8_X24;
QOpenGLTexture::Float32_D32_UInt32_S8_X24;
never executed: return QOpenGLTexture::Float32_D32_UInt32_S8_X24;
0
783-
784 case
never executed: case QOpenGLTexture::S8:
QOpenGLTexture::S8:
never executed: case QOpenGLTexture::S8:
0
785 return
never executed: return QOpenGLTexture::UInt8;
QOpenGLTexture::UInt8;
never executed: return QOpenGLTexture::UInt8;
0
786-
787 case
never executed: case QOpenGLTexture::RGB_DXT1:
QOpenGLTexture::RGB_DXT1:
never executed: case QOpenGLTexture::RGB_DXT1:
0
788 case
never executed: case QOpenGLTexture::RGBA_DXT1:
QOpenGLTexture::RGBA_DXT1:
never executed: case QOpenGLTexture::RGBA_DXT1:
0
789 case
never executed: case QOpenGLTexture::RGBA_DXT3:
QOpenGLTexture::RGBA_DXT3:
never executed: case QOpenGLTexture::RGBA_DXT3:
0
790 case
never executed: case QOpenGLTexture::RGBA_DXT5:
QOpenGLTexture::RGBA_DXT5:
never executed: case QOpenGLTexture::RGBA_DXT5:
0
791 case
never executed: case QOpenGLTexture::R_ATI1N_UNorm:
QOpenGLTexture::R_ATI1N_UNorm:
never executed: case QOpenGLTexture::R_ATI1N_UNorm:
0
792 case
never executed: case QOpenGLTexture::R_ATI1N_SNorm:
QOpenGLTexture::R_ATI1N_SNorm:
never executed: case QOpenGLTexture::R_ATI1N_SNorm:
0
793 case
never executed: case QOpenGLTexture::RG_ATI2N_UNorm:
QOpenGLTexture::RG_ATI2N_UNorm:
never executed: case QOpenGLTexture::RG_ATI2N_UNorm:
0
794 case
never executed: case QOpenGLTexture::RG_ATI2N_SNorm:
QOpenGLTexture::RG_ATI2N_SNorm:
never executed: case QOpenGLTexture::RG_ATI2N_SNorm:
0
795 case
never executed: case QOpenGLTexture::RGB_BP_UNSIGNED_FLOAT:
QOpenGLTexture::RGB_BP_UNSIGNED_FLOAT:
never executed: case QOpenGLTexture::RGB_BP_UNSIGNED_FLOAT:
0
796 case
never executed: case QOpenGLTexture::RGB_BP_SIGNED_FLOAT:
QOpenGLTexture::RGB_BP_SIGNED_FLOAT:
never executed: case QOpenGLTexture::RGB_BP_SIGNED_FLOAT:
0
797 case
never executed: case QOpenGLTexture::RGB_BP_UNorm:
QOpenGLTexture::RGB_BP_UNorm:
never executed: case QOpenGLTexture::RGB_BP_UNorm:
0
798 case
never executed: case QOpenGLTexture::SRGB8:
QOpenGLTexture::SRGB8:
never executed: case QOpenGLTexture::SRGB8:
0
799 case
never executed: case QOpenGLTexture::SRGB8_Alpha8:
QOpenGLTexture::SRGB8_Alpha8:
never executed: case QOpenGLTexture::SRGB8_Alpha8:
0
800 case
never executed: case QOpenGLTexture::SRGB_DXT1:
QOpenGLTexture::SRGB_DXT1:
never executed: case QOpenGLTexture::SRGB_DXT1:
0
801 case
never executed: case QOpenGLTexture::SRGB_Alpha_DXT1:
QOpenGLTexture::SRGB_Alpha_DXT1:
never executed: case QOpenGLTexture::SRGB_Alpha_DXT1:
0
802 case
never executed: case QOpenGLTexture::SRGB_Alpha_DXT3:
QOpenGLTexture::SRGB_Alpha_DXT3:
never executed: case QOpenGLTexture::SRGB_Alpha_DXT3:
0
803 case
never executed: case QOpenGLTexture::SRGB_Alpha_DXT5:
QOpenGLTexture::SRGB_Alpha_DXT5:
never executed: case QOpenGLTexture::SRGB_Alpha_DXT5:
0
804 case
never executed: case QOpenGLTexture::SRGB_BP_UNorm:
QOpenGLTexture::SRGB_BP_UNorm:
never executed: case QOpenGLTexture::SRGB_BP_UNorm:
0
805 case
never executed: case QOpenGLTexture::R11_EAC_UNorm:
QOpenGLTexture::R11_EAC_UNorm:
never executed: case QOpenGLTexture::R11_EAC_UNorm:
0
806 case
never executed: case QOpenGLTexture::R11_EAC_SNorm:
QOpenGLTexture::R11_EAC_SNorm:
never executed: case QOpenGLTexture::R11_EAC_SNorm:
0
807 case
never executed: case QOpenGLTexture::RG11_EAC_UNorm:
QOpenGLTexture::RG11_EAC_UNorm:
never executed: case QOpenGLTexture::RG11_EAC_UNorm:
0
808 case
never executed: case QOpenGLTexture::RG11_EAC_SNorm:
QOpenGLTexture::RG11_EAC_SNorm:
never executed: case QOpenGLTexture::RG11_EAC_SNorm:
0
809 case
never executed: case QOpenGLTexture::RGB8_ETC2:
QOpenGLTexture::RGB8_ETC2:
never executed: case QOpenGLTexture::RGB8_ETC2:
0
810 case
never executed: case QOpenGLTexture::SRGB8_ETC2:
QOpenGLTexture::SRGB8_ETC2:
never executed: case QOpenGLTexture::SRGB8_ETC2:
0
811 case
never executed: case QOpenGLTexture::RGB8_PunchThrough_Alpha1_ETC2:
QOpenGLTexture::RGB8_PunchThrough_Alpha1_ETC2:
never executed: case QOpenGLTexture::RGB8_PunchThrough_Alpha1_ETC2:
0
812 case
never executed: case QOpenGLTexture::SRGB8_PunchThrough_Alpha1_ETC2:
QOpenGLTexture::SRGB8_PunchThrough_Alpha1_ETC2:
never executed: case QOpenGLTexture::SRGB8_PunchThrough_Alpha1_ETC2:
0
813 case
never executed: case QOpenGLTexture::RGBA8_ETC2_EAC:
QOpenGLTexture::RGBA8_ETC2_EAC:
never executed: case QOpenGLTexture::RGBA8_ETC2_EAC:
0
814 case
never executed: case QOpenGLTexture::SRGB8_Alpha8_ETC2_EAC:
QOpenGLTexture::SRGB8_Alpha8_ETC2_EAC:
never executed: case QOpenGLTexture::SRGB8_Alpha8_ETC2_EAC:
0
815 case
never executed: case QOpenGLTexture::RGB8_ETC1:
QOpenGLTexture::RGB8_ETC1:
never executed: case QOpenGLTexture::RGB8_ETC1:
0
816 return
never executed: return QOpenGLTexture::UInt8;
QOpenGLTexture::UInt8;
never executed: return QOpenGLTexture::UInt8;
0
817-
818 case
never executed: case QOpenGLTexture::DepthFormat:
QOpenGLTexture::DepthFormat:
never executed: case QOpenGLTexture::DepthFormat:
0
819 return
never executed: return QOpenGLTexture::UInt32;
QOpenGLTexture::UInt32;
never executed: return QOpenGLTexture::UInt32;
0
820-
821 case
never executed: case QOpenGLTexture::AlphaFormat:
QOpenGLTexture::AlphaFormat:
never executed: case QOpenGLTexture::AlphaFormat:
0
822 case
never executed: case QOpenGLTexture::RGBFormat:
QOpenGLTexture::RGBFormat:
never executed: case QOpenGLTexture::RGBFormat:
0
823 case
never executed: case QOpenGLTexture::RGBAFormat:
QOpenGLTexture::RGBAFormat:
never executed: case QOpenGLTexture::RGBAFormat:
0
824 case
never executed: case QOpenGLTexture::LuminanceFormat:
QOpenGLTexture::LuminanceFormat:
never executed: case QOpenGLTexture::LuminanceFormat:
0
825 case
never executed: case QOpenGLTexture::LuminanceAlphaFormat:
QOpenGLTexture::LuminanceAlphaFormat:
never executed: case QOpenGLTexture::LuminanceAlphaFormat:
0
826 return
never executed: return QOpenGLTexture::UInt8;
QOpenGLTexture::UInt8;
never executed: return QOpenGLTexture::UInt8;
0
827 }-
828-
829 do { ((!(false)) ? qt_assert_x("Q_UNREACHABLE()", "Q_UNREACHABLE was reached",__FILE__,875) : qt_noop()); __builtin_unreachable(); } while (0);-
830 return
never executed: return QOpenGLTexture::NoPixelType;
QOpenGLTexture::NoPixelType;
never executed: return QOpenGLTexture::NoPixelType;
0
831}-
832-
833static bool isCompressedFormat(QOpenGLTexture::TextureFormat internalFormat)-
834{-
835 switch (internalFormat) {-
836 case
never executed: case QOpenGLTexture::NoFormat:
QOpenGLTexture::NoFormat:
never executed: case QOpenGLTexture::NoFormat:
0
837-
838 case
never executed: case QOpenGLTexture::R8_UNorm:
QOpenGLTexture::R8_UNorm:
never executed: case QOpenGLTexture::R8_UNorm:
0
839 case
never executed: case QOpenGLTexture::RG8_UNorm:
QOpenGLTexture::RG8_UNorm:
never executed: case QOpenGLTexture::RG8_UNorm:
0
840 case
never executed: case QOpenGLTexture::RGB8_UNorm:
QOpenGLTexture::RGB8_UNorm:
never executed: case QOpenGLTexture::RGB8_UNorm:
0
841 case
never executed: case QOpenGLTexture::RGBA8_UNorm:
QOpenGLTexture::RGBA8_UNorm:
never executed: case QOpenGLTexture::RGBA8_UNorm:
0
842 case
never executed: case QOpenGLTexture::R16_UNorm:
QOpenGLTexture::R16_UNorm:
never executed: case QOpenGLTexture::R16_UNorm:
0
843 case
never executed: case QOpenGLTexture::RG16_UNorm:
QOpenGLTexture::RG16_UNorm:
never executed: case QOpenGLTexture::RG16_UNorm:
0
844 case
never executed: case QOpenGLTexture::RGB16_UNorm:
QOpenGLTexture::RGB16_UNorm:
never executed: case QOpenGLTexture::RGB16_UNorm:
0
845 case
never executed: case QOpenGLTexture::RGBA16_UNorm:
QOpenGLTexture::RGBA16_UNorm:
never executed: case QOpenGLTexture::RGBA16_UNorm:
0
846 case
never executed: case QOpenGLTexture::R8_SNorm:
QOpenGLTexture::R8_SNorm:
never executed: case QOpenGLTexture::R8_SNorm:
0
847 case
never executed: case QOpenGLTexture::RG8_SNorm:
QOpenGLTexture::RG8_SNorm:
never executed: case QOpenGLTexture::RG8_SNorm:
0
848 case
never executed: case QOpenGLTexture::RGB8_SNorm:
QOpenGLTexture::RGB8_SNorm:
never executed: case QOpenGLTexture::RGB8_SNorm:
0
849 case
never executed: case QOpenGLTexture::RGBA8_SNorm:
QOpenGLTexture::RGBA8_SNorm:
never executed: case QOpenGLTexture::RGBA8_SNorm:
0
850 case
never executed: case QOpenGLTexture::R16_SNorm:
QOpenGLTexture::R16_SNorm:
never executed: case QOpenGLTexture::R16_SNorm:
0
851 case
never executed: case QOpenGLTexture::RG16_SNorm:
QOpenGLTexture::RG16_SNorm:
never executed: case QOpenGLTexture::RG16_SNorm:
0
852 case
never executed: case QOpenGLTexture::RGB16_SNorm:
QOpenGLTexture::RGB16_SNorm:
never executed: case QOpenGLTexture::RGB16_SNorm:
0
853 case
never executed: case QOpenGLTexture::RGBA16_SNorm:
QOpenGLTexture::RGBA16_SNorm:
never executed: case QOpenGLTexture::RGBA16_SNorm:
0
854 case
never executed: case QOpenGLTexture::R8U:
QOpenGLTexture::R8U:
never executed: case QOpenGLTexture::R8U:
0
855 case
never executed: case QOpenGLTexture::RG8U:
QOpenGLTexture::RG8U:
never executed: case QOpenGLTexture::RG8U:
0
856 case
never executed: case QOpenGLTexture::RGB8U:
QOpenGLTexture::RGB8U:
never executed: case QOpenGLTexture::RGB8U:
0
857 case
never executed: case QOpenGLTexture::RGBA8U:
QOpenGLTexture::RGBA8U:
never executed: case QOpenGLTexture::RGBA8U:
0
858 case
never executed: case QOpenGLTexture::R16U:
QOpenGLTexture::R16U:
never executed: case QOpenGLTexture::R16U:
0
859 case
never executed: case QOpenGLTexture::RG16U:
QOpenGLTexture::RG16U:
never executed: case QOpenGLTexture::RG16U:
0
860 case
never executed: case QOpenGLTexture::RGB16U:
QOpenGLTexture::RGB16U:
never executed: case QOpenGLTexture::RGB16U:
0
861 case
never executed: case QOpenGLTexture::RGBA16U:
QOpenGLTexture::RGBA16U:
never executed: case QOpenGLTexture::RGBA16U:
0
862 case
never executed: case QOpenGLTexture::R32U:
QOpenGLTexture::R32U:
never executed: case QOpenGLTexture::R32U:
0
863 case
never executed: case QOpenGLTexture::RG32U:
QOpenGLTexture::RG32U:
never executed: case QOpenGLTexture::RG32U:
0
864 case
never executed: case QOpenGLTexture::RGB32U:
QOpenGLTexture::RGB32U:
never executed: case QOpenGLTexture::RGB32U:
0
865 case
never executed: case QOpenGLTexture::RGBA32U:
QOpenGLTexture::RGBA32U:
never executed: case QOpenGLTexture::RGBA32U:
0
866 case
never executed: case QOpenGLTexture::R8I:
QOpenGLTexture::R8I:
never executed: case QOpenGLTexture::R8I:
0
867 case
never executed: case QOpenGLTexture::RG8I:
QOpenGLTexture::RG8I:
never executed: case QOpenGLTexture::RG8I:
0
868 case
never executed: case QOpenGLTexture::RGB8I:
QOpenGLTexture::RGB8I:
never executed: case QOpenGLTexture::RGB8I:
0
869 case
never executed: case QOpenGLTexture::RGBA8I:
QOpenGLTexture::RGBA8I:
never executed: case QOpenGLTexture::RGBA8I:
0
870 case
never executed: case QOpenGLTexture::R16I:
QOpenGLTexture::R16I:
never executed: case QOpenGLTexture::R16I:
0
871 case
never executed: case QOpenGLTexture::RG16I:
QOpenGLTexture::RG16I:
never executed: case QOpenGLTexture::RG16I:
0
872 case
never executed: case QOpenGLTexture::RGB16I:
QOpenGLTexture::RGB16I:
never executed: case QOpenGLTexture::RGB16I:
0
873 case
never executed: case QOpenGLTexture::RGBA16I:
QOpenGLTexture::RGBA16I:
never executed: case QOpenGLTexture::RGBA16I:
0
874 case
never executed: case QOpenGLTexture::R32I:
QOpenGLTexture::R32I:
never executed: case QOpenGLTexture::R32I:
0
875 case
never executed: case QOpenGLTexture::RG32I:
QOpenGLTexture::RG32I:
never executed: case QOpenGLTexture::RG32I:
0
876 case
never executed: case QOpenGLTexture::RGB32I:
QOpenGLTexture::RGB32I:
never executed: case QOpenGLTexture::RGB32I:
0
877 case
never executed: case QOpenGLTexture::RGBA32I:
QOpenGLTexture::RGBA32I:
never executed: case QOpenGLTexture::RGBA32I:
0
878 case
never executed: case QOpenGLTexture::R16F:
QOpenGLTexture::R16F:
never executed: case QOpenGLTexture::R16F:
0
879 case
never executed: case QOpenGLTexture::RG16F:
QOpenGLTexture::RG16F:
never executed: case QOpenGLTexture::RG16F:
0
880 case
never executed: case QOpenGLTexture::RGB16F:
QOpenGLTexture::RGB16F:
never executed: case QOpenGLTexture::RGB16F:
0
881 case
never executed: case QOpenGLTexture::RGBA16F:
QOpenGLTexture::RGBA16F:
never executed: case QOpenGLTexture::RGBA16F:
0
882 case
never executed: case QOpenGLTexture::R32F:
QOpenGLTexture::R32F:
never executed: case QOpenGLTexture::R32F:
0
883 case
never executed: case QOpenGLTexture::RG32F:
QOpenGLTexture::RG32F:
never executed: case QOpenGLTexture::RG32F:
0
884 case
never executed: case QOpenGLTexture::RGB32F:
QOpenGLTexture::RGB32F:
never executed: case QOpenGLTexture::RGB32F:
0
885 case
never executed: case QOpenGLTexture::RGBA32F:
QOpenGLTexture::RGBA32F:
never executed: case QOpenGLTexture::RGBA32F:
0
886 case
never executed: case QOpenGLTexture::RGB9E5:
QOpenGLTexture::RGB9E5:
never executed: case QOpenGLTexture::RGB9E5:
0
887 case
never executed: case QOpenGLTexture::RG11B10F:
QOpenGLTexture::RG11B10F:
never executed: case QOpenGLTexture::RG11B10F:
0
888 case
never executed: case QOpenGLTexture::RG3B2:
QOpenGLTexture::RG3B2:
never executed: case QOpenGLTexture::RG3B2:
0
889 case
never executed: case QOpenGLTexture::R5G6B5:
QOpenGLTexture::R5G6B5:
never executed: case QOpenGLTexture::R5G6B5:
0
890 case
never executed: case QOpenGLTexture::RGB5A1:
QOpenGLTexture::RGB5A1:
never executed: case QOpenGLTexture::RGB5A1:
0
891 case
never executed: case QOpenGLTexture::RGBA4:
QOpenGLTexture::RGBA4:
never executed: case QOpenGLTexture::RGBA4:
0
892 case
never executed: case QOpenGLTexture::RGB10A2:
QOpenGLTexture::RGB10A2:
never executed: case QOpenGLTexture::RGB10A2:
0
893-
894 case
never executed: case QOpenGLTexture::D16:
QOpenGLTexture::D16:
never executed: case QOpenGLTexture::D16:
0
895 case
never executed: case QOpenGLTexture::D24:
QOpenGLTexture::D24:
never executed: case QOpenGLTexture::D24:
0
896 case
never executed: case QOpenGLTexture::D32:
QOpenGLTexture::D32:
never executed: case QOpenGLTexture::D32:
0
897 case
never executed: case QOpenGLTexture::D32F:
QOpenGLTexture::D32F:
never executed: case QOpenGLTexture::D32F:
0
898-
899 case
never executed: case QOpenGLTexture::D24S8:
QOpenGLTexture::D24S8:
never executed: case QOpenGLTexture::D24S8:
0
900 case
never executed: case QOpenGLTexture::D32FS8X24:
QOpenGLTexture::D32FS8X24:
never executed: case QOpenGLTexture::D32FS8X24:
0
901-
902 case
never executed: case QOpenGLTexture::S8:
QOpenGLTexture::S8:
never executed: case QOpenGLTexture::S8:
0
903 return
never executed: return false;
false;
never executed: return false;
0
904-
905 case
never executed: case QOpenGLTexture::RGB_DXT1:
QOpenGLTexture::RGB_DXT1:
never executed: case QOpenGLTexture::RGB_DXT1:
0
906 case
never executed: case QOpenGLTexture::RGBA_DXT1:
QOpenGLTexture::RGBA_DXT1:
never executed: case QOpenGLTexture::RGBA_DXT1:
0
907 case
never executed: case QOpenGLTexture::RGBA_DXT3:
QOpenGLTexture::RGBA_DXT3:
never executed: case QOpenGLTexture::RGBA_DXT3:
0
908 case
never executed: case QOpenGLTexture::RGBA_DXT5:
QOpenGLTexture::RGBA_DXT5:
never executed: case QOpenGLTexture::RGBA_DXT5:
0
909 case
never executed: case QOpenGLTexture::R_ATI1N_UNorm:
QOpenGLTexture::R_ATI1N_UNorm:
never executed: case QOpenGLTexture::R_ATI1N_UNorm:
0
910 case
never executed: case QOpenGLTexture::R_ATI1N_SNorm:
QOpenGLTexture::R_ATI1N_SNorm:
never executed: case QOpenGLTexture::R_ATI1N_SNorm:
0
911 case
never executed: case QOpenGLTexture::RG_ATI2N_UNorm:
QOpenGLTexture::RG_ATI2N_UNorm:
never executed: case QOpenGLTexture::RG_ATI2N_UNorm:
0
912 case
never executed: case QOpenGLTexture::RG_ATI2N_SNorm:
QOpenGLTexture::RG_ATI2N_SNorm:
never executed: case QOpenGLTexture::RG_ATI2N_SNorm:
0
913 case
never executed: case QOpenGLTexture::RGB_BP_UNSIGNED_FLOAT:
QOpenGLTexture::RGB_BP_UNSIGNED_FLOAT:
never executed: case QOpenGLTexture::RGB_BP_UNSIGNED_FLOAT:
0
914 case
never executed: case QOpenGLTexture::RGB_BP_SIGNED_FLOAT:
QOpenGLTexture::RGB_BP_SIGNED_FLOAT:
never executed: case QOpenGLTexture::RGB_BP_SIGNED_FLOAT:
0
915 case
never executed: case QOpenGLTexture::RGB_BP_UNorm:
QOpenGLTexture::RGB_BP_UNorm:
never executed: case QOpenGLTexture::RGB_BP_UNorm:
0
916 case
never executed: case QOpenGLTexture::SRGB8:
QOpenGLTexture::SRGB8:
never executed: case QOpenGLTexture::SRGB8:
0
917 case
never executed: case QOpenGLTexture::SRGB8_Alpha8:
QOpenGLTexture::SRGB8_Alpha8:
never executed: case QOpenGLTexture::SRGB8_Alpha8:
0
918 case
never executed: case QOpenGLTexture::SRGB_DXT1:
QOpenGLTexture::SRGB_DXT1:
never executed: case QOpenGLTexture::SRGB_DXT1:
0
919 case
never executed: case QOpenGLTexture::SRGB_Alpha_DXT1:
QOpenGLTexture::SRGB_Alpha_DXT1:
never executed: case QOpenGLTexture::SRGB_Alpha_DXT1:
0
920 case
never executed: case QOpenGLTexture::SRGB_Alpha_DXT3:
QOpenGLTexture::SRGB_Alpha_DXT3:
never executed: case QOpenGLTexture::SRGB_Alpha_DXT3:
0
921 case
never executed: case QOpenGLTexture::SRGB_Alpha_DXT5:
QOpenGLTexture::SRGB_Alpha_DXT5:
never executed: case QOpenGLTexture::SRGB_Alpha_DXT5:
0
922 case
never executed: case QOpenGLTexture::SRGB_BP_UNorm:
QOpenGLTexture::SRGB_BP_UNorm:
never executed: case QOpenGLTexture::SRGB_BP_UNorm:
0
923 case
never executed: case QOpenGLTexture::R11_EAC_UNorm:
QOpenGLTexture::R11_EAC_UNorm:
never executed: case QOpenGLTexture::R11_EAC_UNorm:
0
924 case
never executed: case QOpenGLTexture::R11_EAC_SNorm:
QOpenGLTexture::R11_EAC_SNorm:
never executed: case QOpenGLTexture::R11_EAC_SNorm:
0
925 case
never executed: case QOpenGLTexture::RG11_EAC_UNorm:
QOpenGLTexture::RG11_EAC_UNorm:
never executed: case QOpenGLTexture::RG11_EAC_UNorm:
0
926 case
never executed: case QOpenGLTexture::RG11_EAC_SNorm:
QOpenGLTexture::RG11_EAC_SNorm:
never executed: case QOpenGLTexture::RG11_EAC_SNorm:
0
927 case
never executed: case QOpenGLTexture::RGB8_ETC2:
QOpenGLTexture::RGB8_ETC2:
never executed: case QOpenGLTexture::RGB8_ETC2:
0
928 case
never executed: case QOpenGLTexture::SRGB8_ETC2:
QOpenGLTexture::SRGB8_ETC2:
never executed: case QOpenGLTexture::SRGB8_ETC2:
0
929 case
never executed: case QOpenGLTexture::RGB8_PunchThrough_Alpha1_ETC2:
QOpenGLTexture::RGB8_PunchThrough_Alpha1_ETC2:
never executed: case QOpenGLTexture::RGB8_PunchThrough_Alpha1_ETC2:
0
930 case
never executed: case QOpenGLTexture::SRGB8_PunchThrough_Alpha1_ETC2:
QOpenGLTexture::SRGB8_PunchThrough_Alpha1_ETC2:
never executed: case QOpenGLTexture::SRGB8_PunchThrough_Alpha1_ETC2:
0
931 case
never executed: case QOpenGLTexture::RGBA8_ETC2_EAC:
QOpenGLTexture::RGBA8_ETC2_EAC:
never executed: case QOpenGLTexture::RGBA8_ETC2_EAC:
0
932 case
never executed: case QOpenGLTexture::SRGB8_Alpha8_ETC2_EAC:
QOpenGLTexture::SRGB8_Alpha8_ETC2_EAC:
never executed: case QOpenGLTexture::SRGB8_Alpha8_ETC2_EAC:
0
933 case
never executed: case QOpenGLTexture::RGB8_ETC1:
QOpenGLTexture::RGB8_ETC1:
never executed: case QOpenGLTexture::RGB8_ETC1:
0
934 return
never executed: return true;
true;
never executed: return true;
0
935-
936 case
never executed: case QOpenGLTexture::DepthFormat:
QOpenGLTexture::DepthFormat:
never executed: case QOpenGLTexture::DepthFormat:
0
937 case
never executed: case QOpenGLTexture::AlphaFormat:
QOpenGLTexture::AlphaFormat:
never executed: case QOpenGLTexture::AlphaFormat:
0
938 case
never executed: case QOpenGLTexture::RGBFormat:
QOpenGLTexture::RGBFormat:
never executed: case QOpenGLTexture::RGBFormat:
0
939 case
never executed: case QOpenGLTexture::RGBAFormat:
QOpenGLTexture::RGBAFormat:
never executed: case QOpenGLTexture::RGBAFormat:
0
940 case
never executed: case QOpenGLTexture::LuminanceFormat:
QOpenGLTexture::LuminanceFormat:
never executed: case QOpenGLTexture::LuminanceFormat:
0
941 case
never executed: case QOpenGLTexture::LuminanceAlphaFormat:
QOpenGLTexture::LuminanceAlphaFormat:
never executed: case QOpenGLTexture::LuminanceAlphaFormat:
0
942 return
never executed: return false;
false;
never executed: return false;
0
943 }-
944-
945 do { ((!(false)) ? qt_assert_x("Q_UNREACHABLE()", "Q_UNREACHABLE was reached",__FILE__,991) : qt_noop()); __builtin_unreachable(); } while (0);-
946 return
never executed: return false;
false;
never executed: return false;
0
947}-
948-
949void QOpenGLTexturePrivate::allocateMutableStorage(QOpenGLTexture::PixelFormat pixelFormat, QOpenGLTexture::PixelType pixelType)-
950{-
951-
952-
953-
954-
955 if (isCompressedFormat(format)
isCompressedFormat(format)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
956 storageAllocated = true;-
957 return;
never executed: return;
0
958 }-
959-
960 switch (target) {-
961 case
never executed: case QOpenGLTexture::TargetBuffer:
QOpenGLTexture::TargetBuffer:
never executed: case QOpenGLTexture::TargetBuffer:
0
962-
963 QMessageLogger(__FILE__, 1009, __PRETTY_FUNCTION__).warning("Buffer textures do not allocate storage");-
964 return;
never executed: return;
0
965-
966 case
never executed: case QOpenGLTexture::Target1D:
QOpenGLTexture::Target1D:
never executed: case QOpenGLTexture::Target1D:
0
967 if (features.testFlag(QOpenGLTexture::Texture1D)
features.testF...re::Texture1D)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
968 for (int level = 0; level < mipLevels
level < mipLevelsDescription
TRUEnever evaluated
FALSEnever evaluated
; ++level)
0
969 texFuncs->glTextureImage1D(textureId, target, bindingTarget, level, format,
never executed: texFuncs->glTextureImage1D(textureId, target, bindingTarget, level, format, mipLevelSize(level, dimensions[0]), 0, pixelFormat, pixelType, 0);
0
970 mipLevelSize(level, dimensions[0]),
never executed: texFuncs->glTextureImage1D(textureId, target, bindingTarget, level, format, mipLevelSize(level, dimensions[0]), 0, pixelFormat, pixelType, 0);
0
971 0,
never executed: texFuncs->glTextureImage1D(textureId, target, bindingTarget, level, format, mipLevelSize(level, dimensions[0]), 0, pixelFormat, pixelType, 0);
0
972 pixelFormat, pixelType, 0);
never executed: texFuncs->glTextureImage1D(textureId, target, bindingTarget, level, format, mipLevelSize(level, dimensions[0]), 0, pixelFormat, pixelType, 0);
0
973 }
never executed: end of block
else {
0
974 QMessageLogger(__FILE__, 1020, __PRETTY_FUNCTION__).warning("1D textures are not supported");-
975 return;
never executed: return;
0
976 }-
977 break;
never executed: break;
0
978-
979 case
never executed: case QOpenGLTexture::Target1DArray:
QOpenGLTexture::Target1DArray:
never executed: case QOpenGLTexture::Target1DArray:
0
980 if (features.testFlag(QOpenGLTexture::Texture1D)
features.testF...re::Texture1D)Description
TRUEnever evaluated
FALSEnever evaluated
0
981 && features.testFlag(QOpenGLTexture::TextureArrays)
features.testF...TextureArrays)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
982 for (int level = 0; level < mipLevels
level < mipLevelsDescription
TRUEnever evaluated
FALSEnever evaluated
; ++level)
0
983 texFuncs->glTextureImage2D(textureId, target, bindingTarget, level, format,
never executed: texFuncs->glTextureImage2D(textureId, target, bindingTarget, level, format, mipLevelSize(level, dimensions[0]), layers, 0, pixelFormat, pixelType, 0);
0
984 mipLevelSize(level, dimensions[0]),
never executed: texFuncs->glTextureImage2D(textureId, target, bindingTarget, level, format, mipLevelSize(level, dimensions[0]), layers, 0, pixelFormat, pixelType, 0);
0
985 layers,
never executed: texFuncs->glTextureImage2D(textureId, target, bindingTarget, level, format, mipLevelSize(level, dimensions[0]), layers, 0, pixelFormat, pixelType, 0);
0
986 0,
never executed: texFuncs->glTextureImage2D(textureId, target, bindingTarget, level, format, mipLevelSize(level, dimensions[0]), layers, 0, pixelFormat, pixelType, 0);
0
987 pixelFormat, pixelType, 0);
never executed: texFuncs->glTextureImage2D(textureId, target, bindingTarget, level, format, mipLevelSize(level, dimensions[0]), layers, 0, pixelFormat, pixelType, 0);
0
988 }
never executed: end of block
else {
0
989 QMessageLogger(__FILE__, 1035, __PRETTY_FUNCTION__).warning("1D array textures are not supported");-
990 return;
never executed: return;
0
991 }-
992 break;
never executed: break;
0
993-
994 case
never executed: case QOpenGLTexture::Target2D:
QOpenGLTexture::Target2D:
never executed: case QOpenGLTexture::Target2D:
0
995 case
never executed: case QOpenGLTexture::TargetRectangle:
QOpenGLTexture::TargetRectangle:
never executed: case QOpenGLTexture::TargetRectangle:
0
996 for (int level = 0; level < mipLevels
level < mipLevelsDescription
TRUEnever evaluated
FALSEnever evaluated
; ++level)
0
997 texFuncs->glTextureImage2D(textureId, target, bindingTarget, level, format,
never executed: texFuncs->glTextureImage2D(textureId, target, bindingTarget, level, format, mipLevelSize(level, dimensions[0]), mipLevelSize(level, dimensions[1]), 0, pixelFormat, pixelType, 0);
0
998 mipLevelSize(level, dimensions[0]),
never executed: texFuncs->glTextureImage2D(textureId, target, bindingTarget, level, format, mipLevelSize(level, dimensions[0]), mipLevelSize(level, dimensions[1]), 0, pixelFormat, pixelType, 0);
0
999 mipLevelSize(level, dimensions[1]),
never executed: texFuncs->glTextureImage2D(textureId, target, bindingTarget, level, format, mipLevelSize(level, dimensions[0]), mipLevelSize(level, dimensions[1]), 0, pixelFormat, pixelType, 0);
0
1000 0,
never executed: texFuncs->glTextureImage2D(textureId, target, bindingTarget, level, format, mipLevelSize(level, dimensions[0]), mipLevelSize(level, dimensions[1]), 0, pixelFormat, pixelType, 0);
0
1001 pixelFormat, pixelType, 0);
never executed: texFuncs->glTextureImage2D(textureId, target, bindingTarget, level, format, mipLevelSize(level, dimensions[0]), mipLevelSize(level, dimensions[1]), 0, pixelFormat, pixelType, 0);
0
1002 break;
never executed: break;
0
1003-
1004 case
never executed: case QOpenGLTexture::TargetCubeMap:
QOpenGLTexture::TargetCubeMap:
never executed: case QOpenGLTexture::TargetCubeMap:
{
0
1005-
1006-
1007-
1008 const QOpenGLTexture::CubeMapFace faceTargets[] = {-
1009 QOpenGLTexture::CubeMapPositiveX, QOpenGLTexture::CubeMapNegativeX,-
1010 QOpenGLTexture::CubeMapPositiveY, QOpenGLTexture::CubeMapNegativeY,-
1011 QOpenGLTexture::CubeMapPositiveZ, QOpenGLTexture::CubeMapNegativeZ-
1012 };-
1013-
1014 for (int faceTarget = 0; faceTarget < 6
faceTarget < 6Description
TRUEnever evaluated
FALSEnever evaluated
; ++faceTarget) {
0
1015 for (int level = 0; level < mipLevels
level < mipLevelsDescription
TRUEnever evaluated
FALSEnever evaluated
; ++level) {
0
1016 texFuncs->glTextureImage2D(textureId, faceTargets[faceTarget], bindingTarget,-
1017 level, format,-
1018 mipLevelSize(level, dimensions[0]),-
1019 mipLevelSize(level, dimensions[1]),-
1020 0,-
1021 pixelFormat, pixelType, 0);-
1022 }
never executed: end of block
0
1023 }
never executed: end of block
0
1024 break;
never executed: break;
0
1025 }-
1026-
1027 case
never executed: case QOpenGLTexture::Target2DArray:
QOpenGLTexture::Target2DArray:
never executed: case QOpenGLTexture::Target2DArray:
0
1028 if (features.testFlag(QOpenGLTexture::TextureArrays)
features.testF...TextureArrays)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1029 for (int level = 0; level < mipLevels
level < mipLevelsDescription
TRUEnever evaluated
FALSEnever evaluated
; ++level)
0
1030 texFuncs->glTextureImage3D(textureId, target, bindingTarget, level, format,
never executed: texFuncs->glTextureImage3D(textureId, target, bindingTarget, level, format, mipLevelSize(level, dimensions[0]), mipLevelSize(level, dimensions[1]), layers, 0, pixelFormat, pixelType, 0);
0
1031 mipLevelSize(level, dimensions[0]),
never executed: texFuncs->glTextureImage3D(textureId, target, bindingTarget, level, format, mipLevelSize(level, dimensions[0]), mipLevelSize(level, dimensions[1]), layers, 0, pixelFormat, pixelType, 0);
0
1032 mipLevelSize(level, dimensions[1]),
never executed: texFuncs->glTextureImage3D(textureId, target, bindingTarget, level, format, mipLevelSize(level, dimensions[0]), mipLevelSize(level, dimensions[1]), layers, 0, pixelFormat, pixelType, 0);
0
1033 layers,
never executed: texFuncs->glTextureImage3D(textureId, target, bindingTarget, level, format, mipLevelSize(level, dimensions[0]), mipLevelSize(level, dimensions[1]), layers, 0, pixelFormat, pixelType, 0);
0
1034 0,
never executed: texFuncs->glTextureImage3D(textureId, target, bindingTarget, level, format, mipLevelSize(level, dimensions[0]), mipLevelSize(level, dimensions[1]), layers, 0, pixelFormat, pixelType, 0);
0
1035 pixelFormat, pixelType, 0);
never executed: texFuncs->glTextureImage3D(textureId, target, bindingTarget, level, format, mipLevelSize(level, dimensions[0]), mipLevelSize(level, dimensions[1]), layers, 0, pixelFormat, pixelType, 0);
0
1036 }
never executed: end of block
else {
0
1037 QMessageLogger(__FILE__, 1083, __PRETTY_FUNCTION__).warning("Array textures are not supported");-
1038 return;
never executed: return;
0
1039 }-
1040 break;
never executed: break;
0
1041-
1042 case
never executed: case QOpenGLTexture::TargetCubeMapArray:
QOpenGLTexture::TargetCubeMapArray:
never executed: case QOpenGLTexture::TargetCubeMapArray:
0
1043-
1044 if (features.testFlag(QOpenGLTexture::TextureCubeMapArrays)
features.testF...CubeMapArrays)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1045 for (int level = 0; level < mipLevels
level < mipLevelsDescription
TRUEnever evaluated
FALSEnever evaluated
; ++level)
0
1046 texFuncs->glTextureImage3D(textureId, target, bindingTarget, level, format,
never executed: texFuncs->glTextureImage3D(textureId, target, bindingTarget, level, format, mipLevelSize(level, dimensions[0]), mipLevelSize(level, dimensions[1]), 6 * layers, 0, pixelFormat, pixelType, 0);
0
1047 mipLevelSize(level, dimensions[0]),
never executed: texFuncs->glTextureImage3D(textureId, target, bindingTarget, level, format, mipLevelSize(level, dimensions[0]), mipLevelSize(level, dimensions[1]), 6 * layers, 0, pixelFormat, pixelType, 0);
0
1048 mipLevelSize(level, dimensions[1]),
never executed: texFuncs->glTextureImage3D(textureId, target, bindingTarget, level, format, mipLevelSize(level, dimensions[0]), mipLevelSize(level, dimensions[1]), 6 * layers, 0, pixelFormat, pixelType, 0);
0
1049 6 * layers,
never executed: texFuncs->glTextureImage3D(textureId, target, bindingTarget, level, format, mipLevelSize(level, dimensions[0]), mipLevelSize(level, dimensions[1]), 6 * layers, 0, pixelFormat, pixelType, 0);
0
1050 0,
never executed: texFuncs->glTextureImage3D(textureId, target, bindingTarget, level, format, mipLevelSize(level, dimensions[0]), mipLevelSize(level, dimensions[1]), 6 * layers, 0, pixelFormat, pixelType, 0);
0
1051 pixelFormat, pixelType, 0);
never executed: texFuncs->glTextureImage3D(textureId, target, bindingTarget, level, format, mipLevelSize(level, dimensions[0]), mipLevelSize(level, dimensions[1]), 6 * layers, 0, pixelFormat, pixelType, 0);
0
1052 }
never executed: end of block
else {
0
1053 QMessageLogger(__FILE__, 1099, __PRETTY_FUNCTION__).warning("Cubemap Array textures are not supported");-
1054 return;
never executed: return;
0
1055 }-
1056 break;
never executed: break;
0
1057-
1058 case
never executed: case QOpenGLTexture::Target3D:
QOpenGLTexture::Target3D:
never executed: case QOpenGLTexture::Target3D:
0
1059 if (features.testFlag(QOpenGLTexture::Texture3D)
features.testF...re::Texture3D)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1060 for (int level = 0; level < mipLevels
level < mipLevelsDescription
TRUEnever evaluated
FALSEnever evaluated
; ++level)
0
1061 texFuncs->glTextureImage3D(textureId, target, bindingTarget, level, format,
never executed: texFuncs->glTextureImage3D(textureId, target, bindingTarget, level, format, mipLevelSize(level, dimensions[0]), mipLevelSize(level, dimensions[1]), mipLevelSize(level, dimensions[2]), 0, pixelFormat, pixelType, 0);
0
1062 mipLevelSize(level, dimensions[0]),
never executed: texFuncs->glTextureImage3D(textureId, target, bindingTarget, level, format, mipLevelSize(level, dimensions[0]), mipLevelSize(level, dimensions[1]), mipLevelSize(level, dimensions[2]), 0, pixelFormat, pixelType, 0);
0
1063 mipLevelSize(level, dimensions[1]),
never executed: texFuncs->glTextureImage3D(textureId, target, bindingTarget, level, format, mipLevelSize(level, dimensions[0]), mipLevelSize(level, dimensions[1]), mipLevelSize(level, dimensions[2]), 0, pixelFormat, pixelType, 0);
0
1064 mipLevelSize(level, dimensions[2]),
never executed: texFuncs->glTextureImage3D(textureId, target, bindingTarget, level, format, mipLevelSize(level, dimensions[0]), mipLevelSize(level, dimensions[1]), mipLevelSize(level, dimensions[2]), 0, pixelFormat, pixelType, 0);
0
1065 0,
never executed: texFuncs->glTextureImage3D(textureId, target, bindingTarget, level, format, mipLevelSize(level, dimensions[0]), mipLevelSize(level, dimensions[1]), mipLevelSize(level, dimensions[2]), 0, pixelFormat, pixelType, 0);
0
1066 pixelFormat, pixelType, 0);
never executed: texFuncs->glTextureImage3D(textureId, target, bindingTarget, level, format, mipLevelSize(level, dimensions[0]), mipLevelSize(level, dimensions[1]), mipLevelSize(level, dimensions[2]), 0, pixelFormat, pixelType, 0);
0
1067 }
never executed: end of block
else {
0
1068 QMessageLogger(__FILE__, 1114, __PRETTY_FUNCTION__).warning("3D textures are not supported");-
1069 return;
never executed: return;
0
1070 }-
1071 break;
never executed: break;
0
1072-
1073 case
never executed: case QOpenGLTexture::Target2DMultisample:
QOpenGLTexture::Target2DMultisample:
never executed: case QOpenGLTexture::Target2DMultisample:
0
1074 if (features.testFlag(QOpenGLTexture::TextureMultisample)
features.testF...reMultisample)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1075 texFuncs->glTextureImage2DMultisample(textureId, target, bindingTarget, samples, format,-
1076 dimensions[0], dimensions[1],-
1077 fixedSamplePositions);-
1078 }
never executed: end of block
else {
0
1079 QMessageLogger(__FILE__, 1125, __PRETTY_FUNCTION__).warning("Multisample textures are not supported");-
1080 return;
never executed: return;
0
1081 }-
1082 break;
never executed: break;
0
1083-
1084 case
never executed: case QOpenGLTexture::Target2DMultisampleArray:
QOpenGLTexture::Target2DMultisampleArray:
never executed: case QOpenGLTexture::Target2DMultisampleArray:
0
1085 if (features.testFlag(QOpenGLTexture::TextureMultisample)
features.testF...reMultisample)Description
TRUEnever evaluated
FALSEnever evaluated
0
1086 && features.testFlag(QOpenGLTexture::TextureArrays)
features.testF...TextureArrays)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1087 texFuncs->glTextureImage3DMultisample(textureId, target, bindingTarget, samples, format,-
1088 dimensions[0], dimensions[1], layers,-
1089 fixedSamplePositions);-
1090 }
never executed: end of block
else {
0
1091 QMessageLogger(__FILE__, 1137, __PRETTY_FUNCTION__).warning("Multisample array textures are not supported");-
1092 return;
never executed: return;
0
1093 }-
1094 break;
never executed: break;
0
1095 }-
1096-
1097 storageAllocated = true;-
1098}
never executed: end of block
0
1099-
1100void QOpenGLTexturePrivate::allocateImmutableStorage()-
1101{-
1102 switch (target) {-
1103 case
never executed: case QOpenGLTexture::TargetBuffer:
QOpenGLTexture::TargetBuffer:
never executed: case QOpenGLTexture::TargetBuffer:
0
1104-
1105 QMessageLogger(__FILE__, 1151, __PRETTY_FUNCTION__).warning("Buffer textures do not allocate storage");-
1106 return;
never executed: return;
0
1107-
1108 case
never executed: case QOpenGLTexture::Target1D:
QOpenGLTexture::Target1D:
never executed: case QOpenGLTexture::Target1D:
0
1109 if (features.testFlag(QOpenGLTexture::Texture1D)
features.testF...re::Texture1D)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1110 texFuncs->glTextureStorage1D(textureId, target, bindingTarget, mipLevels, format,-
1111 dimensions[0]);-
1112 }
never executed: end of block
else {
0
1113 QMessageLogger(__FILE__, 1159, __PRETTY_FUNCTION__).warning("1D textures are not supported");-
1114 return;
never executed: return;
0
1115 }-
1116 break;
never executed: break;
0
1117-
1118 case
never executed: case QOpenGLTexture::Target1DArray:
QOpenGLTexture::Target1DArray:
never executed: case QOpenGLTexture::Target1DArray:
0
1119 if (features.testFlag(QOpenGLTexture::Texture1D)
features.testF...re::Texture1D)Description
TRUEnever evaluated
FALSEnever evaluated
0
1120 && features.testFlag(QOpenGLTexture::TextureArrays)
features.testF...TextureArrays)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1121 texFuncs->glTextureStorage2D(textureId, target, bindingTarget, mipLevels, format,-
1122 dimensions[0], layers);-
1123 }
never executed: end of block
else {
0
1124 QMessageLogger(__FILE__, 1170, __PRETTY_FUNCTION__).warning("1D array textures are not supported");-
1125 return;
never executed: return;
0
1126 }-
1127 break;
never executed: break;
0
1128-
1129 case
never executed: case QOpenGLTexture::Target2D:
QOpenGLTexture::Target2D:
never executed: case QOpenGLTexture::Target2D:
0
1130 case
never executed: case QOpenGLTexture::TargetCubeMap:
QOpenGLTexture::TargetCubeMap:
never executed: case QOpenGLTexture::TargetCubeMap:
0
1131 case
never executed: case QOpenGLTexture::TargetRectangle:
QOpenGLTexture::TargetRectangle:
never executed: case QOpenGLTexture::TargetRectangle:
0
1132 texFuncs->glTextureStorage2D(textureId, target, bindingTarget, mipLevels, format,-
1133 dimensions[0], dimensions[1]);-
1134 break;
never executed: break;
0
1135-
1136 case
never executed: case QOpenGLTexture::Target2DArray:
QOpenGLTexture::Target2DArray:
never executed: case QOpenGLTexture::Target2DArray:
0
1137 if (features.testFlag(QOpenGLTexture::TextureArrays)
features.testF...TextureArrays)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1138 texFuncs->glTextureStorage3D(textureId, target, bindingTarget, mipLevels, format,-
1139 dimensions[0], dimensions[1], layers);-
1140 }
never executed: end of block
else {
0
1141 QMessageLogger(__FILE__, 1187, __PRETTY_FUNCTION__).warning("Array textures are not supported");-
1142 return;
never executed: return;
0
1143 }-
1144 break;
never executed: break;
0
1145-
1146 case
never executed: case QOpenGLTexture::TargetCubeMapArray:
QOpenGLTexture::TargetCubeMapArray:
never executed: case QOpenGLTexture::TargetCubeMapArray:
0
1147-
1148 if (features.testFlag(QOpenGLTexture::TextureCubeMapArrays)
features.testF...CubeMapArrays)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1149 texFuncs->glTextureStorage3D(textureId, target, bindingTarget, mipLevels, format,-
1150 dimensions[0], dimensions[1], 6 * layers);-
1151 }
never executed: end of block
else {
0
1152 QMessageLogger(__FILE__, 1198, __PRETTY_FUNCTION__).warning("Cubemap Array textures are not supported");-
1153 return;
never executed: return;
0
1154 }-
1155 break;
never executed: break;
0
1156-
1157 case
never executed: case QOpenGLTexture::Target3D:
QOpenGLTexture::Target3D:
never executed: case QOpenGLTexture::Target3D:
0
1158 if (features.testFlag(QOpenGLTexture::Texture3D)
features.testF...re::Texture3D)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1159 texFuncs->glTextureStorage3D(textureId, target, bindingTarget, mipLevels, format,-
1160 dimensions[0], dimensions[1], dimensions[2]);-
1161 }
never executed: end of block
else {
0
1162 QMessageLogger(__FILE__, 1208, __PRETTY_FUNCTION__).warning("3D textures are not supported");-
1163 return;
never executed: return;
0
1164 }-
1165 break;
never executed: break;
0
1166-
1167 case
never executed: case QOpenGLTexture::Target2DMultisample:
QOpenGLTexture::Target2DMultisample:
never executed: case QOpenGLTexture::Target2DMultisample:
0
1168 if (features.testFlag(QOpenGLTexture::ImmutableMultisampleStorage)
features.testF...sampleStorage)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1169 texFuncs->glTextureStorage2DMultisample(textureId, target, bindingTarget, samples, format,-
1170 dimensions[0], dimensions[1],-
1171 fixedSamplePositions);-
1172 }
never executed: end of block
else {
0
1173 QMessageLogger(__FILE__, 1219, __PRETTY_FUNCTION__).warning("Multisample textures are not supported");-
1174 return;
never executed: return;
0
1175 }-
1176 break;
never executed: break;
0
1177-
1178 case
never executed: case QOpenGLTexture::Target2DMultisampleArray:
QOpenGLTexture::Target2DMultisampleArray:
never executed: case QOpenGLTexture::Target2DMultisampleArray:
0
1179 if (features.testFlag(QOpenGLTexture::ImmutableMultisampleStorage)
features.testF...sampleStorage)Description
TRUEnever evaluated
FALSEnever evaluated
0
1180 && features.testFlag(QOpenGLTexture::TextureArrays)
features.testF...TextureArrays)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1181 texFuncs->glTextureStorage3DMultisample(textureId, target, bindingTarget, samples, format,-
1182 dimensions[0], dimensions[1], layers,-
1183 fixedSamplePositions);-
1184 }
never executed: end of block
else {
0
1185 QMessageLogger(__FILE__, 1231, __PRETTY_FUNCTION__).warning("Multisample array textures are not supported");-
1186 return;
never executed: return;
0
1187 }-
1188 break;
never executed: break;
0
1189 }-
1190-
1191 storageAllocated = true;-
1192}
never executed: end of block
0
1193-
1194void QOpenGLTexturePrivate::setData(int mipLevel, int layer, QOpenGLTexture::CubeMapFace cubeFace,-
1195 QOpenGLTexture::PixelFormat sourceFormat, QOpenGLTexture::PixelType sourceType,-
1196 const void *data, const QOpenGLPixelTransferOptions * const options)-
1197{-
1198 switch (target) {-
1199 case
never executed: case QOpenGLTexture::Target1D:
QOpenGLTexture::Target1D:
never executed: case QOpenGLTexture::Target1D:
0
1200 (void)layer;;-
1201 (void)cubeFace;;-
1202 texFuncs->glTextureSubImage1D(textureId, target, bindingTarget, mipLevel,-
1203 0, mipLevelSize( mipLevel, dimensions[0] ),-
1204 sourceFormat, sourceType, data, options);-
1205 break;
never executed: break;
0
1206-
1207 case
never executed: case QOpenGLTexture::Target1DArray:
QOpenGLTexture::Target1DArray:
never executed: case QOpenGLTexture::Target1DArray:
0
1208 (void)cubeFace;;-
1209 texFuncs->glTextureSubImage2D(textureId, target, bindingTarget, mipLevel,-
1210 0, layer,-
1211 mipLevelSize(mipLevel, dimensions[0]),-
1212 1,-
1213 sourceFormat, sourceType, data, options);-
1214 break;
never executed: break;
0
1215-
1216 case
never executed: case QOpenGLTexture::Target2D:
QOpenGLTexture::Target2D:
never executed: case QOpenGLTexture::Target2D:
0
1217 (void)layer;;-
1218 (void)cubeFace;;-
1219 texFuncs->glTextureSubImage2D(textureId, target, bindingTarget, mipLevel,-
1220 0, 0,-
1221 mipLevelSize(mipLevel, dimensions[0]),-
1222 mipLevelSize(mipLevel, dimensions[1]),-
1223 sourceFormat, sourceType, data, options);-
1224 break;
never executed: break;
0
1225-
1226 case
never executed: case QOpenGLTexture::Target2DArray:
QOpenGLTexture::Target2DArray:
never executed: case QOpenGLTexture::Target2DArray:
0
1227 (void)cubeFace;;-
1228 texFuncs->glTextureSubImage3D(textureId, target, bindingTarget, mipLevel,-
1229 0, 0, layer,-
1230 mipLevelSize(mipLevel, dimensions[0]),-
1231 mipLevelSize(mipLevel, dimensions[1]),-
1232 1,-
1233 sourceFormat, sourceType, data, options);-
1234 break;
never executed: break;
0
1235-
1236 case
never executed: case QOpenGLTexture::Target3D:
QOpenGLTexture::Target3D:
never executed: case QOpenGLTexture::Target3D:
0
1237 (void)cubeFace;;-
1238 texFuncs->glTextureSubImage3D(textureId, target, bindingTarget, mipLevel,-
1239 0, 0, layer,-
1240 mipLevelSize(mipLevel, dimensions[0]),-
1241 mipLevelSize(mipLevel, dimensions[1]),-
1242 mipLevelSize(mipLevel, dimensions[2]),-
1243 sourceFormat, sourceType, data, options);-
1244 break;
never executed: break;
0
1245-
1246 case
never executed: case QOpenGLTexture::TargetCubeMap:
QOpenGLTexture::TargetCubeMap:
never executed: case QOpenGLTexture::TargetCubeMap:
0
1247 (void)layer;;-
1248 texFuncs->glTextureSubImage2D(textureId, cubeFace, bindingTarget, mipLevel,-
1249 0, 0,-
1250 mipLevelSize(mipLevel, dimensions[0]),-
1251 mipLevelSize(mipLevel, dimensions[1]),-
1252 sourceFormat, sourceType, data, options);-
1253 break;
never executed: break;
0
1254-
1255 case
never executed: case QOpenGLTexture::TargetCubeMapArray:
QOpenGLTexture::TargetCubeMapArray:
never executed: case QOpenGLTexture::TargetCubeMapArray:
{
0
1256 int faceIndex = cubeFace - QOpenGLTexture::CubeMapPositiveX;-
1257 int layerFace = 6 * layer + faceIndex;-
1258 texFuncs->glTextureSubImage3D(textureId, target, bindingTarget, mipLevel,-
1259 0, 0, layerFace,-
1260 mipLevelSize(mipLevel, dimensions[0]),-
1261 mipLevelSize(mipLevel, dimensions[1]),-
1262 1,-
1263 sourceFormat, sourceType, data, options);-
1264 break;
never executed: break;
0
1265 }-
1266-
1267 case
never executed: case QOpenGLTexture::TargetRectangle:
QOpenGLTexture::TargetRectangle:
never executed: case QOpenGLTexture::TargetRectangle:
0
1268 (void)mipLevel;;-
1269 (void)layer;;-
1270 (void)cubeFace;;-
1271 texFuncs->glTextureSubImage2D(textureId, target, bindingTarget, 0,-
1272 0, 0,-
1273 dimensions[0],-
1274 dimensions[1],-
1275 sourceFormat, sourceType, data, options);-
1276 break;
never executed: break;
0
1277-
1278 case
never executed: case QOpenGLTexture::Target2DMultisample:
QOpenGLTexture::Target2DMultisample:
never executed: case QOpenGLTexture::Target2DMultisample:
0
1279 case
never executed: case QOpenGLTexture::Target2DMultisampleArray:
QOpenGLTexture::Target2DMultisampleArray:
never executed: case QOpenGLTexture::Target2DMultisampleArray:
0
1280 case
never executed: case QOpenGLTexture::TargetBuffer:
QOpenGLTexture::TargetBuffer:
never executed: case QOpenGLTexture::TargetBuffer:
0
1281-
1282 QMessageLogger(__FILE__, 1328, __PRETTY_FUNCTION__).warning("QOpenGLTexture::setData(): Texture target does not support pixel data upload");-
1283 break;
never executed: break;
0
1284 }-
1285-
1286-
1287 if (mipLevel == 0
mipLevel == 0Description
TRUEnever evaluated
FALSEnever evaluated
&& autoGenerateMipMaps
autoGenerateMipMapsDescription
TRUEnever evaluated
FALSEnever evaluated
&& mipLevels > 1
mipLevels > 1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1288 QOpenGLTexture * const q = q_func();-
1289 q->generateMipMaps();-
1290 }
never executed: end of block
0
1291}
never executed: end of block
0
1292-
1293void QOpenGLTexturePrivate::setCompressedData(int mipLevel, int layer, QOpenGLTexture::CubeMapFace cubeFace,-
1294 int dataSize, const void *data,-
1295 const QOpenGLPixelTransferOptions * const options)-
1296{-
1297 if (!isCompressedFormat(format)
!isCompressedFormat(format)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1298 QMessageLogger(__FILE__, 1344, __PRETTY_FUNCTION__).warning("Cannot set compressed data for non-compressed format 0x%x", format);-
1299 return;
never executed: return;
0
1300 }-
1301-
1302 const bool needsFullSpec = !isUsingImmutableStorage();-
1303-
1304 switch (target) {-
1305 case
never executed: case QOpenGLTexture::Target1D:
QOpenGLTexture::Target1D:
never executed: case QOpenGLTexture::Target1D:
0
1306 (void)layer;;-
1307 (void)cubeFace;;-
1308 if (needsFullSpec
needsFullSpecDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1309 texFuncs->glCompressedTextureImage1D(textureId, target, bindingTarget, mipLevel,-
1310 format,-
1311 mipLevelSize(mipLevel, dimensions[0]),-
1312 0, dataSize, data, options);-
1313 }
never executed: end of block
else {
0
1314 texFuncs->glCompressedTextureSubImage1D(textureId, target, bindingTarget, mipLevel,-
1315 0, mipLevelSize( mipLevel, dimensions[0] ),-
1316 format, dataSize, data, options);-
1317 }
never executed: end of block
0
1318 break;
never executed: break;
0
1319-
1320 case
never executed: case QOpenGLTexture::Target1DArray:
QOpenGLTexture::Target1DArray:
never executed: case QOpenGLTexture::Target1DArray:
0
1321 (void)cubeFace;;-
1322 if (!needsFullSpec
!needsFullSpecDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1323 texFuncs->glCompressedTextureSubImage2D(textureId, target, bindingTarget, mipLevel,-
1324 0, layer,-
1325 mipLevelSize(mipLevel, dimensions[0]),-
1326 1,-
1327 format, dataSize, data, options);-
1328 }
never executed: end of block
0
1329 break;
never executed: break;
0
1330-
1331 case
never executed: case QOpenGLTexture::Target2D:
QOpenGLTexture::Target2D:
never executed: case QOpenGLTexture::Target2D:
0
1332 (void)layer;;-
1333 (void)cubeFace;;-
1334 if (needsFullSpec
needsFullSpecDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1335 texFuncs->glCompressedTextureImage2D(textureId, target, bindingTarget, mipLevel,-
1336 format,-
1337 mipLevelSize(mipLevel, dimensions[0]),-
1338 mipLevelSize(mipLevel, dimensions[1]),-
1339 0, dataSize, data, options);-
1340 }
never executed: end of block
else {
0
1341 texFuncs->glCompressedTextureSubImage2D(textureId, target, bindingTarget, mipLevel,-
1342 0, 0,-
1343 mipLevelSize(mipLevel, dimensions[0]),-
1344 mipLevelSize(mipLevel, dimensions[1]),-
1345 format, dataSize, data, options);-
1346 }
never executed: end of block
0
1347 break;
never executed: break;
0
1348-
1349 case
never executed: case QOpenGLTexture::Target2DArray:
QOpenGLTexture::Target2DArray:
never executed: case QOpenGLTexture::Target2DArray:
0
1350 (void)cubeFace;;-
1351 if (!needsFullSpec
!needsFullSpecDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1352 texFuncs->glCompressedTextureSubImage3D(textureId, target, bindingTarget, mipLevel,-
1353 0, 0, layer,-
1354 mipLevelSize(mipLevel, dimensions[0]),-
1355 mipLevelSize(mipLevel, dimensions[1]),-
1356 1,-
1357 format, dataSize, data, options);-
1358 }
never executed: end of block
0
1359 break;
never executed: break;
0
1360-
1361 case
never executed: case QOpenGLTexture::Target3D:
QOpenGLTexture::Target3D:
never executed: case QOpenGLTexture::Target3D:
0
1362 (void)cubeFace;;-
1363 if (needsFullSpec
needsFullSpecDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1364 texFuncs->glCompressedTextureImage3D(textureId, target, bindingTarget, mipLevel,-
1365 format,-
1366 mipLevelSize(mipLevel, dimensions[0]),-
1367 mipLevelSize(mipLevel, dimensions[1]),-
1368 mipLevelSize(mipLevel, dimensions[2]),-
1369 0, dataSize, data, options);-
1370 }
never executed: end of block
else {
0
1371 texFuncs->glCompressedTextureSubImage3D(textureId, target, bindingTarget, mipLevel,-
1372 0, 0, layer,-
1373 mipLevelSize(mipLevel, dimensions[0]),-
1374 mipLevelSize(mipLevel, dimensions[1]),-
1375 mipLevelSize(mipLevel, dimensions[2]),-
1376 format, dataSize, data, options);-
1377 }
never executed: end of block
0
1378 break;
never executed: break;
0
1379-
1380 case
never executed: case QOpenGLTexture::TargetCubeMap:
QOpenGLTexture::TargetCubeMap:
never executed: case QOpenGLTexture::TargetCubeMap:
0
1381 (void)layer;;-
1382 if (needsFullSpec
needsFullSpecDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1383 texFuncs->glCompressedTextureImage2D(textureId, cubeFace, bindingTarget, mipLevel,-
1384 format,-
1385 mipLevelSize(mipLevel, dimensions[0]),-
1386 mipLevelSize(mipLevel, dimensions[1]),-
1387 0, dataSize, data, options);-
1388 }
never executed: end of block
else {
0
1389 texFuncs->glCompressedTextureSubImage2D(textureId, cubeFace, bindingTarget, mipLevel,-
1390 0, 0,-
1391 mipLevelSize(mipLevel, dimensions[0]),-
1392 mipLevelSize(mipLevel, dimensions[1]),-
1393 format, dataSize, data, options);-
1394 }
never executed: end of block
0
1395 break;
never executed: break;
0
1396-
1397 case
never executed: case QOpenGLTexture::TargetCubeMapArray:
QOpenGLTexture::TargetCubeMapArray:
never executed: case QOpenGLTexture::TargetCubeMapArray:
{
0
1398 int faceIndex = cubeFace - QOpenGLTexture::CubeMapPositiveX;-
1399 int layerFace = 6 * layer + faceIndex;-
1400 if (!needsFullSpec
!needsFullSpecDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1401 texFuncs->glCompressedTextureSubImage3D(textureId, target, bindingTarget, mipLevel,-
1402 0, 0, layerFace,-
1403 mipLevelSize(mipLevel, dimensions[0]),-
1404 mipLevelSize(mipLevel, dimensions[1]),-
1405 1,-
1406 format, dataSize, data, options);-
1407 }
never executed: end of block
0
1408 break;
never executed: break;
0
1409 }-
1410-
1411 case
never executed: case QOpenGLTexture::TargetRectangle:
QOpenGLTexture::TargetRectangle:
never executed: case QOpenGLTexture::TargetRectangle:
0
1412 case
never executed: case QOpenGLTexture::Target2DMultisample:
QOpenGLTexture::Target2DMultisample:
never executed: case QOpenGLTexture::Target2DMultisample:
0
1413 case
never executed: case QOpenGLTexture::Target2DMultisampleArray:
QOpenGLTexture::Target2DMultisampleArray:
never executed: case QOpenGLTexture::Target2DMultisampleArray:
0
1414 case
never executed: case QOpenGLTexture::TargetBuffer:
QOpenGLTexture::TargetBuffer:
never executed: case QOpenGLTexture::TargetBuffer:
0
1415-
1416 QMessageLogger(__FILE__, 1462, __PRETTY_FUNCTION__).warning("QOpenGLTexture::setCompressedData(): Texture target does not support pixel data upload");-
1417 break;
never executed: break;
0
1418 }-
1419-
1420-
1421 if (mipLevel == 0
mipLevel == 0Description
TRUEnever evaluated
FALSEnever evaluated
&& autoGenerateMipMaps
autoGenerateMipMapsDescription
TRUEnever evaluated
FALSEnever evaluated
&& mipLevels > 1
mipLevels > 1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1422 QOpenGLTexture * const q = q_func();-
1423 q->generateMipMaps();-
1424 }
never executed: end of block
0
1425}
never executed: end of block
0
1426-
1427void QOpenGLTexturePrivate::setWrapMode(QOpenGLTexture::WrapMode mode)-
1428{-
1429 switch (target) {-
1430 case
never executed: case QOpenGLTexture::Target1D:
QOpenGLTexture::Target1D:
never executed: case QOpenGLTexture::Target1D:
0
1431 case
never executed: case QOpenGLTexture::Target1DArray:
QOpenGLTexture::Target1DArray:
never executed: case QOpenGLTexture::Target1DArray:
0
1432 case
never executed: case QOpenGLTexture::TargetBuffer:
QOpenGLTexture::TargetBuffer:
never executed: case QOpenGLTexture::TargetBuffer:
0
1433 wrapModes[0] = mode;-
1434 texFuncs->glTextureParameteri(textureId, target, bindingTarget, 0x2802, mode);-
1435 break;
never executed: break;
0
1436-
1437 case
never executed: case QOpenGLTexture::Target2D:
QOpenGLTexture::Target2D:
never executed: case QOpenGLTexture::Target2D:
0
1438 case
never executed: case QOpenGLTexture::Target2DArray:
QOpenGLTexture::Target2DArray:
never executed: case QOpenGLTexture::Target2DArray:
0
1439 case
never executed: case QOpenGLTexture::TargetCubeMap:
QOpenGLTexture::TargetCubeMap:
never executed: case QOpenGLTexture::TargetCubeMap:
0
1440 case
never executed: case QOpenGLTexture::TargetCubeMapArray:
QOpenGLTexture::TargetCubeMapArray:
never executed: case QOpenGLTexture::TargetCubeMapArray:
0
1441 case
never executed: case QOpenGLTexture::Target2DMultisample:
QOpenGLTexture::Target2DMultisample:
never executed: case QOpenGLTexture::Target2DMultisample:
0
1442 case
never executed: case QOpenGLTexture::Target2DMultisampleArray:
QOpenGLTexture::Target2DMultisampleArray:
never executed: case QOpenGLTexture::Target2DMultisampleArray:
0
1443 case
never executed: case QOpenGLTexture::TargetRectangle:
QOpenGLTexture::TargetRectangle:
never executed: case QOpenGLTexture::TargetRectangle:
0
1444 wrapModes[0] = wrapModes[1] = mode;-
1445 texFuncs->glTextureParameteri(textureId, target, bindingTarget, 0x2802, mode);-
1446 texFuncs->glTextureParameteri(textureId, target, bindingTarget, 0x2803, mode);-
1447 break;
never executed: break;
0
1448-
1449 case
never executed: case QOpenGLTexture::Target3D:
QOpenGLTexture::Target3D:
never executed: case QOpenGLTexture::Target3D:
0
1450 wrapModes[0] = wrapModes[1] = wrapModes[2] = mode;-
1451 texFuncs->glTextureParameteri(textureId, target, bindingTarget, 0x2802, mode);-
1452 texFuncs->glTextureParameteri(textureId, target, bindingTarget, 0x2803, mode);-
1453 texFuncs->glTextureParameteri(textureId, target, bindingTarget, 0x8072, mode);-
1454 break;
never executed: break;
0
1455 }-
1456}
never executed: end of block
0
1457-
1458void QOpenGLTexturePrivate::setWrapMode(QOpenGLTexture::CoordinateDirection direction, QOpenGLTexture::WrapMode mode)-
1459{-
1460 switch (target) {-
1461 case
never executed: case QOpenGLTexture::Target1D:
QOpenGLTexture::Target1D:
never executed: case QOpenGLTexture::Target1D:
0
1462 case
never executed: case QOpenGLTexture::Target1DArray:
QOpenGLTexture::Target1DArray:
never executed: case QOpenGLTexture::Target1DArray:
0
1463 case
never executed: case QOpenGLTexture::TargetBuffer:
QOpenGLTexture::TargetBuffer:
never executed: case QOpenGLTexture::TargetBuffer:
0
1464 switch (direction) {-
1465 case
never executed: case QOpenGLTexture::DirectionS:
QOpenGLTexture::DirectionS:
never executed: case QOpenGLTexture::DirectionS:
0
1466 wrapModes[0] = mode;-
1467 texFuncs->glTextureParameteri(textureId, target, bindingTarget, 0x2802, mode);-
1468 break;
never executed: break;
0
1469-
1470 case
never executed: case QOpenGLTexture::DirectionT:
QOpenGLTexture::DirectionT:
never executed: case QOpenGLTexture::DirectionT:
0
1471 case
never executed: case QOpenGLTexture::DirectionR:
QOpenGLTexture::DirectionR:
never executed: case QOpenGLTexture::DirectionR:
0
1472 QMessageLogger(__FILE__, 1518, __PRETTY_FUNCTION__).warning("QOpenGLTexture::setWrapMode() direction not valid for this texture target");-
1473 break;
never executed: break;
0
1474 }-
1475 break;
never executed: break;
0
1476-
1477 case
never executed: case QOpenGLTexture::Target2D:
QOpenGLTexture::Target2D:
never executed: case QOpenGLTexture::Target2D:
0
1478 case
never executed: case QOpenGLTexture::Target2DArray:
QOpenGLTexture::Target2DArray:
never executed: case QOpenGLTexture::Target2DArray:
0
1479 case
never executed: case QOpenGLTexture::TargetCubeMap:
QOpenGLTexture::TargetCubeMap:
never executed: case QOpenGLTexture::TargetCubeMap:
0
1480 case
never executed: case QOpenGLTexture::TargetCubeMapArray:
QOpenGLTexture::TargetCubeMapArray:
never executed: case QOpenGLTexture::TargetCubeMapArray:
0
1481 case
never executed: case QOpenGLTexture::Target2DMultisample:
QOpenGLTexture::Target2DMultisample:
never executed: case QOpenGLTexture::Target2DMultisample:
0
1482 case
never executed: case QOpenGLTexture::Target2DMultisampleArray:
QOpenGLTexture::Target2DMultisampleArray:
never executed: case QOpenGLTexture::Target2DMultisampleArray:
0
1483 case
never executed: case QOpenGLTexture::TargetRectangle:
QOpenGLTexture::TargetRectangle:
never executed: case QOpenGLTexture::TargetRectangle:
0
1484 switch (direction) {-
1485 case
never executed: case QOpenGLTexture::DirectionS:
QOpenGLTexture::DirectionS:
never executed: case QOpenGLTexture::DirectionS:
0
1486 wrapModes[0] = mode;-
1487 texFuncs->glTextureParameteri(textureId, target, bindingTarget, 0x2802, mode);-
1488 break;
never executed: break;
0
1489-
1490 case
never executed: case QOpenGLTexture::DirectionT:
QOpenGLTexture::DirectionT:
never executed: case QOpenGLTexture::DirectionT:
0
1491 wrapModes[1] = mode;-
1492 texFuncs->glTextureParameteri(textureId, target, bindingTarget, 0x2803, mode);-
1493 break;
never executed: break;
0
1494-
1495 case
never executed: case QOpenGLTexture::DirectionR:
QOpenGLTexture::DirectionR:
never executed: case QOpenGLTexture::DirectionR:
0
1496 QMessageLogger(__FILE__, 1542, __PRETTY_FUNCTION__).warning("QOpenGLTexture::setWrapMode() direction not valid for this texture target");-
1497 break;
never executed: break;
0
1498 }-
1499 break;
never executed: break;
0
1500-
1501 case
never executed: case QOpenGLTexture::Target3D:
QOpenGLTexture::Target3D:
never executed: case QOpenGLTexture::Target3D:
0
1502 switch (direction) {-
1503 case
never executed: case QOpenGLTexture::DirectionS:
QOpenGLTexture::DirectionS:
never executed: case QOpenGLTexture::DirectionS:
0
1504 wrapModes[0] = mode;-
1505 texFuncs->glTextureParameteri(textureId, target, bindingTarget, direction, mode);-
1506 break;
never executed: break;
0
1507-
1508 case
never executed: case QOpenGLTexture::DirectionT:
QOpenGLTexture::DirectionT:
never executed: case QOpenGLTexture::DirectionT:
0
1509 wrapModes[1] = mode;-
1510 texFuncs->glTextureParameteri(textureId, target, bindingTarget, direction, mode);-
1511 break;
never executed: break;
0
1512-
1513 case
never executed: case QOpenGLTexture::DirectionR:
QOpenGLTexture::DirectionR:
never executed: case QOpenGLTexture::DirectionR:
0
1514 wrapModes[2] = mode;-
1515 texFuncs->glTextureParameteri(textureId, target, bindingTarget, direction, mode);-
1516 break;
never executed: break;
0
1517 }-
1518 break;
never executed: break;
0
1519 }-
1520}
never executed: end of block
0
1521-
1522QOpenGLTexture::WrapMode QOpenGLTexturePrivate::wrapMode(QOpenGLTexture::CoordinateDirection direction) const-
1523{-
1524 switch (target) {-
1525 case
never executed: case QOpenGLTexture::Target1D:
QOpenGLTexture::Target1D:
never executed: case QOpenGLTexture::Target1D:
0
1526 case
never executed: case QOpenGLTexture::Target1DArray:
QOpenGLTexture::Target1DArray:
never executed: case QOpenGLTexture::Target1DArray:
0
1527 case
never executed: case QOpenGLTexture::TargetBuffer:
QOpenGLTexture::TargetBuffer:
never executed: case QOpenGLTexture::TargetBuffer:
0
1528 switch (direction) {-
1529 case
never executed: case QOpenGLTexture::DirectionS:
QOpenGLTexture::DirectionS:
never executed: case QOpenGLTexture::DirectionS:
0
1530 return
never executed: return wrapModes[0];
wrapModes[0];
never executed: return wrapModes[0];
0
1531-
1532 case
never executed: case QOpenGLTexture::DirectionT:
QOpenGLTexture::DirectionT:
never executed: case QOpenGLTexture::DirectionT:
0
1533 case
never executed: case QOpenGLTexture::DirectionR:
QOpenGLTexture::DirectionR:
never executed: case QOpenGLTexture::DirectionR:
0
1534 QMessageLogger(__FILE__, 1580, __PRETTY_FUNCTION__).warning("QOpenGLTexture::wrapMode() direction not valid for this texture target");-
1535 return
never executed: return QOpenGLTexture::Repeat;
QOpenGLTexture::Repeat;
never executed: return QOpenGLTexture::Repeat;
0
1536 }-
1537 break;
never executed: break;
0
1538-
1539 case
never executed: case QOpenGLTexture::Target2D:
QOpenGLTexture::Target2D:
never executed: case QOpenGLTexture::Target2D:
0
1540 case
never executed: case QOpenGLTexture::Target2DArray:
QOpenGLTexture::Target2DArray:
never executed: case QOpenGLTexture::Target2DArray:
0
1541 case
never executed: case QOpenGLTexture::TargetCubeMap:
QOpenGLTexture::TargetCubeMap:
never executed: case QOpenGLTexture::TargetCubeMap:
0
1542 case
never executed: case QOpenGLTexture::TargetCubeMapArray:
QOpenGLTexture::TargetCubeMapArray:
never executed: case QOpenGLTexture::TargetCubeMapArray:
0
1543 case
never executed: case QOpenGLTexture::Target2DMultisample:
QOpenGLTexture::Target2DMultisample:
never executed: case QOpenGLTexture::Target2DMultisample:
0
1544 case
never executed: case QOpenGLTexture::Target2DMultisampleArray:
QOpenGLTexture::Target2DMultisampleArray:
never executed: case QOpenGLTexture::Target2DMultisampleArray:
0
1545 case
never executed: case QOpenGLTexture::TargetRectangle:
QOpenGLTexture::TargetRectangle:
never executed: case QOpenGLTexture::TargetRectangle:
0
1546 switch (direction) {-
1547 case
never executed: case QOpenGLTexture::DirectionS:
QOpenGLTexture::DirectionS:
never executed: case QOpenGLTexture::DirectionS:
0
1548 return
never executed: return wrapModes[0];
wrapModes[0];
never executed: return wrapModes[0];
0
1549-
1550 case
never executed: case QOpenGLTexture::DirectionT:
QOpenGLTexture::DirectionT:
never executed: case QOpenGLTexture::DirectionT:
0
1551 return
never executed: return wrapModes[1];
wrapModes[1];
never executed: return wrapModes[1];
0
1552-
1553 case
never executed: case QOpenGLTexture::DirectionR:
QOpenGLTexture::DirectionR:
never executed: case QOpenGLTexture::DirectionR:
0
1554 QMessageLogger(__FILE__, 1600, __PRETTY_FUNCTION__).warning("QOpenGLTexture::wrapMode() direction not valid for this texture target");-
1555 return
never executed: return QOpenGLTexture::Repeat;
QOpenGLTexture::Repeat;
never executed: return QOpenGLTexture::Repeat;
0
1556 }-
1557 break;
never executed: break;
0
1558-
1559 case
never executed: case QOpenGLTexture::Target3D:
QOpenGLTexture::Target3D:
never executed: case QOpenGLTexture::Target3D:
0
1560 switch (direction) {-
1561 case
never executed: case QOpenGLTexture::DirectionS:
QOpenGLTexture::DirectionS:
never executed: case QOpenGLTexture::DirectionS:
0
1562 return
never executed: return wrapModes[0];
wrapModes[0];
never executed: return wrapModes[0];
0
1563-
1564 case
never executed: case QOpenGLTexture::DirectionT:
QOpenGLTexture::DirectionT:
never executed: case QOpenGLTexture::DirectionT:
0
1565 return
never executed: return wrapModes[1];
wrapModes[1];
never executed: return wrapModes[1];
0
1566-
1567 case
never executed: case QOpenGLTexture::DirectionR:
QOpenGLTexture::DirectionR:
never executed: case QOpenGLTexture::DirectionR:
0
1568 return
never executed: return wrapModes[2];
wrapModes[2];
never executed: return wrapModes[2];
0
1569 }-
1570 break;
never executed: break;
0
1571 }-
1572-
1573 ((!(false)) ? qt_assert("false",__FILE__,1619) : qt_noop());-
1574 return
never executed: return QOpenGLTexture::Repeat;
QOpenGLTexture::Repeat;
never executed: return QOpenGLTexture::Repeat;
0
1575}-
1576-
1577QOpenGLTexture *QOpenGLTexturePrivate::createTextureView(QOpenGLTexture::Target viewTarget,-
1578 QOpenGLTexture::TextureFormat viewFormat,-
1579 int minimumMipmapLevel, int maximumMipmapLevel,-
1580 int minimumLayer, int maximumLayer) const-
1581{-
1582-
1583-
1584-
1585 bool viewTargetCompatible = false;-
1586 switch (target) {-
1587 case
never executed: case QOpenGLTexture::Target1D:
QOpenGLTexture::Target1D:
never executed: case QOpenGLTexture::Target1D:
0
1588 case
never executed: case QOpenGLTexture::Target1DArray:
QOpenGLTexture::Target1DArray:
never executed: case QOpenGLTexture::Target1DArray:
0
1589 viewTargetCompatible = (viewTarget == QOpenGLTexture::Target1D
viewTarget == ...ture::Target1DDescription
TRUEnever evaluated
FALSEnever evaluated
0
1590 || viewTarget == QOpenGLTexture::Target1DArray
viewTarget == ...:Target1DArrayDescription
TRUEnever evaluated
FALSEnever evaluated
);
0
1591 break;
never executed: break;
0
1592-
1593-
1594 case
never executed: case QOpenGLTexture::Target2D:
QOpenGLTexture::Target2D:
never executed: case QOpenGLTexture::Target2D:
0
1595 case
never executed: case QOpenGLTexture::Target2DArray:
QOpenGLTexture::Target2DArray:
never executed: case QOpenGLTexture::Target2DArray:
0
1596 viewTargetCompatible = (viewTarget == QOpenGLTexture::Target2D
viewTarget == ...ture::Target2DDescription
TRUEnever evaluated
FALSEnever evaluated
0
1597 || viewTarget == QOpenGLTexture::Target2DArray
viewTarget == ...:Target2DArrayDescription
TRUEnever evaluated
FALSEnever evaluated
);
0
1598 break;
never executed: break;
0
1599-
1600 case
never executed: case QOpenGLTexture::Target3D:
QOpenGLTexture::Target3D:
never executed: case QOpenGLTexture::Target3D:
0
1601 viewTargetCompatible = (viewTarget == QOpenGLTexture::Target3D);-
1602 break;
never executed: break;
0
1603-
1604 case
never executed: case QOpenGLTexture::TargetCubeMap:
QOpenGLTexture::TargetCubeMap:
never executed: case QOpenGLTexture::TargetCubeMap:
0
1605 case
never executed: case QOpenGLTexture::TargetCubeMapArray:
QOpenGLTexture::TargetCubeMapArray:
never executed: case QOpenGLTexture::TargetCubeMapArray:
0
1606 viewTargetCompatible = (viewTarget == QOpenGLTexture::TargetCubeMap
viewTarget == ...:TargetCubeMapDescription
TRUEnever evaluated
FALSEnever evaluated
0
1607 || viewTarget == QOpenGLTexture::Target2D
viewTarget == ...ture::Target2DDescription
TRUEnever evaluated
FALSEnever evaluated
0
1608 || viewTarget == QOpenGLTexture::Target2DArray
viewTarget == ...:Target2DArrayDescription
TRUEnever evaluated
FALSEnever evaluated
0
1609 || viewTarget == QOpenGLTexture::TargetCubeMapArray
viewTarget == ...etCubeMapArrayDescription
TRUEnever evaluated
FALSEnever evaluated
);
0
1610 break;
never executed: break;
0
1611-
1612 case
never executed: case QOpenGLTexture::Target2DMultisample:
QOpenGLTexture::Target2DMultisample:
never executed: case QOpenGLTexture::Target2DMultisample:
0
1613 case
never executed: case QOpenGLTexture::Target2DMultisampleArray:
QOpenGLTexture::Target2DMultisampleArray:
never executed: case QOpenGLTexture::Target2DMultisampleArray:
0
1614 viewTargetCompatible = (viewTarget == QOpenGLTexture::Target2DMultisample
viewTarget == ...t2DMultisampleDescription
TRUEnever evaluated
FALSEnever evaluated
0
1615 || viewTarget == QOpenGLTexture::Target2DMultisampleArray
viewTarget == ...ltisampleArrayDescription
TRUEnever evaluated
FALSEnever evaluated
);
0
1616 break;
never executed: break;
0
1617-
1618 case
never executed: case QOpenGLTexture::TargetRectangle:
QOpenGLTexture::TargetRectangle:
never executed: case QOpenGLTexture::TargetRectangle:
0
1619 viewTargetCompatible = (viewTarget == QOpenGLTexture::TargetRectangle);-
1620 break;
never executed: break;
0
1621-
1622 case
never executed: case QOpenGLTexture::TargetBuffer:
QOpenGLTexture::TargetBuffer:
never executed: case QOpenGLTexture::TargetBuffer:
0
1623-
1624 break;
never executed: break;
0
1625 }-
1626-
1627 if (!viewTargetCompatible
!viewTargetCompatibleDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1628 QMessageLogger(__FILE__, 1674, __PRETTY_FUNCTION__).warning("QOpenGLTexture::createTextureView(): Incompatible source and view targets");-
1629 return
never executed: return 0;
0;
never executed: return 0;
0
1630 }-
1631-
1632-
1633 bool viewFormatCompatible = false;-
1634 switch (formatClass) {-
1635 case
never executed: case QOpenGLTexture::NoFormatClass:
QOpenGLTexture::NoFormatClass:
never executed: case QOpenGLTexture::NoFormatClass:
0
1636 break;
never executed: break;
0
1637-
1638 case
never executed: case QOpenGLTexture::FormatClass_128Bit:
QOpenGLTexture::FormatClass_128Bit:
never executed: case QOpenGLTexture::FormatClass_128Bit:
0
1639 viewFormatCompatible = (viewFormat == QOpenGLTexture::RGBA32F
viewFormat == ...xture::RGBA32FDescription
TRUEnever evaluated
FALSEnever evaluated
0
1640 || viewFormat == QOpenGLTexture::RGBA32U
viewFormat == ...xture::RGBA32UDescription
TRUEnever evaluated
FALSEnever evaluated
0
1641 || viewFormat == QOpenGLTexture::RGBA32I
viewFormat == ...xture::RGBA32IDescription
TRUEnever evaluated
FALSEnever evaluated
);
0
1642 break;
never executed: break;
0
1643-
1644 case
never executed: case QOpenGLTexture::FormatClass_96Bit:
QOpenGLTexture::FormatClass_96Bit:
never executed: case QOpenGLTexture::FormatClass_96Bit:
0
1645 viewFormatCompatible = (viewFormat == QOpenGLTexture::RGB32F
viewFormat == ...exture::RGB32FDescription
TRUEnever evaluated
FALSEnever evaluated
0
1646 || viewFormat == QOpenGLTexture::RGB32U
viewFormat == ...exture::RGB32UDescription
TRUEnever evaluated
FALSEnever evaluated
0
1647 || viewFormat == QOpenGLTexture::RGB32I
viewFormat == ...exture::RGB32IDescription
TRUEnever evaluated
FALSEnever evaluated
);
0
1648 break;
never executed: break;
0
1649-
1650 case
never executed: case QOpenGLTexture::FormatClass_64Bit:
QOpenGLTexture::FormatClass_64Bit:
never executed: case QOpenGLTexture::FormatClass_64Bit:
0
1651 viewFormatCompatible = (viewFormat == QOpenGLTexture::RGBA16F
viewFormat == ...xture::RGBA16FDescription
TRUEnever evaluated
FALSEnever evaluated
0
1652 || viewFormat == QOpenGLTexture::RG32F
viewFormat == ...Texture::RG32FDescription
TRUEnever evaluated
FALSEnever evaluated
0
1653 || viewFormat == QOpenGLTexture::RGBA16U
viewFormat == ...xture::RGBA16UDescription
TRUEnever evaluated
FALSEnever evaluated
0
1654 || viewFormat == QOpenGLTexture::RG32U
viewFormat == ...Texture::RG32UDescription
TRUEnever evaluated
FALSEnever evaluated
0
1655 || viewFormat == QOpenGLTexture::RGBA16I
viewFormat == ...xture::RGBA16IDescription
TRUEnever evaluated
FALSEnever evaluated
0
1656 || viewFormat == QOpenGLTexture::RG32I
viewFormat == ...Texture::RG32IDescription
TRUEnever evaluated
FALSEnever evaluated
0
1657 || viewFormat == QOpenGLTexture::RGBA16_UNorm
viewFormat == ...::RGBA16_UNormDescription
TRUEnever evaluated
FALSEnever evaluated
0
1658 || viewFormat == QOpenGLTexture::RGBA16_SNorm
viewFormat == ...::RGBA16_SNormDescription
TRUEnever evaluated
FALSEnever evaluated
);
0
1659 break;
never executed: break;
0
1660-
1661 case
never executed: case QOpenGLTexture::FormatClass_48Bit:
QOpenGLTexture::FormatClass_48Bit:
never executed: case QOpenGLTexture::FormatClass_48Bit:
0
1662 viewFormatCompatible = (viewFormat == QOpenGLTexture::RGB16_UNorm
viewFormat == ...e::RGB16_UNormDescription
TRUEnever evaluated
FALSEnever evaluated
0
1663 || viewFormat == QOpenGLTexture::RGB16_SNorm
viewFormat == ...e::RGB16_SNormDescription
TRUEnever evaluated
FALSEnever evaluated
0
1664 || viewFormat == QOpenGLTexture::RGB16F
viewFormat == ...exture::RGB16FDescription
TRUEnever evaluated
FALSEnever evaluated
0
1665 || viewFormat == QOpenGLTexture::RGB16U
viewFormat == ...exture::RGB16UDescription
TRUEnever evaluated
FALSEnever evaluated
0
1666 || viewFormat == QOpenGLTexture::RGB16I
viewFormat == ...exture::RGB16IDescription
TRUEnever evaluated
FALSEnever evaluated
);
0
1667 break;
never executed: break;
0
1668-
1669 case
never executed: case QOpenGLTexture::FormatClass_32Bit:
QOpenGLTexture::FormatClass_32Bit:
never executed: case QOpenGLTexture::FormatClass_32Bit:
0
1670 viewFormatCompatible = (viewFormat == QOpenGLTexture::RG16F
viewFormat == ...Texture::RG16FDescription
TRUEnever evaluated
FALSEnever evaluated
0
1671 || viewFormat == QOpenGLTexture::RG11B10F
viewFormat == ...ture::RG11B10FDescription
TRUEnever evaluated
FALSEnever evaluated
0
1672 || viewFormat == QOpenGLTexture::R32F
viewFormat == ...LTexture::R32FDescription
TRUEnever evaluated
FALSEnever evaluated
0
1673 || viewFormat == QOpenGLTexture::RGB10A2
viewFormat == ...xture::RGB10A2Description
TRUEnever evaluated
FALSEnever evaluated
0
1674 || viewFormat == QOpenGLTexture::RGBA8U
viewFormat == ...exture::RGBA8UDescription
TRUEnever evaluated
FALSEnever evaluated
0
1675 || viewFormat == QOpenGLTexture::RG16U
viewFormat == ...Texture::RG16UDescription
TRUEnever evaluated
FALSEnever evaluated
0
1676 || viewFormat == QOpenGLTexture::R32U
viewFormat == ...LTexture::R32UDescription
TRUEnever evaluated
FALSEnever evaluated
0
1677 || viewFormat == QOpenGLTexture::RGBA8I
viewFormat == ...exture::RGBA8IDescription
TRUEnever evaluated
FALSEnever evaluated
0
1678 || viewFormat == QOpenGLTexture::RG16I
viewFormat == ...Texture::RG16IDescription
TRUEnever evaluated
FALSEnever evaluated
0
1679 || viewFormat == QOpenGLTexture::R32I
viewFormat == ...LTexture::R32IDescription
TRUEnever evaluated
FALSEnever evaluated
0
1680 || viewFormat == QOpenGLTexture::RGBA8_UNorm
viewFormat == ...e::RGBA8_UNormDescription
TRUEnever evaluated
FALSEnever evaluated
0
1681 || viewFormat == QOpenGLTexture::RG16_UNorm
viewFormat == ...re::RG16_UNormDescription
TRUEnever evaluated
FALSEnever evaluated
0
1682 || viewFormat == QOpenGLTexture::RGBA8_SNorm
viewFormat == ...e::RGBA8_SNormDescription
TRUEnever evaluated
FALSEnever evaluated
0
1683 || viewFormat == QOpenGLTexture::RG16_SNorm
viewFormat == ...re::RG16_SNormDescription
TRUEnever evaluated
FALSEnever evaluated
0
1684 || viewFormat == QOpenGLTexture::SRGB8_Alpha8
viewFormat == ...::SRGB8_Alpha8Description
TRUEnever evaluated
FALSEnever evaluated
0
1685 || viewFormat == QOpenGLTexture::RGB9E5
viewFormat == ...exture::RGB9E5Description
TRUEnever evaluated
FALSEnever evaluated
);
0
1686 break;
never executed: break;
0
1687-
1688 case
never executed: case QOpenGLTexture::FormatClass_24Bit:
QOpenGLTexture::FormatClass_24Bit:
never executed: case QOpenGLTexture::FormatClass_24Bit:
0
1689 viewFormatCompatible = (viewFormat == QOpenGLTexture::RGB8_UNorm
viewFormat == ...re::RGB8_UNormDescription
TRUEnever evaluated
FALSEnever evaluated
0
1690 || viewFormat == QOpenGLTexture::RGB8_SNorm
viewFormat == ...re::RGB8_SNormDescription
TRUEnever evaluated
FALSEnever evaluated
0
1691 || viewFormat == QOpenGLTexture::SRGB8
viewFormat == ...Texture::SRGB8Description
TRUEnever evaluated
FALSEnever evaluated
0
1692 || viewFormat == QOpenGLTexture::RGB8U
viewFormat == ...Texture::RGB8UDescription
TRUEnever evaluated
FALSEnever evaluated
0
1693 || viewFormat == QOpenGLTexture::RGB8I
viewFormat == ...Texture::RGB8IDescription
TRUEnever evaluated
FALSEnever evaluated
);
0
1694 break;
never executed: break;
0
1695-
1696 case
never executed: case QOpenGLTexture::FormatClass_16Bit:
QOpenGLTexture::FormatClass_16Bit:
never executed: case QOpenGLTexture::FormatClass_16Bit:
0
1697 viewFormatCompatible = (viewFormat == QOpenGLTexture::R16F
viewFormat == ...LTexture::R16FDescription
TRUEnever evaluated
FALSEnever evaluated
0
1698 || viewFormat == QOpenGLTexture::RG8U
viewFormat == ...LTexture::RG8UDescription
TRUEnever evaluated
FALSEnever evaluated
0
1699 || viewFormat == QOpenGLTexture::R16U
viewFormat == ...LTexture::R16UDescription
TRUEnever evaluated
FALSEnever evaluated
0
1700 || viewFormat == QOpenGLTexture::RG8I
viewFormat == ...LTexture::RG8IDescription
TRUEnever evaluated
FALSEnever evaluated
0
1701 || viewFormat == QOpenGLTexture::R16I
viewFormat == ...LTexture::R16IDescription
TRUEnever evaluated
FALSEnever evaluated
0
1702 || viewFormat == QOpenGLTexture::RG8_UNorm
viewFormat == ...ure::RG8_UNormDescription
TRUEnever evaluated
FALSEnever evaluated
0
1703 || viewFormat == QOpenGLTexture::R16_UNorm
viewFormat == ...ure::R16_UNormDescription
TRUEnever evaluated
FALSEnever evaluated
0
1704 || viewFormat == QOpenGLTexture::RG8_SNorm
viewFormat == ...ure::RG8_SNormDescription
TRUEnever evaluated
FALSEnever evaluated
0
1705 || viewFormat == QOpenGLTexture::R16_SNorm
viewFormat == ...ure::R16_SNormDescription
TRUEnever evaluated
FALSEnever evaluated
);
0
1706 break;
never executed: break;
0
1707-
1708 case
never executed: case QOpenGLTexture::FormatClass_8Bit:
QOpenGLTexture::FormatClass_8Bit:
never executed: case QOpenGLTexture::FormatClass_8Bit:
0
1709 viewFormatCompatible = (viewFormat == QOpenGLTexture::R8U
viewFormat == ...GLTexture::R8UDescription
TRUEnever evaluated
FALSEnever evaluated
0
1710 || viewFormat == QOpenGLTexture::R8I
viewFormat == ...GLTexture::R8IDescription
TRUEnever evaluated
FALSEnever evaluated
0
1711 || viewFormat == QOpenGLTexture::R8_UNorm
viewFormat == ...ture::R8_UNormDescription
TRUEnever evaluated
FALSEnever evaluated
0
1712 || viewFormat == QOpenGLTexture::R8_SNorm
viewFormat == ...ture::R8_SNormDescription
TRUEnever evaluated
FALSEnever evaluated
);
0
1713 break;
never executed: break;
0
1714-
1715 case
never executed: case QOpenGLTexture::FormatClass_RGTC1_R:
QOpenGLTexture::FormatClass_RGTC1_R:
never executed: case QOpenGLTexture::FormatClass_RGTC1_R:
0
1716 viewFormatCompatible = (viewFormat == QOpenGLTexture::R_ATI1N_UNorm
viewFormat == ...:R_ATI1N_UNormDescription
TRUEnever evaluated
FALSEnever evaluated
0
1717 || viewFormat == QOpenGLTexture::R_ATI1N_SNorm
viewFormat == ...:R_ATI1N_SNormDescription
TRUEnever evaluated
FALSEnever evaluated
);
0
1718 break;
never executed: break;
0
1719-
1720 case
never executed: case QOpenGLTexture::FormatClass_RGTC2_RG:
QOpenGLTexture::FormatClass_RGTC2_RG:
never executed: case QOpenGLTexture::FormatClass_RGTC2_RG:
0
1721 viewFormatCompatible = (viewFormat == QOpenGLTexture::RG_ATI2N_UNorm
viewFormat == ...RG_ATI2N_UNormDescription
TRUEnever evaluated
FALSEnever evaluated
0
1722 || viewFormat == QOpenGLTexture::RG_ATI2N_SNorm
viewFormat == ...RG_ATI2N_SNormDescription
TRUEnever evaluated
FALSEnever evaluated
);
0
1723 break;
never executed: break;
0
1724-
1725 case
never executed: case QOpenGLTexture::FormatClass_BPTC_Unorm:
QOpenGLTexture::FormatClass_BPTC_Unorm:
never executed: case QOpenGLTexture::FormatClass_BPTC_Unorm:
0
1726 viewFormatCompatible = (viewFormat == QOpenGLTexture::RGB_BP_UNorm
viewFormat == ...::RGB_BP_UNormDescription
TRUEnever evaluated
FALSEnever evaluated
0
1727 || viewFormat == QOpenGLTexture::SRGB_BP_UNorm
viewFormat == ...:SRGB_BP_UNormDescription
TRUEnever evaluated
FALSEnever evaluated
);
0
1728 break;
never executed: break;
0
1729-
1730 case
never executed: case QOpenGLTexture::FormatClass_BPTC_Float:
QOpenGLTexture::FormatClass_BPTC_Float:
never executed: case QOpenGLTexture::FormatClass_BPTC_Float:
0
1731 viewFormatCompatible = (viewFormat == QOpenGLTexture::RGB_BP_UNSIGNED_FLOAT
viewFormat == ...UNSIGNED_FLOATDescription
TRUEnever evaluated
FALSEnever evaluated
0
1732 || viewFormat == QOpenGLTexture::RGB_BP_SIGNED_FLOAT
viewFormat == ...P_SIGNED_FLOATDescription
TRUEnever evaluated
FALSEnever evaluated
);
0
1733 break;
never executed: break;
0
1734-
1735 case
never executed: case QOpenGLTexture::FormatClass_S3TC_DXT1_RGB:
QOpenGLTexture::FormatClass_S3TC_DXT1_RGB:
never executed: case QOpenGLTexture::FormatClass_S3TC_DXT1_RGB:
0
1736 viewFormatCompatible = (viewFormat == QOpenGLTexture::RGB_DXT1
viewFormat == ...ture::RGB_DXT1Description
TRUEnever evaluated
FALSEnever evaluated
0
1737 || viewFormat == QOpenGLTexture::SRGB_DXT1
viewFormat == ...ure::SRGB_DXT1Description
TRUEnever evaluated
FALSEnever evaluated
);
0
1738 break;
never executed: break;
0
1739-
1740 case
never executed: case QOpenGLTexture::FormatClass_S3TC_DXT1_RGBA:
QOpenGLTexture::FormatClass_S3TC_DXT1_RGBA:
never executed: case QOpenGLTexture::FormatClass_S3TC_DXT1_RGBA:
0
1741 viewFormatCompatible = (viewFormat == QOpenGLTexture::RGBA_DXT1
viewFormat == ...ure::RGBA_DXT1Description
TRUEnever evaluated
FALSEnever evaluated
0
1742 || viewFormat == QOpenGLTexture::SRGB_Alpha_DXT1
viewFormat == ...RGB_Alpha_DXT1Description
TRUEnever evaluated
FALSEnever evaluated
);
0
1743 break;
never executed: break;
0
1744-
1745 case
never executed: case QOpenGLTexture::FormatClass_S3TC_DXT3_RGBA:
QOpenGLTexture::FormatClass_S3TC_DXT3_RGBA:
never executed: case QOpenGLTexture::FormatClass_S3TC_DXT3_RGBA:
0
1746 viewFormatCompatible = (viewFormat == QOpenGLTexture::RGBA_DXT3
viewFormat == ...ure::RGBA_DXT3Description
TRUEnever evaluated
FALSEnever evaluated
0
1747 || viewFormat == QOpenGLTexture::SRGB_Alpha_DXT3
viewFormat == ...RGB_Alpha_DXT3Description
TRUEnever evaluated
FALSEnever evaluated
);
0
1748 break;
never executed: break;
0
1749-
1750 case
never executed: case QOpenGLTexture::FormatClass_S3TC_DXT5_RGBA:
QOpenGLTexture::FormatClass_S3TC_DXT5_RGBA:
never executed: case QOpenGLTexture::FormatClass_S3TC_DXT5_RGBA:
0
1751 viewFormatCompatible = (viewFormat == QOpenGLTexture::RGBA_DXT5
viewFormat == ...ure::RGBA_DXT5Description
TRUEnever evaluated
FALSEnever evaluated
0
1752 || viewFormat == QOpenGLTexture::SRGB_Alpha_DXT5
viewFormat == ...RGB_Alpha_DXT5Description
TRUEnever evaluated
FALSEnever evaluated
);
0
1753 break;
never executed: break;
0
1754-
1755 case
never executed: case QOpenGLTexture::FormatClass_Unique:
QOpenGLTexture::FormatClass_Unique:
never executed: case QOpenGLTexture::FormatClass_Unique:
0
1756 viewFormatCompatible = (viewFormat == format);-
1757 break;
never executed: break;
0
1758 }-
1759-
1760 if (!viewFormatCompatible
!viewFormatCompatibleDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1761 QMessageLogger(__FILE__, 1807, __PRETTY_FUNCTION__).warning("QOpenGLTexture::createTextureView(): Incompatible source and view formats");-
1762 return
never executed: return 0;
0;
never executed: return 0;
0
1763 }-
1764-
1765-
1766-
1767 QOpenGLTexture *view = new QOpenGLTexture(viewTarget);-
1768 view->setFormat(viewFormat);-
1769 view->create();-
1770 view->d_ptr->textureView = true;-
1771 texFuncs->glTextureView(view->textureId(), viewTarget, textureId, viewFormat,-
1772 minimumMipmapLevel, maximumMipmapLevel - minimumMipmapLevel + 1,-
1773 minimumLayer, maximumLayer - minimumLayer + 1);-
1774 return
never executed: return view;
view;
never executed: return view;
0
1775}-
1776QOpenGLTexture::QOpenGLTexture(Target target)-
1777 : d_ptr(new QOpenGLTexturePrivate(target, this))-
1778{-
1779}
never executed: end of block
0
1780QOpenGLTexture::QOpenGLTexture(const QImage& image, MipMapGeneration genMipMaps)-
1781 : d_ptr(new QOpenGLTexturePrivate(QOpenGLTexture::Target2D, this))-
1782{-
1783 setData(image, genMipMaps);-
1784}
never executed: end of block
0
1785-
1786QOpenGLTexture::~QOpenGLTexture()-
1787{-
1788}-
1789-
1790-
1791-
1792-
1793-
1794-
1795QOpenGLTexture::Target QOpenGLTexture::target() const-
1796{-
1797 const QOpenGLTexturePrivate * const d = d_func();-
1798 return
never executed: return d->target;
d->target;
never executed: return d->target;
0
1799}-
1800bool QOpenGLTexture::create()-
1801{-
1802 QOpenGLTexturePrivate * const d = d_func();-
1803 return
never executed: return d->create();
d->create();
never executed: return d->create();
0
1804}-
1805-
1806-
1807-
1808-
1809-
1810-
1811-
1812void QOpenGLTexture::destroy()-
1813{-
1814 QOpenGLTexturePrivate * const d = d_func();-
1815 return
never executed: return d->destroy();
d->destroy();
never executed: return d->destroy();
0
1816}-
1817-
1818-
1819-
1820-
1821-
1822-
1823bool QOpenGLTexture::isCreated() const-
1824{-
1825 const QOpenGLTexturePrivate * const d = d_func();-
1826 return
never executed: return d->textureId != 0;
d->textureId != 0;
never executed: return d->textureId != 0;
0
1827}-
1828-
1829-
1830-
1831-
1832-
1833-
1834-
1835GLuint QOpenGLTexture::textureId() const-
1836{-
1837 const QOpenGLTexturePrivate * const d = d_func();-
1838 return
never executed: return d->textureId;
d->textureId;
never executed: return d->textureId;
0
1839}-
1840void QOpenGLTexture::bind()-
1841{-
1842 QOpenGLTexturePrivate * const d = d_func();-
1843 ((!(d->textureId)) ? qt_assert("d->textureId",__FILE__,2309) : qt_noop());-
1844 d->bind();-
1845}
never executed: end of block
0
1846void QOpenGLTexture::bind(uint unit, TextureUnitReset reset)-
1847{-
1848 QOpenGLTexturePrivate * const d = d_func();-
1849 ((!(d->textureId)) ? qt_assert("d->textureId",__FILE__,2328) : qt_noop());-
1850 d->bind(unit, reset);-
1851}
never executed: end of block
0
1852-
1853-
1854-
1855-
1856-
1857-
1858void QOpenGLTexture::release()-
1859{-
1860 QOpenGLTexturePrivate * const d = d_func();-
1861 d->release();-
1862}
never executed: end of block
0
1863void QOpenGLTexture::release(uint unit, TextureUnitReset reset)-
1864{-
1865 QOpenGLTexturePrivate * const d = d_func();-
1866 d->release(unit, reset);-
1867}
never executed: end of block
0
1868-
1869-
1870-
1871-
1872-
1873-
1874-
1875bool QOpenGLTexture::isBound() const-
1876{-
1877 const QOpenGLTexturePrivate * const d = d_func();-
1878 ((!(d->textureId)) ? qt_assert("d->textureId",__FILE__,2365) : qt_noop());-
1879 return
never executed: return d->isBound();
d->isBound();
never executed: return d->isBound();
0
1880}-
1881-
1882-
1883-
1884-
1885-
1886-
1887-
1888bool QOpenGLTexture::isBound(uint unit)-
1889{-
1890 const QOpenGLTexturePrivate * const d = d_func();-
1891 ((!(d->textureId)) ? qt_assert("d->textureId",__FILE__,2378) : qt_noop());-
1892 return
never executed: return d->isBound(unit);
d->isBound(unit);
never executed: return d->isBound(unit);
0
1893}-
1894-
1895-
1896-
1897-
1898-
1899GLuint QOpenGLTexture::boundTextureId(BindingTarget target)-
1900{-
1901 QOpenGLContext *ctx = QOpenGLContext::currentContext();-
1902 if (!ctx
!ctxDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1903 QMessageLogger(__FILE__, 2390, __PRETTY_FUNCTION__).warning("QOpenGLTexture::boundTextureId() requires a valid current context");-
1904 return
never executed: return 0;
0;
never executed: return 0;
0
1905 }-
1906-
1907 GLint textureId = 0;-
1908 ctx->functions()->glGetIntegerv(target, &textureId);-
1909 return
never executed: return static_cast<GLuint>(textureId);
static_cast<GLuint>(textureId);
never executed: return static_cast<GLuint>(textureId);
0
1910}-
1911-
1912-
1913-
1914-
1915-
1916GLuint QOpenGLTexture::boundTextureId(uint unit, BindingTarget target)-
1917{-
1918 QOpenGLContext *ctx = QOpenGLContext::currentContext();-
1919 if (!ctx
!ctxDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
1920 QMessageLogger(__FILE__, 2407, __PRETTY_FUNCTION__).warning("QOpenGLTexture::boundTextureId() requires a valid current context");-
1921 return
never executed: return 0;
0;
never executed: return 0;
0
1922 }-
1923-
1924 QOpenGLFunctions *funcs = ctx->functions();-
1925 funcs->initializeOpenGLFunctions();-
1926-
1927 GLint oldTextureUnit = 0;-
1928 funcs->glGetIntegerv(0x84E0, &oldTextureUnit);-
1929-
1930 funcs->glActiveTexture(unit);-
1931 GLint textureId = 0;-
1932 funcs->glGetIntegerv(target, &textureId);-
1933 funcs->glActiveTexture(oldTextureUnit);-
1934-
1935 return
never executed: return static_cast<GLuint>(textureId);
static_cast<GLuint>(textureId);
never executed: return static_cast<GLuint>(textureId);
0
1936}-
1937void QOpenGLTexture::setFormat(TextureFormat format)-
1938{-
1939 QOpenGLTexturePrivate * const d = d_func();-
1940 d->create();-
1941 if (isStorageAllocated()
isStorageAllocated()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1942 QMessageLogger(__FILE__, 2439, __PRETTY_FUNCTION__).warning("QOpenGLTexture::setFormat(): Cannot change format once storage has been allocated");-
1943 return;
never executed: return;
0
1944 }-
1945-
1946 d->format = format;-
1947-
1948 switch (format) {-
1949 case
never executed: case NoFormat:
NoFormat:
never executed: case NoFormat:
0
1950 d->formatClass = NoFormatClass;-
1951 break;
never executed: break;
0
1952-
1953 case
never executed: case RGBA32F:
RGBA32F:
never executed: case RGBA32F:
0
1954 case
never executed: case RGBA32U:
RGBA32U:
never executed: case RGBA32U:
0
1955 case
never executed: case RGBA32I:
RGBA32I:
never executed: case RGBA32I:
0
1956 d->formatClass = FormatClass_128Bit;-
1957 break;
never executed: break;
0
1958-
1959 case
never executed: case RGB32F:
RGB32F:
never executed: case RGB32F:
0
1960 case
never executed: case RGB32U:
RGB32U:
never executed: case RGB32U:
0
1961 case
never executed: case RGB32I:
RGB32I:
never executed: case RGB32I:
0
1962 d->formatClass = FormatClass_96Bit;-
1963 break;
never executed: break;
0
1964-
1965 case
never executed: case RGBA16F:
RGBA16F:
never executed: case RGBA16F:
0
1966 case
never executed: case RG32F:
RG32F:
never executed: case RG32F:
0
1967 case
never executed: case RGBA16U:
RGBA16U:
never executed: case RGBA16U:
0
1968 case
never executed: case RG32U:
RG32U:
never executed: case RG32U:
0
1969 case
never executed: case RGBA16I:
RGBA16I:
never executed: case RGBA16I:
0
1970 case
never executed: case RG32I:
RG32I:
never executed: case RG32I:
0
1971 case
never executed: case RGBA16_UNorm:
RGBA16_UNorm:
never executed: case RGBA16_UNorm:
0
1972 case
never executed: case RGBA16_SNorm:
RGBA16_SNorm:
never executed: case RGBA16_SNorm:
0
1973 d->formatClass = FormatClass_64Bit;-
1974 break;
never executed: break;
0
1975-
1976 case
never executed: case RGB16_UNorm:
RGB16_UNorm:
never executed: case RGB16_UNorm:
0
1977 case
never executed: case RGB16_SNorm:
RGB16_SNorm:
never executed: case RGB16_SNorm:
0
1978 case
never executed: case RGB16F:
RGB16F:
never executed: case RGB16F:
0
1979 case
never executed: case RGB16U:
RGB16U:
never executed: case RGB16U:
0
1980 case
never executed: case RGB16I:
RGB16I:
never executed: case RGB16I:
0
1981 d->formatClass = FormatClass_48Bit;-
1982 break;
never executed: break;
0
1983-
1984 case
never executed: case RG16F:
RG16F:
never executed: case RG16F:
0
1985 case
never executed: case RG11B10F:
RG11B10F:
never executed: case RG11B10F:
0
1986 case
never executed: case R32F:
R32F:
never executed: case R32F:
0
1987 case
never executed: case RGB10A2:
RGB10A2:
never executed: case RGB10A2:
0
1988 case
never executed: case RGBA8U:
RGBA8U:
never executed: case RGBA8U:
0
1989 case
never executed: case RG16U:
RG16U:
never executed: case RG16U:
0
1990 case
never executed: case R32U:
R32U:
never executed: case R32U:
0
1991 case
never executed: case RGBA8I:
RGBA8I:
never executed: case RGBA8I:
0
1992 case
never executed: case RG16I:
RG16I:
never executed: case RG16I:
0
1993 case
never executed: case R32I:
R32I:
never executed: case R32I:
0
1994 case
never executed: case RGBA8_UNorm:
RGBA8_UNorm:
never executed: case RGBA8_UNorm:
0
1995 case
never executed: case RG16_UNorm:
RG16_UNorm:
never executed: case RG16_UNorm:
0
1996 case
never executed: case RGBA8_SNorm:
RGBA8_SNorm:
never executed: case RGBA8_SNorm:
0
1997 case
never executed: case RG16_SNorm:
RG16_SNorm:
never executed: case RG16_SNorm:
0
1998 case
never executed: case SRGB8_Alpha8:
SRGB8_Alpha8:
never executed: case SRGB8_Alpha8:
0
1999 case
never executed: case RGB9E5:
RGB9E5:
never executed: case RGB9E5:
0
2000 d->formatClass = FormatClass_32Bit;-
2001 break;
never executed: break;
0
2002-
2003 case
never executed: case RGB8_UNorm:
RGB8_UNorm:
never executed: case RGB8_UNorm:
0
2004 case
never executed: case RGB8_SNorm:
RGB8_SNorm:
never executed: case RGB8_SNorm:
0
2005 case
never executed: case SRGB8:
SRGB8:
never executed: case SRGB8:
0
2006 case
never executed: case RGB8U:
RGB8U:
never executed: case RGB8U:
0
2007 case
never executed: case RGB8I:
RGB8I:
never executed: case RGB8I:
0
2008 d->formatClass = FormatClass_24Bit;-
2009 break;
never executed: break;
0
2010-
2011 case
never executed: case R16F:
R16F:
never executed: case R16F:
0
2012 case
never executed: case RG8U:
RG8U:
never executed: case RG8U:
0
2013 case
never executed: case R16U:
R16U:
never executed: case R16U:
0
2014 case
never executed: case RG8I:
RG8I:
never executed: case RG8I:
0
2015 case
never executed: case R16I:
R16I:
never executed: case R16I:
0
2016 case
never executed: case RG8_UNorm:
RG8_UNorm:
never executed: case RG8_UNorm:
0
2017 case
never executed: case R16_UNorm:
R16_UNorm:
never executed: case R16_UNorm:
0
2018 case
never executed: case RG8_SNorm:
RG8_SNorm:
never executed: case RG8_SNorm:
0
2019 case
never executed: case R16_SNorm:
R16_SNorm:
never executed: case R16_SNorm:
0
2020 d->formatClass = FormatClass_16Bit;-
2021 break;
never executed: break;
0
2022-
2023 case
never executed: case R8U:
R8U:
never executed: case R8U:
0
2024 case
never executed: case R8I:
R8I:
never executed: case R8I:
0
2025 case
never executed: case R8_UNorm:
R8_UNorm:
never executed: case R8_UNorm:
0
2026 case
never executed: case R8_SNorm:
R8_SNorm:
never executed: case R8_SNorm:
0
2027 d->formatClass = FormatClass_8Bit;-
2028 break;
never executed: break;
0
2029-
2030 case
never executed: case R_ATI1N_UNorm:
R_ATI1N_UNorm:
never executed: case R_ATI1N_UNorm:
0
2031 case
never executed: case R_ATI1N_SNorm:
R_ATI1N_SNorm:
never executed: case R_ATI1N_SNorm:
0
2032 d->formatClass = FormatClass_RGTC1_R;-
2033 break;
never executed: break;
0
2034-
2035 case
never executed: case RG_ATI2N_UNorm:
RG_ATI2N_UNorm:
never executed: case RG_ATI2N_UNorm:
0
2036 case
never executed: case RG_ATI2N_SNorm:
RG_ATI2N_SNorm:
never executed: case RG_ATI2N_SNorm:
0
2037 d->formatClass = FormatClass_RGTC2_RG;-
2038 break;
never executed: break;
0
2039-
2040 case
never executed: case RGB_BP_UNorm:
RGB_BP_UNorm:
never executed: case RGB_BP_UNorm:
0
2041 case
never executed: case SRGB_BP_UNorm:
SRGB_BP_UNorm:
never executed: case SRGB_BP_UNorm:
0
2042 d->formatClass = FormatClass_BPTC_Unorm;-
2043 break;
never executed: break;
0
2044-
2045 case
never executed: case RGB_BP_UNSIGNED_FLOAT:
RGB_BP_UNSIGNED_FLOAT:
never executed: case RGB_BP_UNSIGNED_FLOAT:
0
2046 case
never executed: case RGB_BP_SIGNED_FLOAT:
RGB_BP_SIGNED_FLOAT:
never executed: case RGB_BP_SIGNED_FLOAT:
0
2047 d->formatClass = FormatClass_BPTC_Float;-
2048 break;
never executed: break;
0
2049-
2050 case
never executed: case RGB_DXT1:
RGB_DXT1:
never executed: case RGB_DXT1:
0
2051 case
never executed: case SRGB_DXT1:
SRGB_DXT1:
never executed: case SRGB_DXT1:
0
2052 d->formatClass = FormatClass_S3TC_DXT1_RGB;-
2053 break;
never executed: break;
0
2054-
2055 case
never executed: case RGBA_DXT1:
RGBA_DXT1:
never executed: case RGBA_DXT1:
0
2056 case
never executed: case SRGB_Alpha_DXT1:
SRGB_Alpha_DXT1:
never executed: case SRGB_Alpha_DXT1:
0
2057 d->formatClass = FormatClass_S3TC_DXT1_RGBA;-
2058 break;
never executed: break;
0
2059-
2060 case
never executed: case RGBA_DXT3:
RGBA_DXT3:
never executed: case RGBA_DXT3:
0
2061 case
never executed: case SRGB_Alpha_DXT3:
SRGB_Alpha_DXT3:
never executed: case SRGB_Alpha_DXT3:
0
2062 d->formatClass = FormatClass_S3TC_DXT3_RGBA;-
2063 break;
never executed: break;
0
2064-
2065 case
never executed: case RGBA_DXT5:
RGBA_DXT5:
never executed: case RGBA_DXT5:
0
2066 case
never executed: case SRGB_Alpha_DXT5:
SRGB_Alpha_DXT5:
never executed: case SRGB_Alpha_DXT5:
0
2067 d->formatClass = FormatClass_S3TC_DXT5_RGBA;-
2068 break;
never executed: break;
0
2069-
2070 case
never executed: case QOpenGLTexture::R11_EAC_UNorm:
QOpenGLTexture::R11_EAC_UNorm:
never executed: case QOpenGLTexture::R11_EAC_UNorm:
0
2071 case
never executed: case QOpenGLTexture::R11_EAC_SNorm:
QOpenGLTexture::R11_EAC_SNorm:
never executed: case QOpenGLTexture::R11_EAC_SNorm:
0
2072 case
never executed: case QOpenGLTexture::RG11_EAC_UNorm:
QOpenGLTexture::RG11_EAC_UNorm:
never executed: case QOpenGLTexture::RG11_EAC_UNorm:
0
2073 case
never executed: case QOpenGLTexture::RG11_EAC_SNorm:
QOpenGLTexture::RG11_EAC_SNorm:
never executed: case QOpenGLTexture::RG11_EAC_SNorm:
0
2074 case
never executed: case QOpenGLTexture::RGB8_ETC2:
QOpenGLTexture::RGB8_ETC2:
never executed: case QOpenGLTexture::RGB8_ETC2:
0
2075 case
never executed: case QOpenGLTexture::SRGB8_ETC2:
QOpenGLTexture::SRGB8_ETC2:
never executed: case QOpenGLTexture::SRGB8_ETC2:
0
2076 case
never executed: case QOpenGLTexture::RGB8_PunchThrough_Alpha1_ETC2:
QOpenGLTexture::RGB8_PunchThrough_Alpha1_ETC2:
never executed: case QOpenGLTexture::RGB8_PunchThrough_Alpha1_ETC2:
0
2077 case
never executed: case QOpenGLTexture::SRGB8_PunchThrough_Alpha1_ETC2:
QOpenGLTexture::SRGB8_PunchThrough_Alpha1_ETC2:
never executed: case QOpenGLTexture::SRGB8_PunchThrough_Alpha1_ETC2:
0
2078 case
never executed: case QOpenGLTexture::RGBA8_ETC2_EAC:
QOpenGLTexture::RGBA8_ETC2_EAC:
never executed: case QOpenGLTexture::RGBA8_ETC2_EAC:
0
2079 case
never executed: case QOpenGLTexture::SRGB8_Alpha8_ETC2_EAC:
QOpenGLTexture::SRGB8_Alpha8_ETC2_EAC:
never executed: case QOpenGLTexture::SRGB8_Alpha8_ETC2_EAC:
0
2080 case
never executed: case QOpenGLTexture::RGB8_ETC1:
QOpenGLTexture::RGB8_ETC1:
never executed: case QOpenGLTexture::RGB8_ETC1:
0
2081 case
never executed: case RG3B2:
RG3B2:
never executed: case RG3B2:
0
2082 case
never executed: case R5G6B5:
R5G6B5:
never executed: case R5G6B5:
0
2083 case
never executed: case RGB5A1:
RGB5A1:
never executed: case RGB5A1:
0
2084 case
never executed: case RGBA4:
RGBA4:
never executed: case RGBA4:
0
2085 case
never executed: case D16:
D16:
never executed: case D16:
0
2086 case
never executed: case D24:
D24:
never executed: case D24:
0
2087 case
never executed: case D24S8:
D24S8:
never executed: case D24S8:
0
2088 case
never executed: case D32:
D32:
never executed: case D32:
0
2089 case
never executed: case D32F:
D32F:
never executed: case D32F:
0
2090 case
never executed: case D32FS8X24:
D32FS8X24:
never executed: case D32FS8X24:
0
2091 case
never executed: case S8:
S8:
never executed: case S8:
0
2092 case
never executed: case DepthFormat:
DepthFormat:
never executed: case DepthFormat:
0
2093 case
never executed: case AlphaFormat:
AlphaFormat:
never executed: case AlphaFormat:
0
2094 case
never executed: case RGBFormat:
RGBFormat:
never executed: case RGBFormat:
0
2095 case
never executed: case RGBAFormat:
RGBAFormat:
never executed: case RGBAFormat:
0
2096 case
never executed: case LuminanceFormat:
LuminanceFormat:
never executed: case LuminanceFormat:
0
2097 case
never executed: case LuminanceAlphaFormat:
LuminanceAlphaFormat:
never executed: case LuminanceAlphaFormat:
0
2098 d->formatClass = FormatClass_Unique;-
2099 break;
never executed: break;
0
2100 }-
2101}
never executed: end of block
0
2102-
2103-
2104-
2105-
2106-
2107-
2108QOpenGLTexture::TextureFormat QOpenGLTexture::format() const-
2109{-
2110 const QOpenGLTexturePrivate * const d = d_func();-
2111 return
never executed: return d->format;
d->format;
never executed: return d->format;
0
2112}-
2113void QOpenGLTexture::setSize(int width, int height, int depth)-
2114{-
2115 QOpenGLTexturePrivate * const d = d_func();-
2116 d->create();-
2117 if (isStorageAllocated()
isStorageAllocated()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2118 QMessageLogger(__FILE__, 2625, __PRETTY_FUNCTION__).warning("Cannot resize a texture that already has storage allocated.\n"-
2119 "To do so, destroy() the texture and then create() and setSize()");-
2120 return;
never executed: return;
0
2121 }-
2122-
2123 switch (d->target) {-
2124 case
never executed: case QOpenGLTexture::Target1D:
QOpenGLTexture::Target1D:
never executed: case QOpenGLTexture::Target1D:
0
2125 case
never executed: case QOpenGLTexture::Target1DArray:
QOpenGLTexture::Target1DArray:
never executed: case QOpenGLTexture::Target1DArray:
0
2126 case
never executed: case QOpenGLTexture::TargetBuffer:
QOpenGLTexture::TargetBuffer:
never executed: case QOpenGLTexture::TargetBuffer:
0
2127 d->dimensions[0] = width;-
2128 (void)height;;-
2129 (void)depth;;-
2130 break;
never executed: break;
0
2131-
2132 case
never executed: case QOpenGLTexture::Target2D:
QOpenGLTexture::Target2D:
never executed: case QOpenGLTexture::Target2D:
0
2133 case
never executed: case QOpenGLTexture::Target2DArray:
QOpenGLTexture::Target2DArray:
never executed: case QOpenGLTexture::Target2DArray:
0
2134 case
never executed: case QOpenGLTexture::TargetRectangle:
QOpenGLTexture::TargetRectangle:
never executed: case QOpenGLTexture::TargetRectangle:
0
2135 case
never executed: case QOpenGLTexture::Target2DMultisample:
QOpenGLTexture::Target2DMultisample:
never executed: case QOpenGLTexture::Target2DMultisample:
0
2136 case
never executed: case QOpenGLTexture::Target2DMultisampleArray:
QOpenGLTexture::Target2DMultisampleArray:
never executed: case QOpenGLTexture::Target2DMultisampleArray:
0
2137 d->dimensions[0] = width;-
2138 d->dimensions[1] = height;-
2139 (void)depth;;-
2140 break;
never executed: break;
0
2141-
2142 case
never executed: case QOpenGLTexture::TargetCubeMap:
QOpenGLTexture::TargetCubeMap:
never executed: case QOpenGLTexture::TargetCubeMap:
0
2143 case
never executed: case QOpenGLTexture::TargetCubeMapArray:
QOpenGLTexture::TargetCubeMapArray:
never executed: case QOpenGLTexture::TargetCubeMapArray:
0
2144 if (width != height
width != heightDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2145 QMessageLogger(__FILE__, 2652, __PRETTY_FUNCTION__).warning("QAbstractOpenGLTexture::setSize(): Cube map textures must be square");
never executed: QMessageLogger(__FILE__, 2652, __PRETTY_FUNCTION__).warning("QAbstractOpenGLTexture::setSize(): Cube map textures must be square");
0
2146 d->dimensions[0] = d->dimensions[1] = width;-
2147 (void)depth;;-
2148 break;
never executed: break;
0
2149-
2150 case
never executed: case QOpenGLTexture::Target3D:
QOpenGLTexture::Target3D:
never executed: case QOpenGLTexture::Target3D:
0
2151 d->dimensions[0] = width;-
2152 d->dimensions[1] = height;-
2153 d->dimensions[2] = depth;-
2154 break;
never executed: break;
0
2155 }-
2156}
never executed: end of block
0
2157-
2158-
2159-
2160-
2161-
2162-
2163int QOpenGLTexture::width() const-
2164{-
2165 const QOpenGLTexturePrivate * const d = d_func();-
2166 return
never executed: return d->dimensions[0];
d->dimensions[0];
never executed: return d->dimensions[0];
0
2167}-
2168-
2169-
2170-
2171-
2172-
2173-
2174int QOpenGLTexture::height() const-
2175{-
2176 const QOpenGLTexturePrivate * const d = d_func();-
2177 return
never executed: return d->dimensions[1];
d->dimensions[1];
never executed: return d->dimensions[1];
0
2178}-
2179-
2180-
2181-
2182-
2183-
2184-
2185int QOpenGLTexture::depth() const-
2186{-
2187 const QOpenGLTexturePrivate * const d = d_func();-
2188 return
never executed: return d->dimensions[2];
d->dimensions[2];
never executed: return d->dimensions[2];
0
2189}-
2190void QOpenGLTexture::setMipLevels(int levels)-
2191{-
2192 QOpenGLTexturePrivate * const d = d_func();-
2193 d->create();-
2194 if (isStorageAllocated()
isStorageAllocated()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2195 QMessageLogger(__FILE__, 2714, __PRETTY_FUNCTION__).warning("Cannot set mip levels on a texture that already has storage allocated.\n"-
2196 "To do so, destroy() the texture and then create() and setMipLevels()");-
2197 return;
never executed: return;
0
2198 }-
2199-
2200 switch (d->target) {-
2201 case
never executed: case QOpenGLTexture::Target1D:
QOpenGLTexture::Target1D:
never executed: case QOpenGLTexture::Target1D:
0
2202 case
never executed: case QOpenGLTexture::Target1DArray:
QOpenGLTexture::Target1DArray:
never executed: case QOpenGLTexture::Target1DArray:
0
2203 case
never executed: case QOpenGLTexture::Target2D:
QOpenGLTexture::Target2D:
never executed: case QOpenGLTexture::Target2D:
0
2204 case
never executed: case QOpenGLTexture::Target2DArray:
QOpenGLTexture::Target2DArray:
never executed: case QOpenGLTexture::Target2DArray:
0
2205 case
never executed: case QOpenGLTexture::TargetCubeMap:
QOpenGLTexture::TargetCubeMap:
never executed: case QOpenGLTexture::TargetCubeMap:
0
2206 case
never executed: case QOpenGLTexture::TargetCubeMapArray:
QOpenGLTexture::TargetCubeMapArray:
never executed: case QOpenGLTexture::TargetCubeMapArray:
0
2207 case
never executed: case QOpenGLTexture::Target3D:
QOpenGLTexture::Target3D:
never executed: case QOpenGLTexture::Target3D:
0
2208 d->requestedMipLevels = levels;-
2209 break;
never executed: break;
0
2210-
2211 case
never executed: case QOpenGLTexture::TargetBuffer:
QOpenGLTexture::TargetBuffer:
never executed: case QOpenGLTexture::TargetBuffer:
0
2212 case
never executed: case QOpenGLTexture::TargetRectangle:
QOpenGLTexture::TargetRectangle:
never executed: case QOpenGLTexture::TargetRectangle:
0
2213 case
never executed: case QOpenGLTexture::Target2DMultisample:
QOpenGLTexture::Target2DMultisample:
never executed: case QOpenGLTexture::Target2DMultisample:
0
2214 case
never executed: case QOpenGLTexture::Target2DMultisampleArray:
QOpenGLTexture::Target2DMultisampleArray:
never executed: case QOpenGLTexture::Target2DMultisampleArray:
0
2215 QMessageLogger(__FILE__, 2734, __PRETTY_FUNCTION__).warning("QAbstractOpenGLTexture::setMipLevels(): This texture target does not support mipmaps");-
2216 break;
never executed: break;
0
2217 }-
2218}
never executed: end of block
0
2219int QOpenGLTexture::mipLevels() const-
2220{-
2221 const QOpenGLTexturePrivate * const d = d_func();-
2222 return
never executed: return isStorageAllocated() ? d->mipLevels : d->requestedMipLevels;
isStorageAllocated() ? d->mipLevels : d->requestedMipLevels;
never executed: return isStorageAllocated() ? d->mipLevels : d->requestedMipLevels;
0
2223}-
2224-
2225-
2226-
2227-
2228-
2229-
2230-
2231int QOpenGLTexture::maximumMipLevels() const-
2232{-
2233 const QOpenGLTexturePrivate * const d = d_func();-
2234 return
never executed: return d->maximumMipLevelCount();
d->maximumMipLevelCount();
never executed: return d->maximumMipLevelCount();
0
2235}-
2236void QOpenGLTexture::setLayers(int layers)-
2237{-
2238 QOpenGLTexturePrivate * const d = d_func();-
2239 d->create();-
2240 if (isStorageAllocated()
isStorageAllocated()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2241 QMessageLogger(__FILE__, 2778, __PRETTY_FUNCTION__).warning("Cannot set layers on a texture that already has storage allocated.\n"-
2242 "To do so, destroy() the texture and then create() and setLayers()");-
2243 return;
never executed: return;
0
2244 }-
2245-
2246 switch (d->target) {-
2247 case
never executed: case QOpenGLTexture::Target1DArray:
QOpenGLTexture::Target1DArray:
never executed: case QOpenGLTexture::Target1DArray:
0
2248 case
never executed: case QOpenGLTexture::Target2DArray:
QOpenGLTexture::Target2DArray:
never executed: case QOpenGLTexture::Target2DArray:
0
2249 case
never executed: case QOpenGLTexture::TargetCubeMapArray:
QOpenGLTexture::TargetCubeMapArray:
never executed: case QOpenGLTexture::TargetCubeMapArray:
0
2250 case
never executed: case QOpenGLTexture::Target2DMultisampleArray:
QOpenGLTexture::Target2DMultisampleArray:
never executed: case QOpenGLTexture::Target2DMultisampleArray:
0
2251 d->layers = layers;-
2252 break;
never executed: break;
0
2253-
2254 case
never executed: case QOpenGLTexture::Target1D:
QOpenGLTexture::Target1D:
never executed: case QOpenGLTexture::Target1D:
0
2255 case
never executed: case QOpenGLTexture::Target2D:
QOpenGLTexture::Target2D:
never executed: case QOpenGLTexture::Target2D:
0
2256 case
never executed: case QOpenGLTexture::Target3D:
QOpenGLTexture::Target3D:
never executed: case QOpenGLTexture::Target3D:
0
2257 case
never executed: case QOpenGLTexture::TargetCubeMap:
QOpenGLTexture::TargetCubeMap:
never executed: case QOpenGLTexture::TargetCubeMap:
0
2258 case
never executed: case QOpenGLTexture::TargetBuffer:
QOpenGLTexture::TargetBuffer:
never executed: case QOpenGLTexture::TargetBuffer:
0
2259 case
never executed: case QOpenGLTexture::TargetRectangle:
QOpenGLTexture::TargetRectangle:
never executed: case QOpenGLTexture::TargetRectangle:
0
2260 case
never executed: case QOpenGLTexture::Target2DMultisample:
QOpenGLTexture::Target2DMultisample:
never executed: case QOpenGLTexture::Target2DMultisample:
0
2261 QMessageLogger(__FILE__, 2798, __PRETTY_FUNCTION__).warning("Texture target does not support array layers");-
2262 break;
never executed: break;
0
2263 }-
2264}
never executed: end of block
0
2265int QOpenGLTexture::layers() const-
2266{-
2267 const QOpenGLTexturePrivate * const d = d_func();-
2268 return
never executed: return d->layers;
d->layers;
never executed: return d->layers;
0
2269}-
2270-
2271-
2272-
2273-
2274-
2275-
2276-
2277int QOpenGLTexture::faces() const-
2278{-
2279 const QOpenGLTexturePrivate * const d = d_func();-
2280 return
never executed: return d->faces;
d->faces;
never executed: return d->faces;
0
2281}-
2282void QOpenGLTexture::setSamples(int samples)-
2283{-
2284 QOpenGLTexturePrivate * const d = d_func();-
2285 d->create();-
2286 if (isStorageAllocated()
isStorageAllocated()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2287 QMessageLogger(__FILE__, 2846, __PRETTY_FUNCTION__).warning("Cannot set sample count on a texture that already has storage allocated.\n"-
2288 "To do so, destroy() the texture and then create() and setSamples()");-
2289 return;
never executed: return;
0
2290 }-
2291-
2292 switch (d->target) {-
2293 case
never executed: case QOpenGLTexture::Target2DMultisample:
QOpenGLTexture::Target2DMultisample:
never executed: case QOpenGLTexture::Target2DMultisample:
0
2294 case
never executed: case QOpenGLTexture::Target2DMultisampleArray:
QOpenGLTexture::Target2DMultisampleArray:
never executed: case QOpenGLTexture::Target2DMultisampleArray:
0
2295 d->samples = samples;-
2296 break;
never executed: break;
0
2297-
2298 case
never executed: case QOpenGLTexture::Target1D:
QOpenGLTexture::Target1D:
never executed: case QOpenGLTexture::Target1D:
0
2299 case
never executed: case QOpenGLTexture::Target2D:
QOpenGLTexture::Target2D:
never executed: case QOpenGLTexture::Target2D:
0
2300 case
never executed: case QOpenGLTexture::Target3D:
QOpenGLTexture::Target3D:
never executed: case QOpenGLTexture::Target3D:
0
2301 case
never executed: case QOpenGLTexture::Target1DArray:
QOpenGLTexture::Target1DArray:
never executed: case QOpenGLTexture::Target1DArray:
0
2302 case
never executed: case QOpenGLTexture::Target2DArray:
QOpenGLTexture::Target2DArray:
never executed: case QOpenGLTexture::Target2DArray:
0
2303 case
never executed: case QOpenGLTexture::TargetCubeMap:
QOpenGLTexture::TargetCubeMap:
never executed: case QOpenGLTexture::TargetCubeMap:
0
2304 case
never executed: case QOpenGLTexture::TargetCubeMapArray:
QOpenGLTexture::TargetCubeMapArray:
never executed: case QOpenGLTexture::TargetCubeMapArray:
0
2305 case
never executed: case QOpenGLTexture::TargetBuffer:
QOpenGLTexture::TargetBuffer:
never executed: case QOpenGLTexture::TargetBuffer:
0
2306 case
never executed: case QOpenGLTexture::TargetRectangle:
QOpenGLTexture::TargetRectangle:
never executed: case QOpenGLTexture::TargetRectangle:
0
2307-
2308 QMessageLogger(__FILE__, 2867, __PRETTY_FUNCTION__).warning("Texture target does not support multisampling");-
2309 break;
never executed: break;
0
2310 }-
2311}
never executed: end of block
0
2312int QOpenGLTexture::samples() const-
2313{-
2314 const QOpenGLTexturePrivate * const d = d_func();-
2315 return
never executed: return d->samples;
d->samples;
never executed: return d->samples;
0
2316}-
2317void QOpenGLTexture::setFixedSamplePositions(bool fixed)-
2318{-
2319 QOpenGLTexturePrivate * const d = d_func();-
2320 d->create();-
2321 if (isStorageAllocated()
isStorageAllocated()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2322 QMessageLogger(__FILE__, 2908, __PRETTY_FUNCTION__).warning("Cannot set sample positions on a texture that already has storage allocated.\n"-
2323 "To do so, destroy() the texture and then create() and setFixedSamplePositions()");-
2324 return;
never executed: return;
0
2325 }-
2326-
2327 switch (d->target) {-
2328 case
never executed: case QOpenGLTexture::Target2DMultisample:
QOpenGLTexture::Target2DMultisample:
never executed: case QOpenGLTexture::Target2DMultisample:
0
2329 case
never executed: case QOpenGLTexture::Target2DMultisampleArray:
QOpenGLTexture::Target2DMultisampleArray:
never executed: case QOpenGLTexture::Target2DMultisampleArray:
0
2330 d->fixedSamplePositions = fixed;-
2331 break;
never executed: break;
0
2332-
2333 case
never executed: case QOpenGLTexture::Target1D:
QOpenGLTexture::Target1D:
never executed: case QOpenGLTexture::Target1D:
0
2334 case
never executed: case QOpenGLTexture::Target2D:
QOpenGLTexture::Target2D:
never executed: case QOpenGLTexture::Target2D:
0
2335 case
never executed: case QOpenGLTexture::Target3D:
QOpenGLTexture::Target3D:
never executed: case QOpenGLTexture::Target3D:
0
2336 case
never executed: case QOpenGLTexture::Target1DArray:
QOpenGLTexture::Target1DArray:
never executed: case QOpenGLTexture::Target1DArray:
0
2337 case
never executed: case QOpenGLTexture::Target2DArray:
QOpenGLTexture::Target2DArray:
never executed: case QOpenGLTexture::Target2DArray:
0
2338 case
never executed: case QOpenGLTexture::TargetCubeMap:
QOpenGLTexture::TargetCubeMap:
never executed: case QOpenGLTexture::TargetCubeMap:
0
2339 case
never executed: case QOpenGLTexture::TargetCubeMapArray:
QOpenGLTexture::TargetCubeMapArray:
never executed: case QOpenGLTexture::TargetCubeMapArray:
0
2340 case
never executed: case QOpenGLTexture::TargetBuffer:
QOpenGLTexture::TargetBuffer:
never executed: case QOpenGLTexture::TargetBuffer:
0
2341 case
never executed: case QOpenGLTexture::TargetRectangle:
QOpenGLTexture::TargetRectangle:
never executed: case QOpenGLTexture::TargetRectangle:
0
2342-
2343 QMessageLogger(__FILE__, 2929, __PRETTY_FUNCTION__).warning("Texture target does not support multisampling");-
2344 break;
never executed: break;
0
2345 }-
2346}
never executed: end of block
0
2347bool QOpenGLTexture::isFixedSamplePositions() const-
2348{-
2349 const QOpenGLTexturePrivate * const d = d_func();-
2350 return
never executed: return d->fixedSamplePositions;
d->fixedSamplePositions;
never executed: return d->fixedSamplePositions;
0
2351}-
2352void QOpenGLTexture::allocateStorage()-
2353{-
2354 QOpenGLTexturePrivate * const d = d_func();-
2355 if (d->create()
d->create()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2356 const QOpenGLTexture::PixelFormat pixelFormat = pixelFormatCompatibleWithInternalFormat(d->format);-
2357 const QOpenGLTexture::PixelType pixelType = pixelTypeCompatibleWithInternalFormat(d->format);-
2358 d->allocateStorage(pixelFormat, pixelType);-
2359 }
never executed: end of block
0
2360}
never executed: end of block
0
2361void QOpenGLTexture::allocateStorage(QOpenGLTexture::PixelFormat pixelFormat, QOpenGLTexture::PixelType pixelType)-
2362{-
2363 QOpenGLTexturePrivate * const d = d_func();-
2364 if (d->create()
d->create()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2365 d->allocateStorage(pixelFormat, pixelType);
never executed: d->allocateStorage(pixelFormat, pixelType);
0
2366}
never executed: end of block
0
2367bool QOpenGLTexture::isStorageAllocated() const-
2368{-
2369 const QOpenGLTexturePrivate * const d = d_func();-
2370 return
never executed: return d->storageAllocated;
d->storageAllocated;
never executed: return d->storageAllocated;
0
2371}-
2372QOpenGLTexture *QOpenGLTexture::createTextureView(Target target,-
2373 TextureFormat viewFormat,-
2374 int minimumMipmapLevel, int maximumMipmapLevel,-
2375 int minimumLayer, int maximumLayer) const-
2376{-
2377 const QOpenGLTexturePrivate * const d = d_func();-
2378 if (!isStorageAllocated()
!isStorageAllocated()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2379 QMessageLogger(__FILE__, 3069, __PRETTY_FUNCTION__).warning("Cannot set create a texture view of a texture that does not have storage allocated.");-
2380 return
never executed: return 0;
0;
never executed: return 0;
0
2381 }-
2382 ((!(maximumMipmapLevel >= minimumMipmapLevel)) ? qt_assert("maximumMipmapLevel >= minimumMipmapLevel",__FILE__,3072) : qt_noop());-
2383 ((!(maximumLayer >= minimumLayer)) ? qt_assert("maximumLayer >= minimumLayer",__FILE__,3073) : qt_noop());-
2384 return
never executed: return d->createTextureView(target, viewFormat, minimumMipmapLevel, maximumMipmapLevel, minimumLayer, maximumLayer);
d->createTextureView(target, viewFormat,
never executed: return d->createTextureView(target, viewFormat, minimumMipmapLevel, maximumMipmapLevel, minimumLayer, maximumLayer);
0
2385 minimumMipmapLevel, maximumMipmapLevel,
never executed: return d->createTextureView(target, viewFormat, minimumMipmapLevel, maximumMipmapLevel, minimumLayer, maximumLayer);
0
2386 minimumLayer, maximumLayer);
never executed: return d->createTextureView(target, viewFormat, minimumMipmapLevel, maximumMipmapLevel, minimumLayer, maximumLayer);
0
2387}-
2388-
2389-
2390-
2391-
2392-
2393-
2394-
2395bool QOpenGLTexture::isTextureView() const-
2396{-
2397 const QOpenGLTexturePrivate * const d = d_func();-
2398 ((!(d->textureId)) ? qt_assert("d->textureId",__FILE__,3088) : qt_noop());-
2399 return
never executed: return d->textureView;
d->textureView;
never executed: return d->textureView;
0
2400}-
2401void QOpenGLTexture::setData(int mipLevel, int layer, CubeMapFace cubeFace,-
2402 PixelFormat sourceFormat, PixelType sourceType,-
2403 const void *data, const QOpenGLPixelTransferOptions * const options)-
2404{-
2405 QOpenGLTexturePrivate * const d = d_func();-
2406 ((!(d->textureId)) ? qt_assert("d->textureId",__FILE__,3113) : qt_noop());-
2407 if (!isStorageAllocated()
!isStorageAllocated()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2408 QMessageLogger(__FILE__, 3115, __PRETTY_FUNCTION__).warning("Cannot set data on a texture that does not have storage allocated.\n"-
2409 "To do so call allocateStorage() before this function");-
2410 return;
never executed: return;
0
2411 }-
2412 d->setData(mipLevel, layer, cubeFace, sourceFormat, sourceType, data, options);-
2413}
never executed: end of block
0
2414-
2415-
2416-
2417-
2418-
2419void QOpenGLTexture::setData(int mipLevel, int layer,-
2420 PixelFormat sourceFormat, PixelType sourceType,-
2421 const void *data, const QOpenGLPixelTransferOptions * const options)-
2422{-
2423 QOpenGLTexturePrivate * const d = d_func();-
2424 ((!(d->textureId)) ? qt_assert("d->textureId",__FILE__,3131) : qt_noop());-
2425 d->setData(mipLevel, layer, QOpenGLTexture::CubeMapPositiveX, sourceFormat, sourceType, data, options);-
2426}
never executed: end of block
0
2427-
2428-
2429-
2430-
2431-
2432void QOpenGLTexture::setData(int mipLevel,-
2433 PixelFormat sourceFormat, PixelType sourceType,-
2434 const void *data, const QOpenGLPixelTransferOptions * const options)-
2435{-
2436 QOpenGLTexturePrivate * const d = d_func();-
2437 ((!(d->textureId)) ? qt_assert("d->textureId",__FILE__,3144) : qt_noop());-
2438 d->setData(mipLevel, 0, QOpenGLTexture::CubeMapPositiveX, sourceFormat, sourceType, data, options);-
2439}
never executed: end of block
0
2440-
2441-
2442-
2443-
2444-
2445void QOpenGLTexture::setData(PixelFormat sourceFormat, PixelType sourceType,-
2446 const void *data, const QOpenGLPixelTransferOptions * const options)-
2447{-
2448 QOpenGLTexturePrivate * const d = d_func();-
2449 ((!(d->textureId)) ? qt_assert("d->textureId",__FILE__,3156) : qt_noop());-
2450 d->setData(0, 0, QOpenGLTexture::CubeMapPositiveX, sourceFormat, sourceType, data, options);-
2451}
never executed: end of block
0
2452void QOpenGLTexture::setData(int mipLevel, int layer, CubeMapFace cubeFace,-
2453 PixelFormat sourceFormat, PixelType sourceType,-
2454 void *data, const QOpenGLPixelTransferOptions * const options)-
2455{-
2456 QOpenGLTexturePrivate * const d = d_func();-
2457 ((!(d->textureId)) ? qt_assert("d->textureId",__FILE__,3172) : qt_noop());-
2458 if (!isStorageAllocated()
!isStorageAllocated()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2459 QMessageLogger(__FILE__, 3174, __PRETTY_FUNCTION__).warning("Cannot set data on a texture that does not have storage allocated.\n"-
2460 "To do so call allocateStorage() before this function");-
2461 return;
never executed: return;
0
2462 }-
2463 d->setData(mipLevel, layer, cubeFace, sourceFormat, sourceType, data, options);-
2464}
never executed: end of block
0
2465-
2466-
2467-
2468-
2469-
2470void QOpenGLTexture::setData(int mipLevel, int layer,-
2471 PixelFormat sourceFormat, PixelType sourceType,-
2472 void *data, const QOpenGLPixelTransferOptions * const options)-
2473{-
2474 QOpenGLTexturePrivate * const d = d_func();-
2475 ((!(d->textureId)) ? qt_assert("d->textureId",__FILE__,3190) : qt_noop());-
2476 d->setData(mipLevel, layer, QOpenGLTexture::CubeMapPositiveX, sourceFormat, sourceType, data, options);-
2477}
never executed: end of block
0
2478-
2479-
2480-
2481-
2482-
2483void QOpenGLTexture::setData(int mipLevel,-
2484 PixelFormat sourceFormat, PixelType sourceType,-
2485 void *data, const QOpenGLPixelTransferOptions * const options)-
2486{-
2487 QOpenGLTexturePrivate * const d = d_func();-
2488 ((!(d->textureId)) ? qt_assert("d->textureId",__FILE__,3203) : qt_noop());-
2489 d->setData(mipLevel, 0, QOpenGLTexture::CubeMapPositiveX, sourceFormat, sourceType, data, options);-
2490}
never executed: end of block
0
2491-
2492-
2493-
2494-
2495-
2496void QOpenGLTexture::setData(PixelFormat sourceFormat, PixelType sourceType,-
2497 void *data, const QOpenGLPixelTransferOptions * const options)-
2498{-
2499 QOpenGLTexturePrivate * const d = d_func();-
2500 ((!(d->textureId)) ? qt_assert("d->textureId",__FILE__,3215) : qt_noop());-
2501 d->setData(0, 0, QOpenGLTexture::CubeMapPositiveX, sourceFormat, sourceType, data, options);-
2502}
never executed: end of block
0
2503void QOpenGLTexture::setData(const QImage& image, MipMapGeneration genMipMaps)-
2504{-
2505 QOpenGLContext *context = QOpenGLContext::currentContext();-
2506 if (!context
!contextDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2507 QMessageLogger(__FILE__, 3231, __PRETTY_FUNCTION__).warning("QOpenGLTexture::setData() requires a valid current context");-
2508 return;
never executed: return;
0
2509 }-
2510-
2511 if (image.isNull()
image.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2512 QMessageLogger(__FILE__, 3236, __PRETTY_FUNCTION__).warning("QOpenGLTexture::setData() tried to set a null image");-
2513 return;
never executed: return;
0
2514 }-
2515-
2516 if (context->isOpenGLES()
context->isOpenGLES()Description
TRUEnever evaluated
FALSEnever evaluated
&& context->format().majorVersion() < 3
context->forma...rVersion() < 3Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2517 setFormat(QOpenGLTexture::RGBAFormat);
never executed: setFormat(QOpenGLTexture::RGBAFormat);
0
2518 else-
2519 setFormat(QOpenGLTexture::RGBA8_UNorm);
never executed: setFormat(QOpenGLTexture::RGBA8_UNorm);
0
2520-
2521 setSize(image.width(), image.height());-
2522 setMipLevels(genMipMaps == GenerateMipMaps ? maximumMipLevels() : 1);-
2523 allocateStorage(QOpenGLTexture::RGBA, QOpenGLTexture::UInt8);-
2524-
2525-
2526 QImage glImage = image.convertToFormat(QImage::Format_RGBA8888);-
2527 QOpenGLPixelTransferOptions uploadOptions;-
2528 uploadOptions.setAlignment(1);-
2529 setData(0, QOpenGLTexture::RGBA, QOpenGLTexture::UInt8, glImage.constBits(), &uploadOptions);-
2530}
never executed: end of block
0
2531void QOpenGLTexture::setCompressedData(int mipLevel, int layer, CubeMapFace cubeFace,-
2532 int dataSize, const void *data,-
2533 const QOpenGLPixelTransferOptions * const options)-
2534{-
2535 QOpenGLTexturePrivate * const d = d_func();-
2536 ((!(d->textureId)) ? qt_assert("d->textureId",__FILE__,3271) : qt_noop());-
2537 if (!isStorageAllocated()
!isStorageAllocated()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2538 QMessageLogger(__FILE__, 3273, __PRETTY_FUNCTION__).warning("Cannot set data on a texture that does not have storage allocated.\n"-
2539 "To do so call allocateStorage() before this function");-
2540 return;
never executed: return;
0
2541 }-
2542 d->setCompressedData(mipLevel, layer, cubeFace, dataSize, data, options);-
2543}
never executed: end of block
0
2544-
2545-
2546-
2547-
2548void QOpenGLTexture::setCompressedData(int mipLevel, int layer, int dataSize, const void *data,-
2549 const QOpenGLPixelTransferOptions * const options)-
2550{-
2551 QOpenGLTexturePrivate * const d = d_func();-
2552 ((!(d->textureId)) ? qt_assert("d->textureId",__FILE__,3287) : qt_noop());-
2553 d->setCompressedData(mipLevel, layer, QOpenGLTexture::CubeMapPositiveX, dataSize, data, options);-
2554}
never executed: end of block
0
2555-
2556-
2557-
2558-
2559void QOpenGLTexture::setCompressedData(int mipLevel, int dataSize, const void *data,-
2560 const QOpenGLPixelTransferOptions * const options)-
2561{-
2562 QOpenGLTexturePrivate * const d = d_func();-
2563 ((!(d->textureId)) ? qt_assert("d->textureId",__FILE__,3298) : qt_noop());-
2564 d->setCompressedData(mipLevel, 0, QOpenGLTexture::CubeMapPositiveX, dataSize, data, options);-
2565}
never executed: end of block
0
2566-
2567-
2568-
2569-
2570void QOpenGLTexture::setCompressedData(int dataSize, const void *data,-
2571 const QOpenGLPixelTransferOptions * const options)-
2572{-
2573 QOpenGLTexturePrivate * const d = d_func();-
2574 ((!(d->textureId)) ? qt_assert("d->textureId",__FILE__,3309) : qt_noop());-
2575 d->setCompressedData(0, 0, QOpenGLTexture::CubeMapPositiveX, dataSize, data, options);-
2576}
never executed: end of block
0
2577-
2578-
2579-
2580-
2581-
2582-
2583void QOpenGLTexture::setCompressedData(int mipLevel, int layer, CubeMapFace cubeFace,-
2584 int dataSize, void *data,-
2585 const QOpenGLPixelTransferOptions * const options)-
2586{-
2587 QOpenGLTexturePrivate * const d = d_func();-
2588 ((!(d->textureId)) ? qt_assert("d->textureId",__FILE__,3323) : qt_noop());-
2589 if (!isStorageAllocated()
!isStorageAllocated()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2590 QMessageLogger(__FILE__, 3325, __PRETTY_FUNCTION__).warning("Cannot set data on a texture that does not have storage allocated.\n"-
2591 "To do so call allocateStorage() before this function");-
2592 return;
never executed: return;
0
2593 }-
2594 d->setCompressedData(mipLevel, layer, cubeFace, dataSize, data, options);-
2595}
never executed: end of block
0
2596-
2597-
2598-
2599-
2600-
2601void QOpenGLTexture::setCompressedData(int mipLevel, int layer, int dataSize, void *data,-
2602 const QOpenGLPixelTransferOptions * const options)-
2603{-
2604 QOpenGLTexturePrivate * const d = d_func();-
2605 ((!(d->textureId)) ? qt_assert("d->textureId",__FILE__,3340) : qt_noop());-
2606 d->setCompressedData(mipLevel, layer, QOpenGLTexture::CubeMapPositiveX, dataSize, data, options);-
2607}
never executed: end of block
0
2608-
2609-
2610-
2611-
2612-
2613void QOpenGLTexture::setCompressedData(int mipLevel, int dataSize, void *data,-
2614 const QOpenGLPixelTransferOptions * const options)-
2615{-
2616 QOpenGLTexturePrivate * const d = d_func();-
2617 ((!(d->textureId)) ? qt_assert("d->textureId",__FILE__,3352) : qt_noop());-
2618 d->setCompressedData(mipLevel, 0, QOpenGLTexture::CubeMapPositiveX, dataSize, data, options);-
2619}
never executed: end of block
0
2620-
2621-
2622-
2623-
2624-
2625void QOpenGLTexture::setCompressedData(int dataSize, void *data,-
2626 const QOpenGLPixelTransferOptions * const options)-
2627{-
2628 QOpenGLTexturePrivate * const d = d_func();-
2629 ((!(d->textureId)) ? qt_assert("d->textureId",__FILE__,3364) : qt_noop());-
2630 d->setCompressedData(0, 0, QOpenGLTexture::CubeMapPositiveX, dataSize, data, options);-
2631}
never executed: end of block
0
2632-
2633-
2634-
2635-
2636-
2637-
2638bool QOpenGLTexture::hasFeature(Feature feature)-
2639{-
2640 QOpenGLContext *ctx = QOpenGLContext::currentContext();-
2641 if (!ctx
!ctxDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
2642 QMessageLogger(__FILE__, 3377, __PRETTY_FUNCTION__).warning("QOpenGLTexture::hasFeature() requires a valid current context");-
2643 return
never executed: return false;
false;
never executed: return false;
0
2644 }-
2645-
2646 QSurfaceFormat f = ctx->format();-
2647-
2648 bool supported = false;-
2649-
2650-
2651 if (!ctx->isOpenGLES()
!ctx->isOpenGLES()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2652 switch (feature) {-
2653 case
never executed: case ImmutableMultisampleStorage:
ImmutableMultisampleStorage:
never executed: case ImmutableMultisampleStorage:
0
2654 supported = f.version() >= qMakePair(4, 3)
f.version() >= qMakePair(4, 3)Description
TRUEnever evaluated
FALSEnever evaluated
0
2655 || ctx->hasExtension(([]() -> QByteArray { enum { Size = sizeof("GL_ARB_texture_storage_multisample") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "GL_ARB_texture_storage_multisample" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()))
ctx->hasExtens...turn ba; }()))Description
TRUEnever evaluated
FALSEnever evaluated
;
0
2656 break;
never executed: break;
0
2657-
2658 case
never executed: case TextureBuffer:
TextureBuffer:
never executed: case TextureBuffer:
0
2659 supported = f.version() >= qMakePair(3, 0)
f.version() >= qMakePair(3, 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
2660 || ctx->hasExtension(([]() -> QByteArray { enum { Size = sizeof("GL_ARB_texture_buffer_object") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "GL_ARB_texture_buffer_object" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()))
ctx->hasExtens...turn ba; }()))Description
TRUEnever evaluated
FALSEnever evaluated
;
0
2661 break;
never executed: break;
0
2662-
2663 case
never executed: case StencilTexturing:
StencilTexturing:
never executed: case StencilTexturing:
0
2664 supported = f.version() >= qMakePair(4, 3)
f.version() >= qMakePair(4, 3)Description
TRUEnever evaluated
FALSEnever evaluated
0
2665 || ctx->hasExtension(([]() -> QByteArray { enum { Size = sizeof("GL_ARB_stencil_texturing") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "GL_ARB_stencil_texturing" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()))
ctx->hasExtens...turn ba; }()))Description
TRUEnever evaluated
FALSEnever evaluated
;
0
2666 break;
never executed: break;
0
2667-
2668 case
never executed: case ImmutableStorage:
ImmutableStorage:
never executed: case ImmutableStorage:
0
2669 supported = f.version() >= qMakePair(4, 2)
f.version() >= qMakePair(4, 2)Description
TRUEnever evaluated
FALSEnever evaluated
0
2670 || ctx->hasExtension(([]() -> QByteArray { enum { Size = sizeof("GL_ARB_texture_storage") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "GL_ARB_texture_storage" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()))
ctx->hasExtens...turn ba; }()))Description
TRUEnever evaluated
FALSEnever evaluated
0
2671 || ctx->hasExtension(([]() -> QByteArray { enum { Size = sizeof("GL_EXT_texture_storage") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "GL_EXT_texture_storage" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()))
ctx->hasExtens...turn ba; }()))Description
TRUEnever evaluated
FALSEnever evaluated
;
0
2672 break;
never executed: break;
0
2673-
2674 case
never executed: case TextureCubeMapArrays:
TextureCubeMapArrays:
never executed: case TextureCubeMapArrays:
0
2675 supported = f.version() >= qMakePair(4, 0)
f.version() >= qMakePair(4, 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
2676 || ctx->hasExtension(([]() -> QByteArray { enum { Size = sizeof("ARB_texture_cube_map_array") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "ARB_texture_cube_map_array" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()))
ctx->hasExtens...turn ba; }()))Description
TRUEnever evaluated
FALSEnever evaluated
;
0
2677 break;
never executed: break;
0
2678-
2679 case
never executed: case Swizzle:
Swizzle:
never executed: case Swizzle:
0
2680 supported = f.version() >= qMakePair(3, 3)
f.version() >= qMakePair(3, 3)Description
TRUEnever evaluated
FALSEnever evaluated
0
2681 || ctx->hasExtension(([]() -> QByteArray { enum { Size = sizeof("GL_ARB_texture_swizzle") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "GL_ARB_texture_swizzle" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()))
ctx->hasExtens...turn ba; }()))Description
TRUEnever evaluated
FALSEnever evaluated
;
0
2682 break;
never executed: break;
0
2683-
2684 case
never executed: case TextureMultisample:
TextureMultisample:
never executed: case TextureMultisample:
0
2685 supported = f.version() >= qMakePair(3, 2)
f.version() >= qMakePair(3, 2)Description
TRUEnever evaluated
FALSEnever evaluated
0
2686 || ctx->hasExtension(([]() -> QByteArray { enum { Size = sizeof("GL_ARB_texture_multisample") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "GL_ARB_texture_multisample" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()))
ctx->hasExtens...turn ba; }()))Description
TRUEnever evaluated
FALSEnever evaluated
;
0
2687 break;
never executed: break;
0
2688-
2689 case
never executed: case TextureArrays:
TextureArrays:
never executed: case TextureArrays:
0
2690 supported = f.version() >= qMakePair(3, 0)
f.version() >= qMakePair(3, 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
2691 || ctx->hasExtension(([]() -> QByteArray { enum { Size = sizeof("GL_EXT_texture_array") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "GL_EXT_texture_array" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()))
ctx->hasExtens...turn ba; }()))Description
TRUEnever evaluated
FALSEnever evaluated
;
0
2692 break;
never executed: break;
0
2693-
2694 case
never executed: case TextureRectangle:
TextureRectangle:
never executed: case TextureRectangle:
0
2695 supported = f.version() >= qMakePair(2, 1)
f.version() >= qMakePair(2, 1)Description
TRUEnever evaluated
FALSEnever evaluated
0
2696 || ctx->hasExtension(([]() -> QByteArray { enum { Size = sizeof("ARB_texture_rectangle") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "ARB_texture_rectangle" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()))
ctx->hasExtens...turn ba; }()))Description
TRUEnever evaluated
FALSEnever evaluated
;
0
2697 break;
never executed: break;
0
2698-
2699 case
never executed: case Texture3D:
Texture3D:
never executed: case Texture3D:
0
2700 supported = f.version() >= qMakePair(1, 3);-
2701 break;
never executed: break;
0
2702-
2703 case
never executed: case AnisotropicFiltering:
AnisotropicFiltering:
never executed: case AnisotropicFiltering:
0
2704 supported = ctx->hasExtension(([]() -> QByteArray { enum { Size = sizeof("GL_EXT_texture_filter_anisotropic") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "GL_EXT_texture_filter_anisotropic" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return
never executed: return ba;
ba;
never executed: return ba;
}()));
0
2705 break;
never executed: break;
0
2706-
2707 case
never executed: case NPOTTextures:
NPOTTextures:
never executed: case NPOTTextures:
0
2708 case
never executed: case NPOTTextureRepeat:
NPOTTextureRepeat:
never executed: case NPOTTextureRepeat:
0
2709 supported = ctx->hasExtension(([]() -> QByteArray { enum { Size = sizeof("GL_ARB_texture_non_power_of_two") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "GL_ARB_texture_non_power_of_two" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return
never executed: return ba;
ba;
never executed: return ba;
}()));
0
2710 break;
never executed: break;
0
2711-
2712 case
never executed: case Texture1D:
Texture1D:
never executed: case Texture1D:
0
2713 supported = f.version() >= qMakePair(1, 1);-
2714 break;
never executed: break;
0
2715-
2716 case
never executed: case TextureComparisonOperators:
TextureComparisonOperators:
never executed: case TextureComparisonOperators:
0
2717-
2718-
2719-
2720-
2721 supported = f.version() >= qMakePair(1, 5)
f.version() >= qMakePair(1, 5)Description
TRUEnever evaluated
FALSEnever evaluated
0
2722 || (ctx->hasExtension(([]() -> QByteArray { enum { Size = sizeof("GL_ARB_shadow") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "GL_ARB_shadow" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()))
ctx->hasExtens...turn ba; }()))Description
TRUEnever evaluated
FALSEnever evaluated
0
2723 && ctx->hasExtension(([]() -> QByteArray { enum { Size = sizeof("GL_EXT_shadow_funcs") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "GL_EXT_shadow_funcs" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()))
ctx->hasExtens...turn ba; }()))Description
TRUEnever evaluated
FALSEnever evaluated
);
0
2724 break;
never executed: break;
0
2725-
2726 case
never executed: case TextureMipMapLevel:
TextureMipMapLevel:
never executed: case TextureMipMapLevel:
0
2727 supported = f.version() >= qMakePair(1, 2);-
2728 break;
never executed: break;
0
2729-
2730 case
never executed: case MaxFeatureFlag:
MaxFeatureFlag:
never executed: case MaxFeatureFlag:
0
2731 break;
never executed: break;
0
2732 }-
2733 }
never executed: end of block
0
2734-
2735 if (ctx->isOpenGLES()
ctx->isOpenGLES()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2736-
2737 {-
2738 const char *renderer = reinterpret_cast<const char *>(ctx->functions()->glGetString(0x1F01));-
2739 switch (feature) {-
2740 case
never executed: case ImmutableStorage:
ImmutableStorage:
never executed: case ImmutableStorage:
0
2741 supported = (f.version() >= qMakePair(3, 0)
f.version() >= qMakePair(3, 0)Description
TRUEnever evaluated
FALSEnever evaluated
|| ctx->hasExtension(([]() -> QByteArray { enum { Size = sizeof("EXT_texture_storage") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "EXT_texture_storage" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()))
ctx->hasExtens...turn ba; }()))Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2742 && !(renderer
rendererDescription
TRUEnever evaluated
FALSEnever evaluated
&& strstr(renderer, "Mali")
strstr(renderer, "Mali")Description
TRUEnever evaluated
FALSEnever evaluated
);
0
2743 break;
never executed: break;
0
2744-
2745 case
never executed: case ImmutableMultisampleStorage:
ImmutableMultisampleStorage:
never executed: case ImmutableMultisampleStorage:
0
2746 supported = f.version() >= qMakePair(3, 1);-
2747 break;
never executed: break;
0
2748-
2749 case
never executed: case TextureRectangle:
TextureRectangle:
never executed: case TextureRectangle:
0
2750 break;
never executed: break;
0
2751-
2752 case
never executed: case TextureArrays:
TextureArrays:
never executed: case TextureArrays:
0
2753 supported = f.version() >= qMakePair(3, 0);-
2754 break;
never executed: break;
0
2755-
2756 case
never executed: case Texture3D:
Texture3D:
never executed: case Texture3D:
0
2757 supported = f.version() >= qMakePair(3, 0)
f.version() >= qMakePair(3, 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
2758 || ctx->hasExtension(([]() -> QByteArray { enum { Size = sizeof("GL_OES_texture_3D") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "GL_OES_texture_3D" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()))
ctx->hasExtens...turn ba; }()))Description
TRUEnever evaluated
FALSEnever evaluated
;
0
2759 break;
never executed: break;
0
2760-
2761 case
never executed: case TextureMultisample:
TextureMultisample:
never executed: case TextureMultisample:
0
2762 supported = f.version() >= qMakePair(3, 1);-
2763 break;
never executed: break;
0
2764-
2765 case
never executed: case TextureBuffer:
TextureBuffer:
never executed: case TextureBuffer:
0
2766 break;
never executed: break;
0
2767-
2768 case
never executed: case TextureCubeMapArrays:
TextureCubeMapArrays:
never executed: case TextureCubeMapArrays:
0
2769 break;
never executed: break;
0
2770-
2771 case
never executed: case Swizzle:
Swizzle:
never executed: case Swizzle:
0
2772 supported = f.version() >= qMakePair(3, 0);-
2773 break;
never executed: break;
0
2774-
2775 case
never executed: case StencilTexturing:
StencilTexturing:
never executed: case StencilTexturing:
0
2776 break;
never executed: break;
0
2777-
2778 case
never executed: case AnisotropicFiltering:
AnisotropicFiltering:
never executed: case AnisotropicFiltering:
0
2779 supported = ctx->hasExtension(([]() -> QByteArray { enum { Size = sizeof("GL_EXT_texture_filter_anisotropic") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "GL_EXT_texture_filter_anisotropic" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return
never executed: return ba;
ba;
never executed: return ba;
}()));
0
2780 break;
never executed: break;
0
2781-
2782 case
never executed: case NPOTTextures:
NPOTTextures:
never executed: case NPOTTextures:
0
2783 case
never executed: case NPOTTextureRepeat:
NPOTTextureRepeat:
never executed: case NPOTTextureRepeat:
0
2784 supported = f.version() >= qMakePair(3,0)
f.version() >= qMakePair(3,0)Description
TRUEnever evaluated
FALSEnever evaluated
0
2785 || ctx->hasExtension(([]() -> QByteArray { enum { Size = sizeof("GL_OES_texture_npot") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "GL_OES_texture_npot" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()))
ctx->hasExtens...turn ba; }()))Description
TRUEnever evaluated
FALSEnever evaluated
0
2786 || ctx->hasExtension(([]() -> QByteArray { enum { Size = sizeof("GL_ARB_texture_non_power_of_two") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "GL_ARB_texture_non_power_of_two" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()))
ctx->hasExtens...turn ba; }()))Description
TRUEnever evaluated
FALSEnever evaluated
;
0
2787 break;
never executed: break;
0
2788-
2789 case
never executed: case Texture1D:
Texture1D:
never executed: case Texture1D:
0
2790 break;
never executed: break;
0
2791-
2792 case
never executed: case TextureComparisonOperators:
TextureComparisonOperators:
never executed: case TextureComparisonOperators:
0
2793 supported = f.version() >= qMakePair(3, 0)
f.version() >= qMakePair(3, 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
2794 || ctx->hasExtension(([]() -> QByteArray { enum { Size = sizeof("GL_EXT_shadow_samplers") - 1 }; static const QStaticByteArrayData<Size> qbytearray_literal = { { { { -1 } }, Size, 0, 0, sizeof(QByteArrayData) }, "GL_EXT_shadow_samplers" }; QByteArrayDataPtr holder = { qbytearray_literal.data_ptr() }; const QByteArray ba(holder); return ba; }()))
ctx->hasExtens...turn ba; }()))Description
TRUEnever evaluated
FALSEnever evaluated
;
0
2795 break;
never executed: break;
0
2796-
2797 case
never executed: case TextureMipMapLevel:
TextureMipMapLevel:
never executed: case TextureMipMapLevel:
0
2798 supported = f.version() >= qMakePair(3, 0);-
2799 break;
never executed: break;
0
2800-
2801 case
never executed: case MaxFeatureFlag:
MaxFeatureFlag:
never executed: case MaxFeatureFlag:
0
2802 break;
never executed: break;
0
2803 }-
2804 }
never executed: end of block
0
2805-
2806 return
never executed: return supported;
supported;
never executed: return supported;
0
2807}-
2808-
2809-
2810-
2811-
2812-
2813-
2814-
2815void QOpenGLTexture::setMipBaseLevel(int baseLevel)-
2816{-
2817 QOpenGLTexturePrivate * const d = d_func();-
2818 d->create();-
2819 if (!d->features.testFlag(TextureMipMapLevel)
!d->features.t...reMipMapLevel)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2820 QMessageLogger(__FILE__, 3555, __PRETTY_FUNCTION__).warning("QOpenGLTexture::setMipBaseLevel: requires OpenGL >= 1.2 or OpenGL ES >= 3.0");-
2821 return;
never executed: return;
0
2822 }-
2823 ((!(d->textureId)) ? qt_assert("d->textureId",__FILE__,3558) : qt_noop());-
2824 ((!(d->texFuncs)) ? qt_assert("d->texFuncs",__FILE__,3559) : qt_noop());-
2825 ((!(baseLevel <= d->maxLevel)) ? qt_assert("baseLevel <= d->maxLevel",__FILE__,3560) : qt_noop());-
2826 d->baseLevel = baseLevel;-
2827 d->texFuncs->glTextureParameteri(d->textureId, d->target, d->bindingTarget, 0x813C, baseLevel);-
2828}
never executed: end of block
0
2829-
2830-
2831-
2832-
2833-
2834-
2835-
2836int QOpenGLTexture::mipBaseLevel() const-
2837{-
2838 const QOpenGLTexturePrivate * const d = d_func();-
2839 return
never executed: return d->baseLevel;
d->baseLevel;
never executed: return d->baseLevel;
0
2840}-
2841-
2842-
2843-
2844-
2845-
2846-
2847-
2848void QOpenGLTexture::setMipMaxLevel(int maxLevel)-
2849{-
2850 QOpenGLTexturePrivate * const d = d_func();-
2851 d->create();-
2852 if (!d->features.testFlag(TextureMipMapLevel)
!d->features.t...reMipMapLevel)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2853 QMessageLogger(__FILE__, 3588, __PRETTY_FUNCTION__).warning("QOpenGLTexture::setMipMaxLevel: requires OpenGL >= 1.2 or OpenGL ES >= 3.0");-
2854 return;
never executed: return;
0
2855 }-
2856 ((!(d->textureId)) ? qt_assert("d->textureId",__FILE__,3591) : qt_noop());-
2857 ((!(d->texFuncs)) ? qt_assert("d->texFuncs",__FILE__,3592) : qt_noop());-
2858 ((!(d->baseLevel <= maxLevel)) ? qt_assert("d->baseLevel <= maxLevel",__FILE__,3593) : qt_noop());-
2859 d->maxLevel = maxLevel;-
2860 d->texFuncs->glTextureParameteri(d->textureId, d->target, d->bindingTarget, 0x813D, maxLevel);-
2861}
never executed: end of block
0
2862-
2863-
2864-
2865-
2866-
2867-
2868int QOpenGLTexture::mipMaxLevel() const-
2869{-
2870 const QOpenGLTexturePrivate * const d = d_func();-
2871 return
never executed: return d->maxLevel;
d->maxLevel;
never executed: return d->maxLevel;
0
2872}-
2873void QOpenGLTexture::setMipLevelRange(int baseLevel, int maxLevel)-
2874{-
2875 QOpenGLTexturePrivate * const d = d_func();-
2876 d->create();-
2877 if (!d->features.testFlag(TextureMipMapLevel)
!d->features.t...reMipMapLevel)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2878 QMessageLogger(__FILE__, 3621, __PRETTY_FUNCTION__).warning("QOpenGLTexture::setMipLevelRange: requires OpenGL >= 1.2 or OpenGL ES >= 3.0");-
2879 return;
never executed: return;
0
2880 }-
2881 ((!(d->textureId)) ? qt_assert("d->textureId",__FILE__,3624) : qt_noop());-
2882 ((!(d->texFuncs)) ? qt_assert("d->texFuncs",__FILE__,3625) : qt_noop());-
2883 ((!(baseLevel <= maxLevel)) ? qt_assert("baseLevel <= maxLevel",__FILE__,3626) : qt_noop());-
2884 d->texFuncs->glTextureParameteri(d->textureId, d->target, d->bindingTarget, 0x813C, baseLevel);-
2885 d->texFuncs->glTextureParameteri(d->textureId, d->target, d->bindingTarget, 0x813D, maxLevel);-
2886}
never executed: end of block
0
2887-
2888-
2889-
2890-
2891-
2892-
2893QPair<int, int> QOpenGLTexture::mipLevelRange() const-
2894{-
2895 const QOpenGLTexturePrivate * const d = d_func();-
2896 return
never executed: return qMakePair(d->baseLevel, d->maxLevel);
qMakePair(d->baseLevel, d->maxLevel);
never executed: return qMakePair(d->baseLevel, d->maxLevel);
0
2897}-
2898void QOpenGLTexture::setAutoMipMapGenerationEnabled(bool enabled)-
2899{-
2900 QOpenGLTexturePrivate * const d = d_func();-
2901 d->autoGenerateMipMaps = enabled;-
2902}
never executed: end of block
0
2903-
2904-
2905-
2906-
2907-
2908-
2909bool QOpenGLTexture::isAutoMipMapGenerationEnabled() const-
2910{-
2911 const QOpenGLTexturePrivate * const d = d_func();-
2912 return
never executed: return d->autoGenerateMipMaps;
d->autoGenerateMipMaps;
never executed: return d->autoGenerateMipMaps;
0
2913}-
2914void QOpenGLTexture::generateMipMaps()-
2915{-
2916 QOpenGLTexturePrivate * const d = d_func();-
2917 ((!(d->texFuncs)) ? qt_assert("d->texFuncs",__FILE__,3683) : qt_noop());-
2918 ((!(d->textureId)) ? qt_assert("d->textureId",__FILE__,3684) : qt_noop());-
2919 if (isCompressedFormat(d->format)
isCompressedFormat(d->format)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2920 if (QOpenGLContext *ctx = QOpenGLContext::currentContext()
QOpenGLContext...rrentContext()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2921 if (ctx->isOpenGLES()
ctx->isOpenGLES()Description
TRUEnever evaluated
FALSEnever evaluated
&& ctx->format().majorVersion() < 3
ctx->format()....rVersion() < 3Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2922 return;
never executed: return;
0
2923 }
never executed: end of block
0
2924 d->texFuncs->glGenerateTextureMipmap(d->textureId, d->target, d->bindingTarget);-
2925}
never executed: end of block
0
2926void QOpenGLTexture::generateMipMaps(int baseLevel, bool resetBaseLevel)-
2927{-
2928 QOpenGLTexturePrivate * const d = d_func();-
2929 ((!(d->texFuncs)) ? qt_assert("d->texFuncs",__FILE__,3708) : qt_noop());-
2930 ((!(d->textureId)) ? qt_assert("d->textureId",__FILE__,3709) : qt_noop());-
2931 if (isCompressedFormat(d->format)
isCompressedFormat(d->format)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2932 if (QOpenGLContext *ctx = QOpenGLContext::currentContext()
QOpenGLContext...rrentContext()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2933 if (ctx->isOpenGLES()
ctx->isOpenGLES()Description
TRUEnever evaluated
FALSEnever evaluated
&& ctx->format().majorVersion() < 3
ctx->format()....rVersion() < 3Description
TRUEnever evaluated
FALSEnever evaluated
)
0
2934 return;
never executed: return;
0
2935 }
never executed: end of block
0
2936 int oldBaseLevel;-
2937 if (resetBaseLevel
resetBaseLevelDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2938 oldBaseLevel = mipBaseLevel();
never executed: oldBaseLevel = mipBaseLevel();
0
2939 setMipBaseLevel(baseLevel);-
2940 d->texFuncs->glGenerateTextureMipmap(d->textureId, d->target, d->bindingTarget);-
2941 if (resetBaseLevel
resetBaseLevelDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
2942 setMipBaseLevel(oldBaseLevel);
never executed: setMipBaseLevel(oldBaseLevel);
0
2943}
never executed: end of block
0
2944void QOpenGLTexture::setSwizzleMask(SwizzleComponent component, SwizzleValue value)-
2945{-
2946-
2947 if (!QOpenGLContext::currentContext()->isOpenGLES()
!QOpenGLContex...->isOpenGLES()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2948 QOpenGLTexturePrivate * const d = d_func();-
2949 d->create();-
2950 ((!(d->texFuncs)) ? qt_assert("d->texFuncs",__FILE__,3742) : qt_noop());-
2951 ((!(d->textureId)) ? qt_assert("d->textureId",__FILE__,3743) : qt_noop());-
2952 if (!d->features.testFlag(Swizzle)
!d->features.testFlag(Swizzle)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2953 QMessageLogger(__FILE__, 3745, __PRETTY_FUNCTION__).warning("QOpenGLTexture::setSwizzleMask() requires OpenGL >= 3.3");-
2954 return;
never executed: return;
0
2955 }-
2956 d->swizzleMask[component - SwizzleRed] = value;-
2957 d->texFuncs->glTextureParameteri(d->textureId, d->target, d->bindingTarget, component, value);-
2958 return;
never executed: return;
0
2959 }-
2960-
2961-
2962-
2963-
2964 QMessageLogger(__FILE__, 3756, __PRETTY_FUNCTION__).warning("QOpenGLTexture: Texture swizzling is not supported");-
2965}
never executed: end of block
0
2966-
2967-
2968-
2969-
2970-
2971-
2972void QOpenGLTexture::setSwizzleMask(SwizzleValue r, SwizzleValue g,-
2973 SwizzleValue b, SwizzleValue a)-
2974{-
2975-
2976 if (!QOpenGLContext::currentContext()->isOpenGLES()
!QOpenGLContex...->isOpenGLES()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2977 QOpenGLTexturePrivate * const d = d_func();-
2978 d->create();-
2979 ((!(d->texFuncs)) ? qt_assert("d->texFuncs",__FILE__,3771) : qt_noop());-
2980 ((!(d->textureId)) ? qt_assert("d->textureId",__FILE__,3772) : qt_noop());-
2981 if (!d->features.testFlag(Swizzle)
!d->features.testFlag(Swizzle)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
2982 QMessageLogger(__FILE__, 3774, __PRETTY_FUNCTION__).warning("QOpenGLTexture::setSwizzleMask() requires OpenGL >= 3.3");-
2983 return;
never executed: return;
0
2984 }-
2985 GLint swizzleMask[] = {GLint(r), GLint(g), GLint(b), GLint(a)};-
2986 d->swizzleMask[0] = r;-
2987 d->swizzleMask[1] = g;-
2988 d->swizzleMask[2] = b;-
2989 d->swizzleMask[3] = a;-
2990 d->texFuncs->glTextureParameteriv(d->textureId, d->target, d->bindingTarget, 0x8E46, swizzleMask);-
2991 return;
never executed: return;
0
2992 }-
2993-
2994-
2995-
2996-
2997-
2998-
2999 QMessageLogger(__FILE__, 3791, __PRETTY_FUNCTION__).warning("QOpenGLTexture: Texture swizzling is not supported");-
3000}
never executed: end of block
0
3001-
3002-
3003-
3004-
3005QOpenGLTexture::SwizzleValue QOpenGLTexture::swizzleMask(SwizzleComponent component) const-
3006{-
3007 const QOpenGLTexturePrivate * const d = d_func();-
3008 return
never executed: return d->swizzleMask[component - SwizzleRed];
d->swizzleMask[component - SwizzleRed];
never executed: return d->swizzleMask[component - SwizzleRed];
0
3009}-
3010void QOpenGLTexture::setDepthStencilMode(QOpenGLTexture::DepthStencilMode mode)-
3011{-
3012-
3013 if (!QOpenGLContext::currentContext()->isOpenGLES()
!QOpenGLContex...->isOpenGLES()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3014 QOpenGLTexturePrivate * const d = d_func();-
3015 d->create();-
3016 ((!(d->texFuncs)) ? qt_assert("d->texFuncs",__FILE__,3831) : qt_noop());-
3017 ((!(d->textureId)) ? qt_assert("d->textureId",__FILE__,3832) : qt_noop());-
3018 if (!d->features.testFlag(StencilTexturing)
!d->features.t...ncilTexturing)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3019 QMessageLogger(__FILE__, 3834, __PRETTY_FUNCTION__).warning("QOpenGLTexture::setDepthStencilMode() requires OpenGL >= 4.3 or GL_ARB_stencil_texturing");-
3020 return;
never executed: return;
0
3021 }-
3022 d->depthStencilMode = mode;-
3023 d->texFuncs->glTextureParameteri(d->textureId, d->target, d->bindingTarget, 0x90EA, mode);-
3024 return;
never executed: return;
0
3025 }-
3026-
3027-
3028-
3029 QMessageLogger(__FILE__, 3844, __PRETTY_FUNCTION__).warning("QOpenGLTexture: DepthStencil Mode is not supported");-
3030}
never executed: end of block
0
3031-
3032-
3033-
3034-
3035-
3036-
3037-
3038QOpenGLTexture::DepthStencilMode QOpenGLTexture::depthStencilMode() const-
3039{-
3040 const QOpenGLTexturePrivate * const d = d_func();-
3041 return
never executed: return d->depthStencilMode;
d->depthStencilMode;
never executed: return d->depthStencilMode;
0
3042}-
3043void QOpenGLTexture::setComparisonFunction(QOpenGLTexture::ComparisonFunction function)-
3044{-
3045 QOpenGLTexturePrivate * const d = d_func();-
3046 d->create();-
3047 if (!d->features.testFlag(TextureComparisonOperators)
!d->features.t...isonOperators)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3048 QMessageLogger(__FILE__, 3889, __PRETTY_FUNCTION__).warning("QOpenGLTexture::setComparisonFunction: requires OpenGL >= 1.5 or OpenGL ES >= 3.0");-
3049 return;
never executed: return;
0
3050 }-
3051 d->comparisonFunction = function;-
3052 d->texFuncs->glTextureParameteri(d->textureId, d->target, d->bindingTarget, 0x884D, function);-
3053}
never executed: end of block
0
3054QOpenGLTexture::ComparisonFunction QOpenGLTexture::comparisonFunction() const-
3055{-
3056 const QOpenGLTexturePrivate * const d = d_func();-
3057 return
never executed: return d->comparisonFunction;
d->comparisonFunction;
never executed: return d->comparisonFunction;
0
3058}-
3059void QOpenGLTexture::setComparisonMode(QOpenGLTexture::ComparisonMode mode)-
3060{-
3061 QOpenGLTexturePrivate * const d = d_func();-
3062 d->create();-
3063 if (!d->features.testFlag(TextureComparisonOperators)
!d->features.t...isonOperators)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3064 QMessageLogger(__FILE__, 3932, __PRETTY_FUNCTION__).warning("QOpenGLTexture::setComparisonMode: requires OpenGL >= 1.5 or OpenGL ES >= 3.0");-
3065 return;
never executed: return;
0
3066 }-
3067 d->comparisonMode = mode;-
3068 d->texFuncs->glTextureParameteri(d->textureId, d->target, d->bindingTarget, 0x884C, mode);-
3069}
never executed: end of block
0
3070QOpenGLTexture::ComparisonMode QOpenGLTexture::comparisonMode() const-
3071{-
3072 const QOpenGLTexturePrivate * const d = d_func();-
3073 return
never executed: return d->comparisonMode;
d->comparisonMode;
never executed: return d->comparisonMode;
0
3074}-
3075-
3076-
3077-
3078-
3079-
3080-
3081void QOpenGLTexture::setMinificationFilter(QOpenGLTexture::Filter filter)-
3082{-
3083 QOpenGLTexturePrivate * const d = d_func();-
3084 d->create();-
3085 ((!(d->texFuncs)) ? qt_assert("d->texFuncs",__FILE__,3962) : qt_noop());-
3086 ((!(d->textureId)) ? qt_assert("d->textureId",__FILE__,3963) : qt_noop());-
3087 d->minFilter = filter;-
3088 d->texFuncs->glTextureParameteri(d->textureId, d->target, d->bindingTarget, 0x2801, filter);-
3089}
never executed: end of block
0
3090-
3091-
3092-
3093-
3094-
3095-
3096QOpenGLTexture::Filter QOpenGLTexture::minificationFilter() const-
3097{-
3098 const QOpenGLTexturePrivate * const d = d_func();-
3099 return
never executed: return d->minFilter;
d->minFilter;
never executed: return d->minFilter;
0
3100}-
3101-
3102-
3103-
3104-
3105-
3106-
3107void QOpenGLTexture::setMagnificationFilter(QOpenGLTexture::Filter filter)-
3108{-
3109 QOpenGLTexturePrivate * const d = d_func();-
3110 d->create();-
3111 ((!(d->texFuncs)) ? qt_assert("d->texFuncs",__FILE__,3988) : qt_noop());-
3112 ((!(d->textureId)) ? qt_assert("d->textureId",__FILE__,3989) : qt_noop());-
3113 d->magFilter = filter;-
3114 d->texFuncs->glTextureParameteri(d->textureId, d->target, d->bindingTarget, 0x2800, filter);-
3115}
never executed: end of block
0
3116-
3117-
3118-
3119-
3120-
3121-
3122QOpenGLTexture::Filter QOpenGLTexture::magnificationFilter() const-
3123{-
3124 const QOpenGLTexturePrivate * const d = d_func();-
3125 return
never executed: return d->magFilter;
d->magFilter;
never executed: return d->magFilter;
0
3126}-
3127-
3128-
3129-
3130-
3131-
3132-
3133-
3134void QOpenGLTexture::setMinMagFilters(QOpenGLTexture::Filter minificationFilter,-
3135 QOpenGLTexture::Filter magnificationFilter)-
3136{-
3137 QOpenGLTexturePrivate * const d = d_func();-
3138 d->create();-
3139 ((!(d->texFuncs)) ? qt_assert("d->texFuncs",__FILE__,4016) : qt_noop());-
3140 ((!(d->textureId)) ? qt_assert("d->textureId",__FILE__,4017) : qt_noop());-
3141 d->minFilter = minificationFilter;-
3142 d->magFilter = magnificationFilter;-
3143 d->texFuncs->glTextureParameteri(d->textureId, d->target, d->bindingTarget, 0x2801, minificationFilter);-
3144 d->texFuncs->glTextureParameteri(d->textureId, d->target, d->bindingTarget, 0x2800, magnificationFilter);-
3145}
never executed: end of block
0
3146-
3147-
3148-
3149-
3150-
3151-
3152QPair<QOpenGLTexture::Filter, QOpenGLTexture::Filter> QOpenGLTexture::minMagFilters() const-
3153{-
3154 const QOpenGLTexturePrivate * const d = d_func();-
3155 return
never executed: return QPair<QOpenGLTexture::Filter, QOpenGLTexture::Filter>(d->minFilter, d->magFilter);
QPair<QOpenGLTexture::Filter, QOpenGLTexture::Filter>(d->minFilter, d->magFilter);
never executed: return QPair<QOpenGLTexture::Filter, QOpenGLTexture::Filter>(d->minFilter, d->magFilter);
0
3156}-
3157-
3158-
3159-
3160-
3161-
3162-
3163-
3164void QOpenGLTexture::setMaximumAnisotropy(float anisotropy)-
3165{-
3166 QOpenGLTexturePrivate * const d = d_func();-
3167 d->create();-
3168 ((!(d->texFuncs)) ? qt_assert("d->texFuncs",__FILE__,4045) : qt_noop());-
3169 ((!(d->textureId)) ? qt_assert("d->textureId",__FILE__,4046) : qt_noop());-
3170 if (!d->features.testFlag(AnisotropicFiltering)
!d->features.t...opicFiltering)Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3171 QMessageLogger(__FILE__, 4048, __PRETTY_FUNCTION__).warning("QOpenGLTexture::setMaximumAnisotropy() requires GL_EXT_texture_filter_anisotropic");-
3172 return;
never executed: return;
0
3173 }-
3174 d->maxAnisotropy = anisotropy;-
3175 d->texFuncs->glTextureParameteri(d->textureId, d->target, d->bindingTarget, 0x84FE, anisotropy);-
3176}
never executed: end of block
0
3177-
3178-
3179-
3180-
3181-
3182-
3183-
3184float QOpenGLTexture::maximumAnisotropy() const-
3185{-
3186 const QOpenGLTexturePrivate * const d = d_func();-
3187 return
never executed: return d->maxAnisotropy;
d->maxAnisotropy;
never executed: return d->maxAnisotropy;
0
3188}-
3189-
3190-
3191-
3192-
3193-
3194-
3195void QOpenGLTexture::setWrapMode(QOpenGLTexture::WrapMode mode)-
3196{-
3197 QOpenGLTexturePrivate * const d = d_func();-
3198 d->create();-
3199 ((!(d->texFuncs)) ? qt_assert("d->texFuncs",__FILE__,4076) : qt_noop());-
3200 ((!(d->textureId)) ? qt_assert("d->textureId",__FILE__,4077) : qt_noop());-
3201 d->setWrapMode(mode);-
3202}
never executed: end of block
0
3203-
3204-
3205-
3206-
3207-
3208void QOpenGLTexture::setWrapMode(QOpenGLTexture::CoordinateDirection direction, QOpenGLTexture::WrapMode mode)-
3209{-
3210 QOpenGLTexturePrivate * const d = d_func();-
3211 d->create();-
3212 ((!(d->texFuncs)) ? qt_assert("d->texFuncs",__FILE__,4089) : qt_noop());-
3213 ((!(d->textureId)) ? qt_assert("d->textureId",__FILE__,4090) : qt_noop());-
3214 d->setWrapMode(direction, mode);-
3215}
never executed: end of block
0
3216-
3217-
3218-
3219-
3220-
3221-
3222QOpenGLTexture::WrapMode QOpenGLTexture::wrapMode(QOpenGLTexture::CoordinateDirection direction) const-
3223{-
3224 const QOpenGLTexturePrivate * const d = d_func();-
3225 return
never executed: return d->wrapMode(direction);
d->wrapMode(direction);
never executed: return d->wrapMode(direction);
0
3226}-
3227-
3228-
3229-
3230-
3231-
3232-
3233-
3234void QOpenGLTexture::setBorderColor(QColor color)-
3235{-
3236 setBorderColor(static_cast<float>(color.redF()), static_cast<float>(color.greenF()),-
3237 static_cast<float>(color.blueF()), static_cast<float>(color.alphaF()));-
3238}
never executed: end of block
0
3239-
3240-
3241-
3242-
3243-
3244-
3245void QOpenGLTexture::setBorderColor(float r, float g, float b, float a)-
3246{-
3247-
3248 if (!QOpenGLContext::currentContext()->isOpenGLES()
!QOpenGLContex...->isOpenGLES()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3249 QOpenGLTexturePrivate * const d = d_func();-
3250 d->create();-
3251 ((!(d->texFuncs)) ? qt_assert("d->texFuncs",__FILE__,4128) : qt_noop());-
3252 ((!(d->textureId)) ? qt_assert("d->textureId",__FILE__,4129) : qt_noop());-
3253 float values[4];-
3254 values[0] = r;-
3255 values[1] = g;-
3256 values[2] = b;-
3257 values[3] = a;-
3258 d->borderColor.clear();-
3259 for (int i = 0; i < 4
i < 4Description
TRUEnever evaluated
FALSEnever evaluated
; ++i)
0
3260 d->borderColor.append(QVariant(values[i]));
never executed: d->borderColor.append(QVariant(values[i]));
0
3261 d->texFuncs->glTextureParameterfv(d->textureId, d->target, d->bindingTarget, 0x1004, values);-
3262 return;
never executed: return;
0
3263 }-
3264-
3265-
3266-
3267-
3268-
3269-
3270 QMessageLogger(__FILE__, 4147, __PRETTY_FUNCTION__).warning("QOpenGLTexture: Border color is not supported");-
3271}
never executed: end of block
0
3272-
3273-
3274-
3275-
3276-
3277-
3278void QOpenGLTexture::setBorderColor(int r, int g, int b, int a)-
3279{-
3280-
3281 if (!QOpenGLContext::currentContext()->isOpenGLES()
!QOpenGLContex...->isOpenGLES()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3282 QOpenGLTexturePrivate * const d = d_func();-
3283 d->create();-
3284 ((!(d->texFuncs)) ? qt_assert("d->texFuncs",__FILE__,4161) : qt_noop());-
3285 ((!(d->textureId)) ? qt_assert("d->textureId",__FILE__,4162) : qt_noop());-
3286 int values[4];-
3287 values[0] = r;-
3288 values[1] = g;-
3289 values[2] = b;-
3290 values[3] = a;-
3291 d->borderColor.clear();-
3292 for (int i = 0; i < 4
i < 4Description
TRUEnever evaluated
FALSEnever evaluated
; ++i)
0
3293 d->borderColor.append(QVariant(values[i]));
never executed: d->borderColor.append(QVariant(values[i]));
0
3294 d->texFuncs->glTextureParameteriv(d->textureId, d->target, d->bindingTarget, 0x1004, values);-
3295 return;
never executed: return;
0
3296 }-
3297-
3298-
3299-
3300-
3301-
3302-
3303 QMessageLogger(__FILE__, 4180, __PRETTY_FUNCTION__).warning("QOpenGLTexture: Border color is not supported");-
3304-
3305-
3306}
never executed: end of block
0
3307-
3308-
3309-
3310-
3311-
3312-
3313void QOpenGLTexture::setBorderColor(uint r, uint g, uint b, uint a)-
3314{-
3315-
3316 if (!QOpenGLContext::currentContext()->isOpenGLES()
!QOpenGLContex...->isOpenGLES()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3317 QOpenGLTexturePrivate * const d = d_func();-
3318 d->create();-
3319 ((!(d->texFuncs)) ? qt_assert("d->texFuncs",__FILE__,4196) : qt_noop());-
3320 ((!(d->textureId)) ? qt_assert("d->textureId",__FILE__,4197) : qt_noop());-
3321 int values[4];-
3322 values[0] = int(r);-
3323 values[1] = int(g);-
3324 values[2] = int(b);-
3325 values[3] = int(a);-
3326 d->borderColor.clear();-
3327 for (int i = 0; i < 4
i < 4Description
TRUEnever evaluated
FALSEnever evaluated
; ++i)
0
3328 d->borderColor.append(QVariant(values[i]));
never executed: d->borderColor.append(QVariant(values[i]));
0
3329 d->texFuncs->glTextureParameteriv(d->textureId, d->target, d->bindingTarget, 0x1004, values);-
3330 return;
never executed: return;
0
3331 }-
3332-
3333-
3334-
3335-
3336-
3337-
3338 QMessageLogger(__FILE__, 4215, __PRETTY_FUNCTION__).warning("QOpenGLTexture: Border color is not supported");-
3339-
3340-
3341}
never executed: end of block
0
3342-
3343-
3344-
3345-
3346-
3347-
3348QColor QOpenGLTexture::borderColor() const-
3349{-
3350 const QOpenGLTexturePrivate * const d = d_func();-
3351 QColor c(0.0f, 0.0f, 0.0f, 0.0f);-
3352 if (!d->borderColor.isEmpty()
!d->borderColor.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3353 c.setRedF(d->borderColor.at(0).toFloat());-
3354 c.setGreenF(d->borderColor.at(1).toFloat());-
3355 c.setBlueF(d->borderColor.at(2).toFloat());-
3356 c.setAlphaF(d->borderColor.at(3).toFloat());-
3357 }
never executed: end of block
0
3358 return
never executed: return c;
c;
never executed: return c;
0
3359}-
3360-
3361-
3362-
3363-
3364-
3365-
3366-
3367void QOpenGLTexture::borderColor(float *border) const-
3368{-
3369 const QOpenGLTexturePrivate * const d = d_func();-
3370 ((!(border)) ? qt_assert("border",__FILE__,4247) : qt_noop());-
3371 if (d->borderColor.isEmpty()
d->borderColor.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3372 for (int i = 0; i < 4
i < 4Description
TRUEnever evaluated
FALSEnever evaluated
; ++i)
0
3373 border[i] = 0.0f;
never executed: border[i] = 0.0f;
0
3374 }
never executed: end of block
else {
0
3375 for (int i = 0; i < 4
i < 4Description
TRUEnever evaluated
FALSEnever evaluated
; ++i)
0
3376 border[i] = d->borderColor.at(i).toFloat();
never executed: border[i] = d->borderColor.at(i).toFloat();
0
3377 }
never executed: end of block
0
3378}-
3379-
3380-
3381-
3382-
3383-
3384-
3385-
3386void QOpenGLTexture::borderColor(int *border) const-
3387{-
3388 const QOpenGLTexturePrivate * const d = d_func();-
3389 ((!(border)) ? qt_assert("border",__FILE__,4266) : qt_noop());-
3390 if (d->borderColor.isEmpty()
d->borderColor.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3391 for (int i = 0; i < 4
i < 4Description
TRUEnever evaluated
FALSEnever evaluated
; ++i)
0
3392 border[i] = 0;
never executed: border[i] = 0;
0
3393 }
never executed: end of block
else {
0
3394 for (int i = 0; i < 4
i < 4Description
TRUEnever evaluated
FALSEnever evaluated
; ++i)
0
3395 border[i] = d->borderColor.at(i).toInt();
never executed: border[i] = d->borderColor.at(i).toInt();
0
3396 }
never executed: end of block
0
3397}-
3398-
3399-
3400-
3401-
3402-
3403-
3404-
3405void QOpenGLTexture::borderColor(unsigned int *border) const-
3406{-
3407 const QOpenGLTexturePrivate * const d = d_func();-
3408 ((!(border)) ? qt_assert("border",__FILE__,4285) : qt_noop());-
3409 if (d->borderColor.isEmpty()
d->borderColor.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3410 for (int i = 0; i < 4
i < 4Description
TRUEnever evaluated
FALSEnever evaluated
; ++i)
0
3411 border[i] = 0;
never executed: border[i] = 0;
0
3412 }
never executed: end of block
else {
0
3413 for (int i = 0; i < 4
i < 4Description
TRUEnever evaluated
FALSEnever evaluated
; ++i)
0
3414 border[i] = d->borderColor.at(i).toUInt();
never executed: border[i] = d->borderColor.at(i).toUInt();
0
3415 }
never executed: end of block
0
3416}-
3417void QOpenGLTexture::setMinimumLevelOfDetail(float value)-
3418{-
3419-
3420 if (!QOpenGLContext::currentContext()->isOpenGLES()
!QOpenGLContex...->isOpenGLES()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3421 QOpenGLTexturePrivate * const d = d_func();-
3422 d->create();-
3423 ((!(d->texFuncs)) ? qt_assert("d->texFuncs",__FILE__,4308) : qt_noop());-
3424 ((!(d->textureId)) ? qt_assert("d->textureId",__FILE__,4309) : qt_noop());-
3425 ((!(value < d->maxLevelOfDetail)) ? qt_assert("value < d->maxLevelOfDetail",__FILE__,4310) : qt_noop());-
3426 d->minLevelOfDetail = value;-
3427 d->texFuncs->glTextureParameterf(d->textureId, d->target, d->bindingTarget, 0x813A, value);-
3428 return;
never executed: return;
0
3429 }-
3430-
3431-
3432-
3433 QMessageLogger(__FILE__, 4318, __PRETTY_FUNCTION__).warning("QOpenGLTexture: Detail level is not supported");-
3434}
never executed: end of block
0
3435-
3436-
3437-
3438-
3439-
3440-
3441float QOpenGLTexture::minimumLevelOfDetail() const-
3442{-
3443 const QOpenGLTexturePrivate * const d = d_func();-
3444 return
never executed: return d->minLevelOfDetail;
d->minLevelOfDetail;
never executed: return d->minLevelOfDetail;
0
3445}-
3446void QOpenGLTexture::setMaximumLevelOfDetail(float value)-
3447{-
3448-
3449 if (!QOpenGLContext::currentContext()->isOpenGLES()
!QOpenGLContex...->isOpenGLES()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3450 QOpenGLTexturePrivate * const d = d_func();-
3451 d->create();-
3452 ((!(d->texFuncs)) ? qt_assert("d->texFuncs",__FILE__,4345) : qt_noop());-
3453 ((!(d->textureId)) ? qt_assert("d->textureId",__FILE__,4346) : qt_noop());-
3454 ((!(value > d->minLevelOfDetail)) ? qt_assert("value > d->minLevelOfDetail",__FILE__,4347) : qt_noop());-
3455 d->maxLevelOfDetail = value;-
3456 d->texFuncs->glTextureParameterf(d->textureId, d->target, d->bindingTarget, 0x813B, value);-
3457 return;
never executed: return;
0
3458 }-
3459-
3460-
3461-
3462 QMessageLogger(__FILE__, 4355, __PRETTY_FUNCTION__).warning("QOpenGLTexture: Detail level is not supported");-
3463}
never executed: end of block
0
3464-
3465-
3466-
3467-
3468-
3469-
3470float QOpenGLTexture::maximumLevelOfDetail() const-
3471{-
3472 const QOpenGLTexturePrivate * const d = d_func();-
3473 return
never executed: return d->maxLevelOfDetail;
d->maxLevelOfDetail;
never executed: return d->maxLevelOfDetail;
0
3474}-
3475-
3476-
3477-
3478-
3479-
3480-
3481-
3482void QOpenGLTexture::setLevelOfDetailRange(float min, float max)-
3483{-
3484-
3485 if (!QOpenGLContext::currentContext()->isOpenGLES()
!QOpenGLContex...->isOpenGLES()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3486 QOpenGLTexturePrivate * const d = d_func();-
3487 d->create();-
3488 ((!(d->texFuncs)) ? qt_assert("d->texFuncs",__FILE__,4381) : qt_noop());-
3489 ((!(d->textureId)) ? qt_assert("d->textureId",__FILE__,4382) : qt_noop());-
3490 ((!(min < max)) ? qt_assert("min < max",__FILE__,4383) : qt_noop());-
3491 d->minLevelOfDetail = min;-
3492 d->maxLevelOfDetail = max;-
3493 d->texFuncs->glTextureParameterf(d->textureId, d->target, d->bindingTarget, 0x813A, min);-
3494 d->texFuncs->glTextureParameterf(d->textureId, d->target, d->bindingTarget, 0x813B, max);-
3495 return;
never executed: return;
0
3496 }-
3497-
3498-
3499-
3500-
3501 QMessageLogger(__FILE__, 4394, __PRETTY_FUNCTION__).warning("QOpenGLTexture: Detail level is not supported");-
3502}
never executed: end of block
0
3503-
3504-
3505-
3506-
3507-
3508-
3509QPair<float, float> QOpenGLTexture::levelOfDetailRange() const-
3510{-
3511 const QOpenGLTexturePrivate * const d = d_func();-
3512 return
never executed: return qMakePair(d->minLevelOfDetail, d->maxLevelOfDetail);
qMakePair(d->minLevelOfDetail, d->maxLevelOfDetail);
never executed: return qMakePair(d->minLevelOfDetail, d->maxLevelOfDetail);
0
3513}-
3514void QOpenGLTexture::setLevelofDetailBias(float bias)-
3515{-
3516-
3517 if (!QOpenGLContext::currentContext()->isOpenGLES()
!QOpenGLContex...->isOpenGLES()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
3518 QOpenGLTexturePrivate * const d = d_func();-
3519 d->create();-
3520 ((!(d->texFuncs)) ? qt_assert("d->texFuncs",__FILE__,4423) : qt_noop());-
3521 ((!(d->textureId)) ? qt_assert("d->textureId",__FILE__,4424) : qt_noop());-
3522 d->levelOfDetailBias = bias;-
3523 d->texFuncs->glTextureParameterf(d->textureId, d->target, d->bindingTarget, 0x8501, bias);-
3524 return;
never executed: return;
0
3525 }-
3526-
3527-
3528-
3529 QMessageLogger(__FILE__, 4432, __PRETTY_FUNCTION__).warning("QOpenGLTexture: Detail level is not supported");-
3530}
never executed: end of block
0
3531-
3532-
3533-
3534-
3535-
3536-
3537float QOpenGLTexture::levelofDetailBias() const-
3538{-
3539 const QOpenGLTexturePrivate * const d = d_func();-
3540 return
never executed: return d->levelOfDetailBias;
d->levelOfDetailBias;
never executed: return d->levelOfDetailBias;
0
3541}-
3542-
3543-
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial 4.3.0-BETA-master-30-08-2018-4cb69e9