mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 23:14:34 +02:00
Fixes to load cubemap
This commit is contained in:
parent
dd71035bf0
commit
9fa06e0019
1 changed files with 5 additions and 3 deletions
|
@ -498,14 +498,16 @@ TexturePointer Texture::build(const ktx::KTXDescriptor& descriptor) {
|
||||||
|
|
||||||
GPUKTXPayload gpuktxKeyValue;
|
GPUKTXPayload gpuktxKeyValue;
|
||||||
if (!GPUKTXPayload::findInKeyValues(descriptor.keyValues, 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
|
// FIXME use sensible defaults based on the texture type and format
|
||||||
gpuktxKeyValue._usageType = TextureUsageType::RESOURCE;
|
gpuktxKeyValue._usageType = TextureUsageType::RESOURCE;
|
||||||
gpuktxKeyValue._usage = Texture::Usage::Builder().withColor().withAlpha().build();
|
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,
|
auto texture = create(gpuktxKeyValue._usageType,
|
||||||
type,
|
type,
|
||||||
texelFormat,
|
texelFormat,
|
||||||
|
|
Loading…
Reference in a new issue