From 0b2888f52e73df32cc7ced64977f674464a0443a Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Thu, 18 Feb 2021 22:11:48 -0800 Subject: [PATCH] February 2021 --- DXUT/Core/DXUT.h | 6 +++--- DXUT/Core/DXUTmisc.cpp | 4 ++-- DXUT/Core/dxerr.cpp | 8 ++++---- DXUT/README.md | 6 +++--- Effects11/README.md | 16 +++++++++++++--- Effects11/pchfx.h | 5 +---- README.md | 6 +++++- 7 files changed, 31 insertions(+), 20 deletions(-) diff --git a/DXUT/Core/DXUT.h b/DXUT/Core/DXUT.h index a3f96c89..f290c543 100644 --- a/DXUT/Core/DXUT.h +++ b/DXUT/Core/DXUT.h @@ -102,10 +102,10 @@ #if defined(DEBUG) || defined(_DEBUG) #ifndef V -#define V(x) { hr = (x); if( FAILED(hr) ) { DXUTTrace( __FILE__, (DWORD)__LINE__, hr, L#x, true ); } } +#define V(x) { hr = (x); if( FAILED(hr) ) { DXUTTrace( __FILE__, (DWORD)__LINE__, hr, L## #x, true ); } } #endif #ifndef V_RETURN -#define V_RETURN(x) { hr = (x); if( FAILED(hr) ) { return DXUTTrace( __FILE__, (DWORD)__LINE__, hr, L#x, true ); } } +#define V_RETURN(x) { hr = (x); if( FAILED(hr) ) { return DXUTTrace( __FILE__, (DWORD)__LINE__, hr, L## #x, true ); } } #endif #else #ifndef V @@ -131,7 +131,7 @@ ((DWORD)((((a)&0xff)<<24)|(((r)&0xff)<<16)|(((g)&0xff)<<8)|((b)&0xff))) #endif -#define DXUT_VERSION 1123 +#define DXUT_VERSION 1125 //-------------------------------------------------------------------------------------- // Structs diff --git a/DXUT/Core/DXUTmisc.cpp b/DXUT/Core/DXUTmisc.cpp index d23c0e7e..dd91dbe9 100644 --- a/DXUT/Core/DXUTmisc.cpp +++ b/DXUT/Core/DXUTmisc.cpp @@ -202,7 +202,7 @@ void CDXUTTimer::LimitThreadAffinityToCurrentProc() //-------------------------------------------------------------------------------------- // Returns the string for the given DXGI_FORMAT. //-------------------------------------------------------------------------------------- -#define DXUTDXGIFMTSTR( a ) case a: pstr = L#a; break; +#define DXUTDXGIFMTSTR( a ) case a: pstr = L## #a; break; _Use_decl_annotations_ LPCWSTR WINAPI DXUTDXGIFormatToString( DXGI_FORMAT format, bool bWithPrefix ) @@ -552,7 +552,7 @@ HRESULT WINAPI DXUT_Dynamic_D3D11CreateDevice( IDXGIAdapter* pAdapter, return DXUTERR_NODIRECT3D; } -#define TRACE_ID(iD) case iD: return L#iD; +#define TRACE_ID(iD) case iD: return L## #iD; //-------------------------------------------------------------------------------------- const WCHAR* WINAPI DXUTTraceWindowsMessage( _In_ UINT uMsg ) diff --git a/DXUT/Core/dxerr.cpp b/DXUT/Core/dxerr.cpp index 4b56fa9e..bfbb6a36 100644 --- a/DXUT/Core/dxerr.cpp +++ b/DXUT/Core/dxerr.cpp @@ -51,14 +51,14 @@ #define CHK_ERRA(hrchk) \ case hrchk: \ - return L#hrchk; + return L## #hrchk; #define HRESULT_FROM_WIN32b(x) ((HRESULT)(x) <= 0 ? ((HRESULT)(x)) : ((HRESULT) (((x) & 0x0000FFFF) | (FACILITY_WIN32 << 16) | 0x80000000))) #define CHK_ERR_WIN32A(hrchk) \ case HRESULT_FROM_WIN32b(hrchk): \ case hrchk: \ - return L#hrchk; + return L## #hrchk; #define CHK_ERR_WIN32_ONLY(hrchk, strOut) \ case HRESULT_FROM_WIN32b(hrchk): \ @@ -3285,7 +3285,7 @@ const WCHAR* WINAPI DXGetErrorStringW( _In_ HRESULT hr ) #define CHK_ERRA(hrchk) \ case hrchk: \ - wcscpy_s( desc, count, L#hrchk ); break; + wcscpy_s( desc, count, L## #hrchk ); break; #define CHK_ERR(hrchk, strOut) \ case hrchk: \ @@ -3652,4 +3652,4 @@ HRESULT WINAPI DXTraceW( _In_z_ const WCHAR* strFile, _In_ DWORD dwLine, _In_ HR } return hr; -} \ No newline at end of file +} diff --git a/DXUT/README.md b/DXUT/README.md index 2fc8e265..e9b39dd0 100644 --- a/DXUT/README.md +++ b/DXUT/README.md @@ -6,7 +6,7 @@ http://go.microsoft.com/fwlink/?LinkId=320437 Copyright (c) Microsoft Corporation. All rights reserved. -**November 17, 2020** +**February 7, 2021** DXUT is a "GLUT"-like framework for Direct3D 11.x Win32 desktop applications; primarily samples, demos, and prototypes. @@ -20,7 +20,7 @@ Documentation is available on the [GitHub wiki](https://github.com/Microsoft/DXU ## Notices -*This project is 'archived'. It is still available for use for legacy projects, but use of it for new projects is not recommended.* +*This project is 'archived'. It is still available for use for legacy projects, but use of it for new projects is not recommended.* All content and source code for this package are subject to the terms of the [MIT License](http://opensource.org/licenses/MIT). @@ -49,7 +49,7 @@ These are hosted on [GitHub](https://github.com/walbourn/directx-sdk-samples) DXUT is being provided as a porting aid for older code that makes use of the legacy DirectX SDK, the deprecated D3DX9/D3DX11 library, and the DXUT11 framework. It is a cleaned up version of the original DXUT11 that will build with the Windows 8.1 / 10 SDK and does not make use of any legacy DirectX SDK or DirectSetup deployed components. The DXUT framework is for use in Win32 desktop applications. It not usable for Universal Windows Platform apps, Windows Store apps, -Xbox One apps, or Windows phone. +Xbox, or Windows phone. This version of DXUT only supports Direct3D 11, and therefore is not compatible with Windows XP or early versions of Windows Vista. diff --git a/Effects11/README.md b/Effects11/README.md index 8eb830a0..dee54dc8 100644 --- a/Effects11/README.md +++ b/Effects11/README.md @@ -6,7 +6,7 @@ http://go.microsoft.com/fwlink/?LinkId=271568 Copyright (c) Microsoft Corporation. All rights reserved. -**June 1, 2020** +**February 7, 2021** Effects for Direct3D 11 (FX11) is a management runtime for authoring HLSL shaders, render state, and runtime variables together. @@ -24,8 +24,18 @@ Documentation is available on the [GitHub wiki](https://github.com/Microsoft/FX1 All content and source code for this package are subject to the terms of the [MIT License](http://opensource.org/licenses/MIT). +## Contributing + +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com. + +When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. + This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. +## Trademarks + +This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow [Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general). Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies. + ## Samples * Direct3D Tutorial 11-14 @@ -44,5 +54,5 @@ or Windows phone 8.0. The fx_5_0 profile support in the HLSL compiler is deprecated, and does not fully support DirectX 11.1 HLSL features such as minimum precision types. It is supported in the Windows 8.1 SDK version of the HLSL compiler (FXC.EXE) and -D3DCompile API (46), is supported but generates a deprecation warning with D3DCompile API (47), and could be removed -in a future update. +D3DCompile API (46), is supported but generates a deprecation warning with D3DCompile API (47). The fx profiles +are not supported by the DXIL (DXC.EXE) compiler. diff --git a/Effects11/pchfx.h b/Effects11/pchfx.h index 1991014b..347122a4 100644 --- a/Effects11/pchfx.h +++ b/Effects11/pchfx.h @@ -24,11 +24,8 @@ #include #define DCOMMON_H_INCLUDED #define NO_D3D11_DEBUG_NAME -#elif (_WIN32_WINNT >= 0x0602) || defined(_WIN7_PLATFORM_UPDATE) -#include -#include #else -#include +#include #include #endif diff --git a/README.md b/README.md index 0b88241c..89ec1cb8 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # DirectX SDK Samples -This repo contains samples that originally shipped in the legacy DirectX SDK. These are all **Windows desktop** applications for Windows 7 Service Pack 1 with the DirectX 11.0 runtime or later. +This repo contains Direct3D 11, XInput, and XAudio2 samples that originally shipped in the legacy DirectX SDK. These are all **Windows desktop** applications for Windows 7 Service Pack 1 with the DirectX 11.0 runtime or later. They have all been cleaned up to build using the Windows 8.x SDK or Windows 10 SDK, and _DO NOT_ require the DirectX SDK to build. Projects for Visual Studio 2017 and Visual Studio 2019 are provided. @@ -11,3 +11,7 @@ They have all been cleaned up to build using the Windows 8.x SDK or Windows 10 S All content and source code for this package are subject to the terms of the [MIT License](http://opensource.org/licenses/MIT). This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. + +## Trademarks + +This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow [Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general). Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.