NVidia の Texture Exporter Toolで Texture Cube を作成しましたが、 で読み込めませんIWICDdsDecoder
。
で失敗し0x88982f61 : The image header is unrecognized.
ます。
一方、Dimension = WICDdsTexture2D
NVTET で作成された通常の 2D テクスチャ ( ) は正しくロードされ、適切に機能します。
IWICDdsLoader
キューブ マップをサポートしていますか?サポートしていない場合、WICDdsDimension.WICDdsTextureCube
指定されているのはなぜですか?
WICDdsTexture2D
NVTET によって記述された通常のテクスチャに対して機能する部分ローダー コード。
HRESULT lResult;
WICStream lStream;
lResult = gFactory->CreateStream(&lStream);
if (FAILED(lResult)) return lResult;
lResult = lStream->InitializeFromFilename(aPath, GENERIC_READ);
if (FAILED(lResult)) return lResult;
WICBitmapDecoder lBitmapDecoder;
lResult = gFactory->CreateDecoder(GUID_ContainerFormatDds, nullptr, &lBitmapDecoder);
if (FAILED(lResult)) return lResult;
lResult = lBitmapDecoder->Initialize(lStream, WICDecodeMetadataCacheOnDemand);
if (FAILED(lResult)) return lResult; // <-- it fails here!
// 0x88982f61 : The image header is unrecognized.
WICDdsDecoder lDecoder(lBitmapDecoder);
if (!lDecoder) return E_NOINTERFACE;
WICDdsParameters lParameters{};
lResult = lDecoder->GetParameters(&lParameters);
if (FAILED(lResult)) return lResult;
if (lParameters.Dimension != WICDdsTextureCube) return E_FAIL;
// etc.