something would be.

来源:互联网 发布:coc药水数据 编辑:程序博客网 时间:2024/05/19 02:39
Things you can do to make it easier to port to Windows RT before you get any hardware:* Make sure your application runs well on Feature Level 9.1 and Feature Level 9.3 devices, plus whatever you are using for x86.* Use DirectXMath instead of some roll-your-own math library. DirectXMath supports SSE2 on x86 and x64 native, and ARM-NEON on ARM platforms.* Ensure you can build your application as both an x86 and x64 native Metro style app. This helps you find some 32-bit x86 specific non-portability issues, and certainly helps highlight any dependancies on other libraires you may be using that don't have x64 native versions and thus may not have ARM versions either.* Consider enabling maximum warnings (/Wall) and then disable the specific ones you can safely ignore (using #pragma warning or /wd). This helps find portablity issues as well, particularly C4302 and C4826.* Use C++ style casts instead of C-style cases. (const_cast, static_cast, reinterpret_cast). This can really help avoid supressing useful warnings when your cast does something you did not realize it did.* Use Code Analysis (/analyze) and fix any issues. Be sure to run it on x86 and x64 native builds for both Debug and Release configurations. This will ensure you have clean, portable code.* Once you've done all that, try building an ARM configuration using the VS 2012 tools and resolve any remaining code issues.



http://social.msdn.microsoft.com/Forums/en-US/wingameswithdirectx/thread/e4d12c24-4072-4bb4-9772-0ed1a090f7dd

原创粉丝点击