Skip to content

Commit

Permalink
Add DDS_LOADER_FLAG_IGNORE_MIPS to DDSTextureLoader
Browse files Browse the repository at this point in the history
  • Loading branch information
walbourn committed Oct 14, 2024
1 parent 891b18f commit 596f879
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
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
5 changes: 5 additions & 0 deletions Src/DDSTextureLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,11 @@ namespace
format = MakeLinear(format);
}

if (loadFlags & DDS_LOADER_IGNORE_MIPS)
{
mipCount = 1;
}

switch (resDim)
{
case D3D11_RESOURCE_DIMENSION_TEXTURE1D:
Expand Down

0 comments on commit 596f879

Please sign in to comment.