I've found what I believe to be a minor bug with the DirectX::FlipRotate() function.
On line 228 of DirectXTexFlipRotate.cpp the following logic is used to decide whether the width and height should be swapped:
if (flags & (TEX_FR_ROTATE90 | TEX_FR_ROTATE270))
But because of the values for the enums doing the check like that causes the width and height to be erroneously swapped when flags is TEX_FR_ROTATE180 (which will eventually cause a DirectXTex error on e.g. line 74 of DirectXTexFlipRotate.cpp if width and height aren't equal).
There are a few different ways I can see to fix it; here's one example that is very explicit to help make the problem more clear:
I've found what I believe to be a minor bug with the DirectX::FlipRotate() function.
On line 228 of DirectXTexFlipRotate.cpp the following logic is used to decide whether the width and height should be swapped:
if (flags & (TEX_FR_ROTATE90 | TEX_FR_ROTATE270))
But because of the values for the enums doing the check like that causes the width and height to be erroneously swapped when flags is TEX_FR_ROTATE180 (which will eventually cause a DirectXTex error on e.g. line 74 of DirectXTexFlipRotate.cpp if width and height aren't equal).
There are a few different ways I can see to fix it; here's one example that is very explicit to help make the problem more clear:
I've found what I believe to be a minor bug with the DirectX::FlipRotate() function.
On line 228 of DirectXTexFlipRotate.cpp the following logic is used to decide whether the width and height should be swapped:
But because of the values for the enums doing the check like that causes the width and height to be erroneously swapped when flags is TEX_FR_ROTATE180 (which will eventually cause a DirectXTex error on e.g. line 74 of DirectXTexFlipRotate.cpp if width and height aren't equal).
There are a few different ways I can see to fix it; here's one example that is very explicit to help make the problem more clear:
I've found what I believe to be a minor bug with the DirectX::FlipRotate() function.
On line 228 of DirectXTexFlipRotate.cpp the following logic is used to decide whether the width and height should be swapped:
But because of the values for the enums doing the check like that causes the width and height to be erroneously swapped when flags is TEX_FR_ROTATE180 (which will eventually cause a DirectXTex error on e.g. line 74 of DirectXTexFlipRotate.cpp if width and height aren't equal).
There are a few different ways I can see to fix it; here's one example that is very explicit to help make the problem more clear: