sdk - Windows 8 SDK重命名了所有 header ,现在不知道要包含什么?

标签 sdk windows-8 winapi directx-11

这些是我更新到新SDK之前的标题:

#pragma once

#ifndef _EXTERNAL_DEPENDENCIES_H_
#define _EXTERNAL_DEPENDENCIES_H_

#if defined(DEBUG) || defined(_DEBUG)
#define _CRTDBG_MAP_ALLOC
#include <crtdbg.h>
#endif

#include <windows.h>
#include <time.h>
#include <mmsystem.h>
#include <cassert>
#include <ctime>
#include <algorithm>
#include <string>
#include <sstream>
#include <fstream>
#include <vector>
#include <assert.h>
#include <fcntl.h>
#include <pdh.h>
#include <stack>
#include <map>
#include <memory>
#include <random>
#include <xaudio2.h>
#include <x3daudio.h>
#include <xaudio2fx.h>
#include <ogg\ogg.h>
#include <ogg\os_types.h>
#include <vorbis\codec.h>
#include <vorbis\vorbisenc.h>
#include <vorbis\vorbisfile.h>

#include "d3dx11Effect.h"
#include <d3dx11.h>
#include <xnamath.h>
#include <dxerr.h>
#include <dinput.h>
#include <d3dcommon.h>
#include <dxgi.h>
#include <d3d11.h>
#include <d3dcompiler.h>
#include <d3dx10math.h>
#include <d3dx11async.h>
#include <D3DX11tex.h>
#include <gdiplus.h>

#pragma comment (lib, "gdiplus.lib")
#pragma comment (lib, "winmm.lib")
#pragma comment (lib, "dxguid.lib")  
#pragma comment (lib, "d3dx9d.lib")  
#pragma comment (lib, "d3dx10d.lib")  
#pragma comment (lib, "d3d11.lib")  
#pragma comment (lib, "d3dx11.lib")        
#pragma comment (lib, "dxgi.lib")
#pragma comment (lib, "dxgi.lib")
#pragma comment (lib, "dxerr.lib")
#pragma comment (lib, "d3dx10.lib")
#pragma comment (lib, "wsock32.lib")
#pragma comment (lib, "dinput8.lib")
#pragma comment (lib, "dxguid.lib")
#pragma comment (lib, "pdh.lib")
#pragma comment (lib, "comctl32.lib")
#pragma comment (lib, "xaudio2.lib")
#pragma comment (lib, "x3daudio.lib")
#pragma comment (lib, "libogg.lib")
#pragma comment (lib, "libogg_static.lib")
#pragma comment (lib, "libvorbis.lib")
#pragma comment (lib, "libvorbisfile.lib")

#pragma warning (disable : 4482)

#endif

新SDK中缺少其中至少一半...

大多数核心DirectX header 都已重命名,我可以解决这个问题,但其中只有一半丢失了,例如Dxerr.h和d3dx11async.h甚至d3dx10math.h/xnamath.h(哦,当我包含DirectXMath.h时,它仍然表示XMFLOAT3未定义)。我现在不知道该怎么办,它在任何地方都说如何从2010年6月DirectX SDK迁移到Windows SDK 8.0吗?

最佳答案

DirectXMath.h中的XMFLOAT3在命名空间DirectX中。

尝试在头文件中添加以下内容:

using namespace DirectX;

您还可以包含<xnamath.h>,而不是直接包含<DirectXMath.h><D3DX10Math.h>

关于sdk - Windows 8 SDK重命名了所有 header ,现在不知道要包含什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12134325/

相关文章:

linux - 我是否使用板载 sdk 向 Dji Phantom 4 发出指令

c# - Windows 8 网格应用程序中的空数据模板

Delphi - 获取文件夹图标

winapi - 如何使用 WinAPI 获取 MessageBox 图标

php - 如何在 php-opencloud 中正确提取存档文件

iPhone SDK : disable auto creation of dot (. )在文本字段(或 TextView )中

android - 28.0.3 aapt.exe'' 以非零退出值 1 完成

windows-8 - Metro IndexedDB,浏览数据库

visual-studio-2012 - 有没有办法使用 Windows 7 开发机器创建 WinRT 应用程序?

delphi - 在 Delphi 中进行非闪烁、分段图形更新的最佳方法?