在win7下配置DirectX11的开发环境

先在微软官网下载 “DirectX Software Development Kit”,然后安装。如果之前安装过 Visual C++ 2010 Redistributable Package ,需要先卸载掉,否则SDK会安装失败。

安装成功后就可以打开vs进行项目配置了:

Modify the project’s VC++ directories as follows to use the right order for SDK headers and libraries.

 

i. Open  Properties for the project and select the  VC++ Directories page.
ii. Select  All Configurations and All Platforms.
iii. Set these directories as follows:
  • Executable Directories: <inherit from parent or project defaults> (On right-side drop-down)
  • Include Directories: $(IncludePath);$(DXSDK_DIR)Include
  • Include Library Directories: $(LibraryPath);$(DXSDK_DIR)Lib\x86
iv. Click  Apply.
v. Choose the  x64 Platform .
vi. Set the  Library Directory as follows:
  • Library Directories: $(LibraryPath);$(DXSDK_DIR)Lib\x64
 1 //Include and link appropriate libraries and headers//
 2 #pragma comment(lib, "d3d11.lib")
 3 #pragma comment(lib, "d3dx11.lib")
 4 #pragma comment(lib, "d3dx10.lib")
 5 
 6 #include <windows.h>
 7 #include <d3d11.h>
 8 #include <d3dx11.h>
 9 #include <d3dx10.h>
10 #include "xnamath.h"

 

Where is the DirectX SDK?

directxtutorial

DX11Lessons

转载于:https://www.cnblogs.com/codingdiary/p/5389305.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值