Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DDS files that specify DDS_PITCH load more reliably #81

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions DevIL/src-IL/src/il_dds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -852,6 +852,8 @@ ILboolean ReadData(ILuint CompFormat, ILboolean IsDXT10)
else {
if (IsDXT10)
Bps = Head.LinearSize; //@TODO: Head.RGBBitCount is always 0 from the texconv.exe tool?
else if ((Head.RGBBitCount == 0) && (Head.Flags1 & DDS_PITCH))
Bps = Head.LinearSize; //@TODO: Microsoft recomends recomputing this instead.
else
Bps = Width * Head.RGBBitCount / 8;
CompSize = Bps * Height * Depth;
Expand Down