为什么找不到 DirectX 模板?

Why can't I find the DirectX template?

我目前正在为 Windows 桌面使用 Visual Studio 2013 Express,但我真的找不到 DirectX 模板,FILE -> New project -> Visual C++,但也没有DirectX 模板或 Windows 应用文件夹扇区。我在 Google 中搜索过这个,但似乎没有人发布过它。模板在哪里?

您需要下载 Visual Studio 的正确版本。桌面版没有 Windows 商店应用程序的 DirectX。您需要下载Visual Studio 2013 Express For Windows, scroll down to Express 2013 for Windows or direct link

Visual Studio 提供的 "DirectX" 模板适用于 Windows Store、Windows phone 或通用应用程序。它们仅在 Windows、VS 2013 Pro+ 或 VS 2013 社区版的 VS 2013 Express 中提供。

在Visual Studio中只有两个个内置的Visual C++ Win32桌面模板:

  • Win32 控制台应用程序
  • Win32 项目

正如其他人指出的那样,如果您想为 Windows 商店、Windows phone 或通用应用程序构建您需要 (a) Windows 8.1 和 ( b) 一些其他版本的 VS 2013.

如果您正在编写 Win32 桌面应用程序 and/or 有 Windows 7,请考虑下载并安装此模板:Direct3D Win32 Game Visual Studio template

此外,我强烈建议您使用 VS 2013 Community 而不是 VS 2013 Express for Windows Desktop,如果您满足相当宽松的许可要求——如果不满足,请购买 VS 2013 Pro。