Mobile Zone is brought to you in partnership with:

My name is Toni Petrina and I am a software developer and an occasional speaker. Although I primarily develop on the Microsoft stack, I like to learn new technologies. My hobbyist projects range from game development, regardless of the technology, to ALM. I spend most of my time with my girlfriend and someday I will learn how to play the guitar properly. Toni is a DZone MVB and is not an employee of DZone and has posted 49 posts at DZone. You can read more from them at their website. View Full User Profile

DirectX 11, Metro and Windows Phone 8

08.02.2012
| 3342 views |
  • submit to reddit

I couldn’t resist it, I simply had to install WP8 SDK. The first thing I did was creating a new project to see what has been added and what removed. Sadly, if you add XNA project, you can target WP7, and not WP8. However, since XNA based applications will be compatible with WP8, it makes no sense to discard WP7 since it has millions of users and not all of them will make the jump. One app, two marketplaces.

Moving on to the DX11 stuff I have created three projects:

  • Visual C++/Windows Metro Style/Direct3D App
  • Visual C++/Windows Phone/Windows Phone Direct3D App
  • Visual C#/Windows Phone/Windows Phone Direct3D XAML Application

The C# project template actually added two projects in my solution: a C# based Direct3DXamlApp1 project which references C++ Direct3DXamlApp1Comp project. C++ templates added only 1 project.

On basic inspection, all three C++ projects shared the same directory structure! In the image below, you can see how similar they are.

It simply screams “reuse me!” And since it is obvious that C# class can consume C++ components, you can create XNA-like library using the DirectX Tool Kit. I guess that it is not bad after all.

Since my processor does not support SLAT and I cannot run emulator, I will leave the refactoring of common classes for some other time. It is quite obvious that Microsoft made an effort to unite the mobile platforms for easy creation of DirectX apps for both platforms.

Published at DZone with permission of Toni Petrina, author and DZone MVB.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)