码迷,mamicode.com
首页 > 其他好文 > 详细

3DGameProg 基本框架搭建

时间:2016-05-08 22:24:44      阅读:202      评论:0      收藏:0      [点我收藏+]

标签:

搭建环境中参考的代码基本是原框架,但是在本书使用的旧的 DirectX 11 (June 2010) 版本的SDK,而根据国外网友的评论,基本上本书发布时,Microsoft就将这套框架完全抛弃了(比如XNA系的东西完全不用了,eg. XNAMATH -> DirectX Math) [1]

环境:Windows 10,Visual Studio 2015

修改内容

旧有的框架中使用XNAMath部分全部舍弃,后续改写。保留基本框架和GameTimer部分内容。

遇到的问题

  1. CreateWindow失败,使用原框架中的代码,在CreateWindow会Failed,改为 WNDCLASSEX结构并调用CreateWindowEx接口即可。
  2. D3D11CreateDevice失败[2],注释

//#if defined(DEBUG) || defined(_DEBUG)
//    createDeviceFlags |= D3D11_CREATE_DEVICE_DEBUG;
//#endif

 



[1] Luna‘s books are all great, but in this case Microsoft pulled the rug out from him soon after the books release. The entire effects framework used in the book is now deprecated.

[2] For Windows 7 and Windows Vista, you can continue to use the same DirectX 11.0 APIs as always even with this update installed. The only thing you have to do is to install the updated SDK Debug Layers to restore D3D11_CREATE_DEVICE_DEBUG functionality. - From: DirectX 11.1 and Windows 7 Update

3DGameProg 基本框架搭建

标签:

原文地址:http://www.cnblogs.com/x5lcfd/p/5471803.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!