fixed loading of some dds

This commit is contained in:
Mikulas Florek 2020-04-08 21:00:29 +02:00
parent 375a6385b2
commit f449344fa8

View file

@ -1503,7 +1503,8 @@ bool loadTexture(TextureHandle handle, const void* input, int input_size, u32 fl
if (li->compressed) {
u32 size = DDS::sizeDXTC(width, height, internal_format);
if (!is_dds10 && (size != hdr.dwPitchOrLinearSize || (hdr.dwFlags & DDS::DDSD_LINEARSIZE) == 0)) {
if (!is_dds10 && !is_cubemap && (size != hdr.dwPitchOrLinearSize || (hdr.dwFlags & DDS::DDSD_LINEARSIZE) == 0)) {
logError("Renderer") << "Unsupported format " << debug_name;
CHECK_GL(glDeleteTextures(1, &texture));
return false;
}