From b9ee398cbc93f763e1c36937ce3ea0fda25840e7 Mon Sep 17 00:00:00 2001 From: qonnop Date: Wed, 3 Oct 2018 17:03:19 +0200 Subject: [PATCH] Fixed DDS loader according to issue #22530 width and height attributes have to be switched according to the official DDS header docs: https://docs.microsoft.com/en-us/windows/desktop/direct3ddds/dds-header (cherry picked from commit a93edeb3075ec78e4c77e7b141f475a0a185e4ef) --- modules/dds/texture_loader_dds.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/dds/texture_loader_dds.cpp b/modules/dds/texture_loader_dds.cpp index 4c1f36af768..e4f419ed81c 100644 --- a/modules/dds/texture_loader_dds.cpp +++ b/modules/dds/texture_loader_dds.cpp @@ -108,8 +108,8 @@ RES ResourceFormatDDS::load(const String &p_path, const String &p_original_path, uint32_t magic = f->get_32(); uint32_t hsize = f->get_32(); uint32_t flags = f->get_32(); - uint32_t width = f->get_32(); uint32_t height = f->get_32(); + uint32_t width = f->get_32(); uint32_t pitch = f->get_32(); /* uint32_t depth = */ f->get_32(); uint32_t mipmaps = f->get_32();