通过链接到 Windows 10 SDK 使用 D3D9 字体
Use D3D9 Fonts by linking to Windows 10 SDK
是否可以通过链接到 Windows 10 SDK 中的 DirextX 版本来使用 D3D9 字体?
下面是我想要的代码类型运行。但是我找不到 Windows 10 SDK
支持的字体
D3DXFONT_DESC fontDesc;
fontDesc.Height = 80;
fontDesc.Width = 40;
fontDesc.Weight = FW_BOLD;
fontDesc.MipLevels = 0;
fontDesc.Italic = true;
fontDesc.CharSet = DEFAULT_CHARSET;
fontDesc.OutputPrecision = OUT_DEFAULT_PRECIS;
fontDesc.Quality = DEFAULT_QUALITY;
fontDesc.PitchAndFamily = DEFAULT_PITCH | FF_DONTCARE;
_tcscpy(fontDesc.FaceName, _T("Ariel"));
D3DXCreateFontIndirect(gd3dDevice, &fontDesc, &mFont);
Windows 10 SDK 包含用于 Direct3D 9 API 的 'core headers',但 不 包含 D3DX 实用程序库。 D3DX9、D3DX10 和 D3DX11 已弃用,其中 none 在 Windows 8.x SDK 或 Windows 10 SDK 中提供。
您仍然可以使用 legacy, end-of-life DirectX SDK to get D3DX9. You can mix the legacy DirectX SDK with the Windows 10 SDK, but you need to use the reverse order for the include/lib paths. These details are on Microsoft Docs。
Keep in mind that using D3DX also means your application continues to rely on the legacy DirectSetup which in many cases it could otherwise avoid using. See Not So Direct Setup.
见Where is the DirectX SDK (2015 Edition)?
Of course, Direct3D 9 itself is 'legacy'. There are replacements for all the D3DX functionality available if using Direct3D 11 or later. See Living without D3DX
是否可以通过链接到 Windows 10 SDK 中的 DirextX 版本来使用 D3D9 字体?
下面是我想要的代码类型运行。但是我找不到 Windows 10 SDK
支持的字体 D3DXFONT_DESC fontDesc;
fontDesc.Height = 80;
fontDesc.Width = 40;
fontDesc.Weight = FW_BOLD;
fontDesc.MipLevels = 0;
fontDesc.Italic = true;
fontDesc.CharSet = DEFAULT_CHARSET;
fontDesc.OutputPrecision = OUT_DEFAULT_PRECIS;
fontDesc.Quality = DEFAULT_QUALITY;
fontDesc.PitchAndFamily = DEFAULT_PITCH | FF_DONTCARE;
_tcscpy(fontDesc.FaceName, _T("Ariel"));
D3DXCreateFontIndirect(gd3dDevice, &fontDesc, &mFont);
Windows 10 SDK 包含用于 Direct3D 9 API 的 'core headers',但 不 包含 D3DX 实用程序库。 D3DX9、D3DX10 和 D3DX11 已弃用,其中 none 在 Windows 8.x SDK 或 Windows 10 SDK 中提供。
您仍然可以使用 legacy, end-of-life DirectX SDK to get D3DX9. You can mix the legacy DirectX SDK with the Windows 10 SDK, but you need to use the reverse order for the include/lib paths. These details are on Microsoft Docs。
Keep in mind that using D3DX also means your application continues to rely on the legacy DirectSetup which in many cases it could otherwise avoid using. See Not So Direct Setup.
见Where is the DirectX SDK (2015 Edition)?
Of course, Direct3D 9 itself is 'legacy'. There are replacements for all the D3DX functionality available if using Direct3D 11 or later. See Living without D3DX