Skip to content

Commit

Permalink
Add DDS_LOADER_IGNORE_MIPS flag to DDSTextureLoader (#492)
Browse files Browse the repository at this point in the history
  • Loading branch information
walbourn authored Oct 15, 2024
1 parent 891b18f commit 8cebe31
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions Inc/DDSTextureLoader.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
}

Expand Down
2 changes: 1 addition & 1 deletion Src/DDSTextureLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 8cebe31

Please sign in to comment.