diff --git a/Inc/DDSTextureLoader.h b/Inc/DDSTextureLoader.h index 5e0f941f..cfb84f4f 100644 --- a/Inc/DDSTextureLoader.h +++ b/Inc/DDSTextureLoader.h @@ -47,6 +47,7 @@ namespace DirectX DDS_LOADER_DEFAULT = 0, DDS_LOADER_FORCE_SRGB = 0x1, DDS_LOADER_IGNORE_SRGB = 0x2, + DDS_LOADER_IGNORE_MIPS = 0x20, }; } diff --git a/Src/DDSTextureLoader.cpp b/Src/DDSTextureLoader.cpp index a9828b7e..1cf6a914 100644 --- a/Src/DDSTextureLoader.cpp +++ b/Src/DDSTextureLoader.cpp @@ -403,7 +403,7 @@ namespace bool isCubeMap = false; size_t mipCount = header->mipMapCount; - if (0 == mipCount) + if ((0 == mipCount) || (loadFlags & DDS_LOADER_IGNORE_MIPS)) { mipCount = 1; }