Fixes to load cubemap

This commit is contained in:
Gabriel Calero 2018-01-09 12:10:32 -03:00
parent dd71035bf0
commit 9fa06e0019

View file

@ -498,14 +498,16 @@ TexturePointer Texture::build(const ktx::KTXDescriptor& descriptor) {
GPUKTXPayload gpuktxKeyValue;
if (!GPUKTXPayload::findInKeyValues(descriptor.keyValues, gpuktxKeyValue)) {
qCWarning(gpulogging) << "Could not find GPUKTX key values.";
#if defined(Q_OS_ANDROID)
// FIXME use sensible defaults based on the texture type and format
gpuktxKeyValue._usageType = TextureUsageType::RESOURCE;
gpuktxKeyValue._usage = Texture::Usage::Builder().withColor().withAlpha().build();
#else
qCWarning(gpulogging) << "Could not find GPUKTX key values.";
return TexturePointer();
#endif
}
auto texture = create(gpuktxKeyValue._usageType,
type,
texelFormat,