Commit 202bab13 authored by Chuck Walbourn's avatar Chuck Walbourn
Browse files

Update for xtexconv

parent 4c622406
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@

#include <ocidl.h>

#define DIRECTX_TEX_VERSION 151
#define DIRECTX_TEX_VERSION 152

struct IWICImagingFactory;
struct IWICMetadataQueryReader;
+1 −1
Original line number Diff line number Diff line
@@ -550,7 +550,7 @@ HRESULT DirectX::_EncodeDDSHeader(
        flags |= DDS_FLAGS_FORCE_DX10_EXT;
    }

    DDS_PIXELFORMAT ddpf = { 0 };
    DDS_PIXELFORMAT ddpf = {};
    if (!(flags & DDS_FLAGS_FORCE_DX10_EXT))
    {
        switch (metadata.format)
+7 −1
Original line number Diff line number Diff line
@@ -42,6 +42,11 @@ using namespace DirectX;
namespace
{
    const char g_Signature[] = "#?RADIANCE";
        // This is the official header signature for the .HDR (RGBE) file format.

    const char g_AltSignature[] = "#?RGBE";
        // This is a common variant header signature that is otherwise exactly the same format.

    const char g_Format[] = "FORMAT=";
    const char g_Exposure[] = "EXPOSURE=";

@@ -93,7 +98,8 @@ namespace
        }

        // Verify magic signature
        if (memcmp(pSource, g_Signature, sizeof(g_Signature) - 1) != 0)
        if (memcmp(pSource, g_Signature, sizeof(g_Signature) - 1) != 0
            && memcmp(pSource, g_AltSignature, sizeof(g_AltSignature) - 1) != 0)
        {
            return E_FAIL;
        }
+1 −1
Original line number Diff line number Diff line
@@ -928,7 +928,7 @@ HRESULT DirectX::Resize(

    bool usewic = !metadata.IsPMAlpha() && UseWICFiltering(metadata.format, filter);

    WICPixelFormatGUID pfGUID = { 0 };
    WICPixelFormatGUID pfGUID = {};
    bool wicpf = (usewic) ? _DXGIToWIC(metadata.format, pfGUID, true) : false;

    switch (metadata.dimension)
+5 −5
Original line number Diff line number Diff line
@@ -801,7 +801,7 @@ namespace
        if (memcmp(&containerFormat, &GUID_ContainerFormatBmp, sizeof(WICPixelFormatGUID)) == 0 && iswic2)
        {
            // Opt-in to the WIC2 support for writing 32-bit Windows BMP files with an alpha channel
            PROPBAG2 option = { 0 };
            PROPBAG2 option = {};
            option.pstrName = const_cast<wchar_t*>(L"EnableV5Header32bppBGRA");

            VARIANT varValue;
@@ -1043,7 +1043,7 @@ HRESULT DirectX::LoadFromWICMemory(

    // Get metadata
    TexMetadata mdata;
    WICPixelFormatGUID convertGUID = { 0 };
    WICPixelFormatGUID convertGUID = {};
    hr = DecodeMetadata(flags, iswic2, decoder.Get(), frame.Get(), mdata, &convertGUID, getMQR);
    if (FAILED(hr))
        return hr;
@@ -1104,7 +1104,7 @@ HRESULT DirectX::LoadFromWICFile(

    // Get metadata
    TexMetadata mdata;
    WICPixelFormatGUID convertGUID = { 0 };
    WICPixelFormatGUID convertGUID = {};
    hr = DecodeMetadata(flags, iswic2, decoder.Get(), frame.Get(), mdata, &convertGUID, getMQR);
    if (FAILED(hr))
        return hr;
@@ -1170,7 +1170,7 @@ HRESULT DirectX::SaveToWICMemory(
    if (FAILED(hr))
        return hr;

    LARGE_INTEGER li = { { 0 } };
    LARGE_INTEGER li = {};
    hr = stream->Seek(li, STREAM_SEEK_SET, 0);
    if (FAILED(hr))
        return hr;
@@ -1227,7 +1227,7 @@ HRESULT DirectX::SaveToWICMemory(
    if (FAILED(hr))
        return hr;

    LARGE_INTEGER li = { { 0 } };
    LARGE_INTEGER li = {};
    hr = stream->Seek(li, STREAM_SEEK_SET, 0);
    if (FAILED(hr))
        return hr;
Loading