mirror of
https://github.com/microsoft/DirectXTex.git
synced 2026-02-04 04:16:12 +01:00
CMake support added for building with MinGW (#275)
This commit is contained in:
@@ -64,16 +64,18 @@ using Microsoft::WRL::ComPtr;
|
||||
namespace
|
||||
{
|
||||
//--------------------------------------------------------------------------------------
|
||||
#if !defined(NO_D3D11_DEBUG_NAME) && ( defined(_DEBUG) || defined(PROFILE) )
|
||||
template<UINT TNameLength>
|
||||
inline void SetDebugObjectName(_In_ ID3D11DeviceChild* resource, _In_ const char(&name)[TNameLength]) noexcept
|
||||
{
|
||||
#if !defined(NO_D3D11_DEBUG_NAME) && ( defined(_DEBUG) || defined(PROFILE) )
|
||||
resource->SetPrivateData(WKPDID_D3DDebugObjectName, TNameLength - 1, name);
|
||||
#else
|
||||
UNREFERENCED_PARAMETER(resource);
|
||||
UNREFERENCED_PARAMETER(name);
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
template<UINT TNameLength>
|
||||
inline void SetDebugObjectName(_In_ ID3D11DeviceChild*, _In_ const char(&)[TNameLength]) noexcept
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
//-------------------------------------------------------------------------------------
|
||||
// WIC Pixel Format Translation Data
|
||||
|
||||
@@ -57,7 +57,11 @@
|
||||
|
||||
#define D3DX12_NO_STATE_OBJECT_HELPERS
|
||||
#define D3DX12_NO_CHECK_FEATURE_SUPPORT_CLASS
|
||||
#ifdef USING_DIRECTX_HEADERS
|
||||
#include "directx/d3dx12.h"
|
||||
#else
|
||||
#include "d3dx12.h"
|
||||
#endif
|
||||
|
||||
using namespace DirectX;
|
||||
using Microsoft::WRL::ComPtr;
|
||||
@@ -197,16 +201,18 @@ namespace
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------
|
||||
#if !defined(NO_D3D12_DEBUG_NAME) && ( defined(_DEBUG) || defined(PROFILE) )
|
||||
template<UINT TNameLength>
|
||||
inline void SetDebugObjectName(_In_ ID3D12DeviceChild* resource, _In_z_ const wchar_t(&name)[TNameLength]) noexcept
|
||||
{
|
||||
#if !defined(NO_D3D12_DEBUG_NAME) && ( defined(_DEBUG) || defined(PROFILE) )
|
||||
resource->SetName(name);
|
||||
#else
|
||||
UNREFERENCED_PARAMETER(resource);
|
||||
UNREFERENCED_PARAMETER(name);
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
template<UINT TNameLength>
|
||||
inline void SetDebugObjectName(_In_ ID3D12DeviceChild*, _In_z_ const wchar_t(&)[TNameLength]) noexcept
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
inline uint32_t CountMips(uint32_t width, uint32_t height) noexcept
|
||||
{
|
||||
|
||||
@@ -20,9 +20,22 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <d3d12.h>
|
||||
#ifndef _WIN32
|
||||
#error This module only supports Windows
|
||||
#endif
|
||||
|
||||
#ifdef __MINGW32__
|
||||
#include <unknwn.h>
|
||||
#endif
|
||||
|
||||
#ifdef USING_DIRECTX_HEADERS
|
||||
#include <directx/d3d12.h>
|
||||
#include <dxguids/dxguids.h>
|
||||
#else
|
||||
#include <d3d12.h>
|
||||
#pragma comment(lib,"dxguid.lib")
|
||||
#endif
|
||||
|
||||
#pragma comment(lib,"windowscodecs.lib")
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
Reference in New Issue
Block a user