From 9fa06e0019c2c064c4e46cdfffb963c7c9a4e426 Mon Sep 17 00:00:00 2001 From: Gabriel Calero Date: Tue, 9 Jan 2018 12:10:32 -0300 Subject: [PATCH] Fixes to load cubemap --- libraries/gpu/src/gpu/Texture_ktx.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libraries/gpu/src/gpu/Texture_ktx.cpp b/libraries/gpu/src/gpu/Texture_ktx.cpp index 30e24276df..65028f7b8a 100644 --- a/libraries/gpu/src/gpu/Texture_ktx.cpp +++ b/libraries/gpu/src/gpu/Texture_ktx.cpp @@ -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,